NordicSemiconductor / pc-ble-driver-py

Python bindings for the ble-driver library
Other
126 stars 115 forks source link

Check for firmware version and baud rate in Flasher #41

Closed mrodem closed 7 years ago

mrodem commented 7 years ago

When passing auto_flash=True to BLEDriver, it checks if a connectivity firmware is present, and flashes the board if it is not. All connectivity firmwares have meta information written to address 0x20000. This starts with a "magic number" which is followed by version information, baud rate, etc.

The Flasher only looked for the magic number when checking for a connectivity firmware. There are multiple connectivity firmwares with different versions and baud rates, and pc-ble-driver-py is currently configured to use connectivity v1.2.0 with baud rate 115200. Now also looking at the connectivity version and baud rate to determine if we need to flash or not.