# Flashing the Pebble Firmware
You will be required to flash a new firmware to your Pebble device in one of the following cases:
- Update the application Firmware (e.g. for bug fixes or new added features to the main software)
- Update the modem firmware (e.g. to switch between NB-IoT and LTE-M cellular band support - Pebble comes preconfigured for NB-IoT)
- Update the bootloader firmware (e.g. for bug fixes or new low-level features)
When you flash the modem firmware, after the modem is updated you will have to flash the application firmware again.
We assume you already cloned the Pebble Firmware repository, and installed the Nordic nRF Connect tool for your system. If you have not done so yet, follow the instructions for your system below:
# Install nRF Connect & Programmer
# Install and launch the Programmer App
You will need to install a custom Programmer app for nrf Connect, that is included in the pebble-firmware repository.
Locate the following archive in the pebble firmware folder:
Extract the content of the archive in the
nRF Connectapps folder:
Launch the nRF Connect tool, scroll down to the
Programmer app and open it:
Connect Pebble to your computer using the USB cable, and follow the instructions in following two sections to flash the Pebble Application Firmware or the Pebble Modem Firmware respectively.
# Flash the Pebble Application Firmware.
Select the firmware hex file you want to flash (if you built a new firmware, find the
zephyr/app_signed.hexfile in the build folder) (1)
Select your device from the devices combo box in the programmer window (2)
Put Pebble in MCUboot mode (see the section below) and click the Write button (3)
The flashing process will last about 60 seconds: the red led on the boards will blink during the whole process. Eventually, Pebble will reboot automatically and the new firmware will be loaded.
# Flash the Pebble Modem Firmware
Please notice that updating the modem firmware will also erase the Pebble Application Firmware: you will need to flash the application firmware again.
Select your device from the devices combo box in the programmer window ( make sure your device is connected with the IoTeX programmer properly, as indicated by the green solid dot nect to the combobox)
Enter the MCUboot mode for your Pebble (see the section below) and click the Update Modem button
Select the modem firmware binary file
mfw_nrf9160_1.2.0.zipyou just downloaded and click Open to start the modem update process.
The flashing process will last about 2 minutes: the red led on the board will blink during the whole process.
# Put Pebble in MCUboot mode
You can flash a new firmware to a Pebble through the USB port by putting the board in MCUboot mode: in this mode Pebble will start the MCUboot secure bootloader instead of the main application firmware, that will allow to receive a new firmware through the USB cable.
Follow the instruction below to enable MCUboot on Pebble (please refer to the assembling guide to locate the buttons on the board):
- On Pebble, press and keep pressed the Power Button
- While the Power Button is pressed, press and release the Reset Button
- The blue led will turn on: keep the Power Button pressed until the led turns off (~5s)
The MCUBoot mode is now enabled and you can release the Power button:
the device will stay in MCUboot mode for about 20 seconds, if during this period the firmware flashing process does not start Pebble will reboot automatically in normal operation mode.