Upgrading the firmware

All firmware releases are posted here: https://github.com/happy-bubbles/presence-firmware/releases and it's recommended to use the latest one.

To upgrade the firmware of an existing Happy Bubble Bluetooth device or flash it to a blank one, follow these instructions:

Web Interface

Starting with firmware version 11, you can now upgrade your firmware from the web interface in 'config mode'. To do this, first start 'config mode' by holding the config button down for about 5 seconds and wait for the LED to turn orange.

Then connect to the "happy-bubbles-ble" access point on wifi and go to http://192.168.4.1/ on a browser.

Once you're at the web interface, navigate to the "Upgrade Firmware" link on the left menu and upload the firmware. Note that the device contains two firmware 'slots' to ensure it will always work in case of a bad firmware upgrade. So make sure you upload the correct one. The firmware upgrade page will tell you to upload either "user1.bin" or "user2.bin" from a release.

This method works on all operating systems, but if you'd like to flash the device over USB or are running a version older than 11, see below for how to upgrade with USB.

Linux or OS X

Connect the Happy Bubbles device over USB to a computer and find which port it's connected to, like /dev/ttyUSB0

Then while holding the 'flash' button on the board, press the 'reset' button too; then let go of both buttons.

Get esptool.py and then run:

curl -L https://github.com/happy-bubbles/presence-firmware/releases/download/current/happy-bubbles-ble.tgz | \
    tar xzf -
    cd happy-bubbles-ble
    esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash -fs 32m -ff 80m \
        0x00000 boot_v1.5.bin 0x1000 user1.bin 0x3FE000 blank.bin

Windows

Connect the Happy Bubbles device over USB to a computer and find which port it's connected to, like COM3

Get nodemcu-flasher and download the Happy Bubbles release, untar it.

In the config section, assign "boot_v1.5.bin" to offset 0x00000 "blank.bin" to offset 0x3FE000 * "user1.bin" to 0x01000

Then while holding the 'flash' button on the board, press the 'reset' button too; then let go of both buttons.

Click the 'Flash' button on nodemcu-flasher.

  1. Power the unit on by plugging in a micro USB cable.
  2. Status LED should be orange to indicate it's in 'Config Mode'. If not, hold down the 'config' button for about 5 seconds.
  3. Look for an access point called 'happy-bubbles-ble' on your phone or computer, and connect to it.
  4. On a browser, go to http://192.168.4.1/
  5. You will see a user-interface where you can change the unit's hostname on your network, select it which WiFi network to connect, and enter which MQTT server to connect to and communicate on.
  6. Finally, when you've changed the settings how you want them, hold the config button down for about 5 seconds. The detector should reboot itself and the status LED will quickly blink purple few times. This means it's in 'Operation Mode'. It's now listening for Bluetooth beacons and sending their info over MQTT. NOTE: For security reasons, the config user interface webpage can only be accessed when the unit is in 'Config Mode'.