Nimble: How to access scan response data

afcec1
Posts: 23
Joined: Tue Oct 08, 2019 1:48 pm

Nimble: How to access scan response data

Postby afcec1 » Mon Apr 19, 2021 11:36 am

Hi, so far I have been using BLE with Nimble stack taking the 'blecent' example as a reference for my development but always connecting to the remote devices and then subscribing for notifications.

Now I need to read the data sent by a device as a scan response. If I am not wrong, first I need to set 'passive' field from 'ble_gap_disc_params' struct to 0 to configure an active scan. But then I am quite lost and the documentation available at http://mynewt.apache.org/ is very poor.

In which GAP event type am I supposed to get the scan response data? Any example on how I can read it? Should I work with BLE_GAP_EVENT_DISC and parse event->disc.data?

Thanks

Who is online

Users browsing this forum: Bing [Bot] and 119 guests