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.

property hub_kind: HubKind

Gets the hub type identifier.

property version: Version

Gets the bootloader software version.

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.

class BootloaderResult(value)

Status returned by certain bootloader commands.

ERROR = 255

The command failed.

OK = 0

The command was successful.