Skip to main content

Module ble

Module ble 

Source
Expand description

Remote ID over Bluetooth: Service Data with UUID 0xFFFA.

Both Bluetooth 4 legacy advertising (one 25 byte message per advertisement) and Bluetooth 5 extended or long range advertising (a message pack) carry Remote ID as an AD structure of type 0x16 (Service Data, 16-bit UUID) with the ASTM UUID 0xFFFA, followed by the application code 0x0D and a one byte message counter.

  • If your Bluetooth stack hands you the raw advertising data, use find_in_advertising_data.
  • If it hands you service data already split by UUID (as btleplug, BlueZ D-Bus and Android do), pass the bytes for UUID 0xFFFA to parse_service_data.

Structs§

BleRemoteId
The Remote ID part of one advertisement.

Constants§

AD_TYPE_SERVICE_DATA_16
AD type for Service Data with a 16-bit UUID.
APP_CODE
Application code that follows the UUID.
SERVICE_UUID
The ASTM Remote ID 16-bit service UUID.

Functions§

ad_structures
Iterates over the AD structures of advertising data as (type, data). Stops at a zero length byte or at a structure that runs past the end.
find_in_advertising_data
Finds the Remote ID service data in raw advertising data.
parse_service_data
Parses service data for UUID 0xFFFA, starting at the application code.
write_advertising_data
Writes the Remote ID AD structure (length, type, UUID, app code, counter, payload) into out and returns its length.