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.

CC2540EMK-USB: How to decode data from advertised packet obtained after sniffing using cc2540 usb dongle on TI smart RF Packet Sniffer BLE Software

Part Number: CC2540EMK-USB
Other Parts Discussed in Thread: CC2540

Hi,

I am sniffing packets of advertising ble peripherals using cc2540 usb dongle with TI smart RF packet sniffer BLE 
but I am not able to decode the data advertised
please someone help how to decode that data

  • PFA The Attached Screenshot.

  • Hello,

    Please refer to the TI Packet Sniffer user guide on the TI BLE Wiki under Development Tools.

    The sniffer provides protocol packets which you must decode by referring to the Bluetooth core specification.

    Best wishes
  • Do you mean the data section of each advertisement?  The sniffer is displaying the transmitted bytes as hex, you can try doing a simple lookup using a hex-ascii converter but for a lot of devices the advertised data might be something else altogether (could be numbers for example).  As a developer you are free to throw anything you like into the AdvData part of the packet, it's up to whoever is listening to know what the payload represents.  For what it's worth, in the BLE stack in RTOS the device info message is presented back to you as this struct:

    typedef struct
    {
    osal_event_hdr_t hdr; //!< GAP_MSG_EVENT and status
    uint8 opcode; //!< GAP_DEVICE_INFO_EVENT
    uint8 eventType; //!< Advertisement Type: @ref GAP_ADVERTISEMENT_REPORT_TYPE_DEFINES
    uint8 addrType; //!< address type: @ref ADDRTYPE_DEFINES
    uint8 addr[B_ADDR_LEN]; //!< Address of the advertisement or SCAN_RSP
    int8 rssi; //!< Advertisement or SCAN_RSP RSSI
    uint8 dataLen; //!< Length (in bytes) of the data field (evtData)
    uint8 *pEvtData; //!< Data field of advertisement or SCAN_RSP
    } gapDeviceInfoEvent_t;

    So for the AdvData portion of the bluetooth sniffer, you are relying on dataLen / pEvtData representing the AdvData field shown in the sniffer.

    In our app (as an example) we throw some special sauce into that field which causes something to occur on an observer looking for that particular thing, but it would make no sense if you just looked at the packet sniffer log.