A push to device feature was added in the 3.0 release of the Firefox OS Simulator. This feature allows web apps to be pushed to a connected device by clicking one button in the Simulator Dashboard. Availability of the Developer Preview Phone from Geeksphone has raised interest in the feature, so this post will detail how to configure your Geeksphone and the computer running the Simulator to make use of it.



Setting Up the Geeksphone Device

To push apps to the Geeksphone Firefox OS Developer Preview phone, you first need to enable Remote debugging. This can be done from the Settings app by selecting Device information > More Information > Developer -> Remote debugging. Now we are ready to configure the computer running the Simulator.

Windows

The team at Geeksphone recently released a set of drivers for Windows to support USB communication with their phones. The drivers are available at Geeksphone’s Web Site (direct ZIP link).

To install them, first download and extract the zip file to a known location on your system. Next, connect the phone to your machine using the provided USB cable. Click on the Start Button and enter “Device Manager” in the Search programs and files text entry field and press enter. This will launch the Windows Device Manager. Alternatively, you can launch the Device Manager from the icon located in the Windows Control Panel.

The connected phone will be listed under the Other Devices category. Right click on the Android label and select Update Driver Software….

In the Update Driver Software dialog, choose Browse my computer for driver software.

Locate the usb_driver folder from the Geeksphone download and make sure the Include subfolders checkbox is checked. Click on the Next button.

You will most likely receive a Windows Security alert. Select the Install this driver software anyway entry.

This will install the proper USB drivers and list the phone as Geeksphone Device in the Device Manager.

Launch the Firefox OS Simulator. The Dashboard should now contain a Push button and a Device connected message, and you should be able to add your Firefox OS app to the Simulator and push it to the phone.

Linux

If you are running the Simulator on a Linux machine, you will need to create or modify a udev rules file for the device. This process is described in “Setting up a Device for Development” (Steps 3.a and 3.b). The Geeksphone Firefox OS Developer Preview phone idVendor attribute is “05c6”, so your android.rules file should contain an entry similar to:

SUBSYSTEM==”usb”, ATTR{idVendor}==”05c6”, MODE=”0666”, GROUP=”plugdev”

After making the above changes, either reboot the system or restart the udev service:

sudo service udev restart

If you make these changes and the push to device button does not show up in the Simulator Dashboard, please see this workaround.

Mac

If you are running the Simulator on a Mac, no additional configuration is required to enable push to device.

Reference

Additional information about setting up and using the Firefox OS Simulator, including installing, adding apps, debugging and using the push to device capability can be found on the MDN page for the Firefox OS Simulator.