5. Bluetooth - jamesoncollins/gauge_driver GitHub Wiki

Hardware Configuration

Running bluetooth on the STM32WB requires that you load a pre-compiled binary onto the chip. Loading this binary requires the firmware update service (FUS) binary to be loaded first.

  1. Determine firmware update start address, this is from stm32 documentation. I'll put the current values here:

fus address: 0x080EC000

ble stack address: 0x080CE000 (hm, the tool autoset 0x080D0000)

  1. flash updated FUS using STM32CubeProgrammer https://github.com/jamesoncollins/gauge_driver/tree/master/cubeide_proj/wireless_fw/stm32wb5x_FUS_fw.bin

  2. flash the full ble stack using STM32CubeProgrammer https://github.com/jamesoncollins/gauge_driver/tree/master/cubeide_proj/wireless_fw/stm32wb5x_BLE_Stack_full_fw.bin

Note, all of the available downloads are listed here: https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x

FUOTA (Fast Firmware Update Over the Air)

An application called BLE_Ota is loaded into the devices memory at address 0x0800_0000. This utility was ported from the official STM repo and now lives here.

The primary user application (gauge_driver.bin/hex/elf) is loaded at 0x0800_7000. The gauge driver application has been configured to match the requirements for the STM BlueST Protocol and has been configured with a "Reboot" characteristic. This allows it to be detected by the 'ST BLE Sensor' android app as a FUOTA-capable device. This process can load any firmware that has been configured to load at address 0x0800_7000. If the firmware you load continues to expose a "reboot" characteristic then you can repeatedly load new firmware over the air.

image image image

Live Monitoring

As of... right now... the board will export some data over bluetooth (like ECU data). I have made a proof-of-concept android app to display some of this data available here

image

A proof-of-concept android