Hi,
I have an application (ESP-IDF 4) working successfully with BLE (Bluedroid stack) but it also manages Wi-Fi connection, ESP-AZURE with TLS connections... and I need to reduce the memory consumption. I am planning a migration from Bluedroid to Nimble but I am experiencing some issues when doing initial tests with the 'blecent' example with custom modifications. I scan, then connect to my service and finally subscribe for notifications from my custom characterisitic. However, when I get event 'BLE_GAP_EVENT_NOTIFY_RX' the data should be contained in 'event->notify_rx.attr_data' but I am receiving a build error like: struct <anonymous> has no member named 'attr_data'
Am I doing anything wrong? How can I get the data from this notification?
Thanks
Nimble issue with BLE_GAP_EVENT_NOTIFY_RX event
Re: Nimble issue with BLE_GAP_EVENT_NOTIFY_RX event
Nobody getting this build error with 'event->notify_rx.attr_data' in struct ble_gap_event?
Re: Nimble issue with BLE_GAP_EVENT_NOTIFY_RX event
Thre is a bug in the examples and notify_rx.attr_data no longer exists. Notification data can be read this way:
For those seeking for good performance and proper coexistance with Wi-Fi, the difference when compared with Bluedroid is really important.
Code: Select all
uint8_t notif_data[100]; /* Size depending on the actual size of the notification data you have */
uint16_t notif_len;
int offset = 0;
notif_len = OS_MBUF_PKTLEN(event->notify_rx.om);
os_mbuf_copydata(event->notify_rx.om, offset, notif_len, notif_data);
Who is online
Users browsing this forum: Bing [Bot], Ethapus, Google [Bot] and 236 guests