The best Bluetooth low energy sniffer tutorial (Advertisement Data)

Last Updated on

In the previous blog post we went over the different BLE sniffers available in the market and compared the pros and cons of each. In this video below we walk through a live demo of capturing BLE advertisements using the TI CC2540 USB Dongle BLE sniffer. We look at the different aspects of the captured advertisement data and understand each part.

Bluetooth low energy Advertisement Data

Packet number: the sequence of packets received by the sniffer.

Timestamp: (starting from 0) and the time difference since the previous packet was received.

Channel number: (depends on what channel you set in the Radio Configuration). The Access address will always be the same value (0x8E89BED6) according to the spec for advertisement packets.

Adv PDU type: there are 7 types including:

  • ADV_IND (0x00): Connectable undirected advertising which can be connected to by any BLE central.
  • ADV_DIRECT_IND (0x01): Connectable directed advertising which can be connected to by one specific Central.
  • ADV_NONCONN_IND (0x02): Non-connectable undirected advertising which cannot be connected to and cannot respond to a scan request.
  • SCAN_REQ (0x03): sent by the Central requesting a scan response (which is a way to send more data via advertising but the response is directed specifically to the requester).
  • SCAN_RSP (0x04): The scan response packet containing any additional info sent by the peripheral.
  • CONNECT_REQ (0x05): a connection request packet sent by the Central to connect to a specific peripheral.
  • ADV_SCAN_IND (0x06): Scannable undirected advertising which cannot be connected to but which can respond to a scan request.

Adv PDU Header: contains the following elements:

  • Type: is the value indicating the type of advertisement which corresponds to the type listed under “Adv PDU Type”.
  • TxAdd: Indicates whether the advertiser’s or initiator’s (depending on the type of advertisement packet) address is public (0x00) or random (0x01). For example, for ADV_IND, ADV_DIRECT_IND, ADV_NONCONN_IND, SCAN_RSP, and ADV_SCAN_IND it refers to the advertiser’s address whereas it to refers to the initiator’s address in the case of SCAN_REQ and CONNECT_REQ.
  • RxAdd: Indicates whether the address is public (0x00) or random (0x01) depending on the type of advertisement packet. Just like TxAdd, but the opposite. It only exists for the types ADV_DIRECT_IND, SCAN_REQ, and CONNECT_REQ since for the other types the Initiator role does not apply.
  • PDU-Length: The length of the PDU which includes the data following the header.

AdvA: this is the advertiser’s address and is unique per device.

AdvData: this contains the individual bytes being advertised by the peripheral device.

CRC: This is the CRC value transmitted in the packet and originally calculate by the transmitter device.

RSSI: Received signal strength indicator as reported by the BLE sniffer transceiver.

FCS: Frame check sequence which indicates whether the CRC calculated by the software matches the CRC transmitted by the BLE device under test.

Summary

  • We went over how to capture BLE advertisement data using the TI BLE sniffer.
  • We also went through a live demo of capturing the data and explaining the different elements.
  • I hope you found this video useful. In the next video we’ll go over how to follow connections between a central device and a peripheral device and look at the different packet information being displayed by the software.

Others in the series:

Part 1: How to use a BLE sniffer without pulling your hair out (comparison of BLE sniffers) 

Part 3: How to use a BLE sniffer to reverse engineer a Bluetooth Lightbulb and capture Connection data (Video)

2 Comments

  1. Igor Ganapolsky on July 31, 2017 at 3:33 pm

    I really wish this blog series was available when I was developing a BLE application in 2016. I’ve battled with the Adafruit BLE sniffer on linux, and couldn’t make sense of the data (especially encrypted). Also, integration with Wireshark was tricky. Thank you for explaining these tools better!

    • Mohammad Afaneh Mohammad Afaneh on July 31, 2017 at 5:56 pm

      Thanks for your comment, Igor. I’m glad you’ve found the posts useful!

Leave a Comment