Reading Advertisement Service Data
Posted: Thu Aug 15, 2024 5:54 am
With an ESP32 configured as a BLE 4.2 controller, we are attempting to read the service data in an advertisement packet from a peripheral. We are using the NimBLE HOST GAP interface (ble_gap.h), and have the appropriate event handler/callback set up. Upon receipt of the BLE_GAP_EVENT_DISC event, discriminated by the MAC address, the rssi member of ble_gap_event->ble_gap_disc_desc struct seems to be correct. However, the length_data does not agree with advertisement packets captured by Wireshark, nor does the data pointed to by the *data member.
Is this the proper way to get at the service data? If not, please enlighten....
The mechanisms for "syncing' service data are only available if the "Support BLE 5" NimBLE option is selected in menuconfig. The Bluedroid stack does seem to support mechanisms to access this data, but we cannot use it at this time.
Are there other options? IDF 5.x? NimBLE Update?
Thanks!
HW Platform : ESP32 WROVER-E
Build Env : MacOS / ESP IDF 4.4
BLE Stack : NimBLE 1.3.0
Is this the proper way to get at the service data? If not, please enlighten....
The mechanisms for "syncing' service data are only available if the "Support BLE 5" NimBLE option is selected in menuconfig. The Bluedroid stack does seem to support mechanisms to access this data, but we cannot use it at this time.
Are there other options? IDF 5.x? NimBLE Update?
Thanks!
HW Platform : ESP32 WROVER-E
Build Env : MacOS / ESP IDF 4.4
BLE Stack : NimBLE 1.3.0