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.

Scanning the Advertisement Data - CC2541 Mini DK keyfob

Other Parts Discussed in Thread: CC2541

Hi,

I am using the Smart RF Packet Sniffer to capture the data packets but it only allows to read the UUID and not the values contained in the UUID. I am curious if there is a software tool to read the advertisment data contained in the UUID before the connection is established? Once the connection is established the BTool can be used to read the UUID values. Any comments?

Thanks!!

  • Hello Mohmmad,

    That is something that I would have to investigate when I'm at the PC.  From what I remember, the advertising data is available before the connection is made in Packet Sniffer.  Are all the parameters that you can view highlighted?  I thought when you open it the default was that all parameters are viewable.

    In BTool you can go to the Adv. Command tab and read all the GATT and HCI values.

    Thanks,

  • Hi Greenja,

    Thanks for your mail. I have tried both methods earlier and I am still unable to read the advertisement data. The packet sniffer is able to see the UUIDs but not the data. Could you please check at your end if you are able to read the data. I really appreciate it.

    Thanks,

    Anas

  • Hello Anas,

    I have checked and verified that Packet Sniffer shows the advertisement data by using the KeyFobDemo project.  You can see in the image that the AdvData corresponds to the advertisement data for the KeyFob.

    If you read the values in reverse order you will see that:

    04 18 = 1804 -> Tx Power

    02 18 = 1802 -> Immediate Alert

    03 18 = 1803 -> Link Loss

    Verify with the KeyFobDemo.  I do not have the CC2541, but the demo code for it should produce the same thing.  In Packet Sniffer in the Select Fields, highlight All the fields.

    Thanks,

  • Thanks Greenja!! That's understood and it works the same way for me. The advData is showing the UUID of the services defined as the advertData. Once the connection is established the characteristic values associated with the UUID can be read, but I am curious if I have to simply broadcast the characteristic values in the advertisement data how can I do that for example the actual battery level between 0 - 100%. For example, BATT_LEVEL_UUID can be defined in the GAP_ADTYPE_MANUFACTURER_SPECIFIC but how to broadcast the actual level instead of the UUID?

    Best,

    Anas

  • The battery level is being broadcast every 10 seconds.  If you want to see it then look for the event that is occurring every 10 second.  Or change the BATTERY_CHECK_PERIOD  to 1000 and you will see it appear every second.

    The _ReadAttrCB and _WriteAttrCB are where the transmissions take place.  Do a quick review of the GATT profile in the Software Developers User Guide swru271d.pdf or the GATT_Fundamentals.pdf found on www.bluetooth.org.

    Thanks,

  • Thanks Greenja!! Finally I was able to include the battery level in the advertData by defining it as MANUFACTURER SPECIFIC ADTYPE and dynamically updating it as discussed in http://e2e.ti.com/support/low_power_rf/f/538/p/72681/807387.aspx

    Best,

    Anas