Bootloader
The bootloader module contains the bytecodes and messages for using the separate LWP3 bootloader service and characteristic for flashing firmware on the hub.
- class BootloaderAdvertisementData(data: bytes)
The 6-byte manufacturer-specific advertisement data sent when a hub in bootloader mode is advertising.
- property hub_capabilities: Capabilities
Gets the hub capability flags.
- class BootloaderCommand(value)
Commands that are sent to the bootloader GATT characteristic.
- DISCONNECT = 136
Causes the remote device to disconnect from Bluetooth.
- ERASE_FLASH = 17
Erases the flash memory.
- GET_CHECKSUM = 102
Gets the current checksum for the data that has been written so far.
- GET_FLASH_STATE = 119
Gets the STM32 flash memory debug protection state.
Not all bootloaders support this command.
- GET_INFO = 85
Gets info about the hub and flash memory layout.
- INIT_LOADER = 68
Initializes the firmware flasher.
- PROGRAM_FLASH = 34
Writes to a segment of the flash memory.
- START_APP = 51
Starts running the firmware (causes Bluetooth to disconnect).
- class BootloaderError(value)
Error type returned by bootloader error messages.
- UNKNOWN_COMMAND = 5
The command was not recognized.
- class BootloaderMessageKind(value)
Type for messages received from bootlaoder GATT characteristic notifications.
Messages that are a response to a command will have the same value as
BootloaderCommand
instead of a value from this enum.- ERROR = 5
Indicates that an error occurred.