Skip to content

56: BLE Scan ​

FieldNameDescriptionType
5MethodRequest a service to be perform an action
Possible values:
  • 1: SET— Set one or more values that are provided in the message payload.
  • 2: GET— Get values for the associated message type.
  • 3: SUBSCRIBE— Subscribe to values for the associated message type. Can be used in conjunction with other header fields to define the subscription parameters, such as Interval, Duration, Timeout, Storage Level and Message Level. If no interval is provided, messages will be sent as and when new data is available. Some data, such as GPS position, may require a set interval to be provided.
  • 5: UNSUBSCRIBE— Unsubscribe from a previous subscription.
uint8
This is an extract of header fields that are relevant to this message type, you can find them all documented in the Headers section.

Payload ​

FieldNameDescriptionTypeUnit
1Advertising Databytes
2MACMAC Address of the access point, as 6 bytesbytes
3RSSISignal strengthint8
4NameDevice name, if availableascii
5Scan ResponseRaw scan response payload, if availablebytes
6Active Scan RequestPerform an active scan, valid only for SUBSCRIBEbool
7Scan IntervalBLE scan interval in 0.625 ms controller units. Omit or set to 0 to retain the ESP default.uint8
8Scan WindowBLE scan window in 0.625 ms controller units. Omit or set to 0 to retain the ESP default.uint8

Examples ​

Subscribe to BLE scan results
BLE scan result

Code ​

For convenience, the following constants can be used to reference this message type.