Join GitHub today
Firmware: Flashing from a computer
If you'd like to flash your Pebble's firmware from your computer, there is a way to do this. I'll demonstrate with my Mac, but a similar concept should work for other systems that can do Bluetooth serial emulation. Follow the following steps:
Get the latest Pebble SDK. I'll assume you already have that, and you have done so such that
pebbleis in your path.
- Boot your watch into PRF. If you're flashing your firmware, it's probably for development, so you don't mind that your device will lose its mind; start by giving your device a "vulcan nerve pinch" (on Bianca, hold down all the buttons until the watch shows a "oh god, please help, connect to phone" display). Once you're at the "SOS screen", you're ready to flash. It's good to know how to do this if you screw up the firmware, too.
- Grab a firmware. Find a pbz file for your watch; [there are a multitude of sources](Hardware & Firmware). Or, if you're daring, you'll use a firmware that you cooked up yourself.
- Pair your watch to your computer. On OS X, I launch Bluetooth settings, then hit 'pair', and do the dance.
pebbletool to your watch and open a REPL. Run something like
pebble repl --serial /dev/cu.PebbleA1F2-SerialPortSe. If you get the error
Could not connect to Pebble., then you might need to kick it; something like
sudo cu -l cu.PebbleA1F2-SerialPortSe, and mashing enter a few times, and then typing
<enter>~.to bail out of
^Cwon't work!). From there, you can try the
pebble replcommand again.
Upload a firmware. Put
install_firmware.py(available, mirror) in the directory that you're doing your firmware work from, and import it, something like:
import install_firmware as fw; and then finally, flash your firmware:
Hooray! 15 minutes later or so, it should finish, and your Pebble should reboot. You can run
pebble repl with
-vvv to get it to tell you more as it goes.
HEADS UP: On Pebble and Pebble Steel (tintin and bianca), the "vulcan nerve pinch" is implemented in firmware. That means that if you flash something bad to your device, you will have to wait for the battery to drain (could be quite a while!) before you can bring the device back to life. Andrew Witte reports that the Time series of devices are safer for this kind of experimentation.