This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how can i extract the device name from adv packet?

I need to extract the device name in shortened or complete form from the adv data packet during a scan event.  Is this possible?  If so how do I go about doing this?  I can't seem to find the variable/structure that houses this data from the scan.


Thanks...

  • Hey Ben,

    Check out this post here: http://e2e.ti.com/support/wireless_connectivity/f/538/p/347457/1217743.aspx#1217743

    That will show you how to access adv and scan rsp data on the central side. The sensor tag project provides a good example for constructing the adv and scan response packets on the peripheral side, including a name.

    -Matt

  • Matt,

    Thank you, that post was helpful.  I am seeing the where 'AdvData' in the call back function is being pointed to.  The pEvtData pointer points to adv packet data, but I can't seem to find a pointer to the ScanResponse data.  If i pull up a memory window to look at the data the pEvtData pointer is pointing to i can see the scan response data i want to access, I just can find the pointer that is pointing to this information.  It only seems to be directing me to the AdvData in a call back event.  How do I access this ScanResponse data?

    Thanks...

  • You should be receiving an individual GAP_DEVICE_INFO_EVENT for each advertisement or scan response recieved. Meaning you can't access both the adv data and scan rsp data of a peripheral in the same call back or pEvent data structure. There will be two GAP_DEVICE_INFO_EVENTs per (scannable) peripheral where the first will contain the adv data and the second will contain the scan rsp data (both will be accessed through pEvent->pEvtDat), which corresponds to the two packets you should rx. You can determine the packet type with the "eventType" field (check out GAP_ADVETISEMENT_REPORT_TYPE_DEFINES for the specific types).

    -Matt

  • Matt,

    just getting back to this issue.   Yes, that is what I was needing.  Thank you for your help.

    Thanks....