This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How can I measure the advertising intervals of a peripheral?

I would like to know how frequently my peripheral is sending advertising and data packets. I've tried using ble-sniffer-osx but it doesn't actually reveal any device names for some reason, so it's not trivial to use. Is it possible to do this using Xcode's Bluetooth Explorer utility to do this?

  • BLE devices are normally identified by 6-byte Adv. Address (MAC). By using good sniffer you can easily follow advertisers and deltas between packets they send (note that BLE broadcasting has some mandatory jitter from specification so you will wither "tip" the actual adv. interval or you will need some larger statistics to be "almost sure"). If you have problems to identify MAC address of your target (e.g. because it changes it to be pseudo-anonymous or because you have too many devices in the field) then moving to quieter place and using RSSI indication to see which is the closest device or at least which is moving when you move with your target should solve it.

    Update

    Some screenshots from nRF Connect mobile app (note that this applies only to Android version, iOS seems lacking this indication according to Petter). As you see beside graph view it computes delta between ADV events in list view for each advertiser (152ms in this case, I would guess real value is 150ms exactly):

    image description

    image description

  • You don't need a sniffer to check this. A very easy way to check the advertising interval is to use the nRF Connect app on your smartphone. when scanning for devices, the adverising interval will be listed together with the name of the device and RSSI.

  • Where though? I see the RSSI reading (usually some fluctuating number like -86 or something), but where do you see the actual advertising interval frequency? Is that the X axis at the top of the RSSI graph (maybe in seconds) ?

  • Thanks for the response. Do you happen to know of any examples in the NRF52 SDK that show an example of very frequent advertising or data packets being sent as a peripheral?

  • nRF Connect for Android shows this in the scan window, next to the RSSI. I don't think the iOS app shows it. Could you explain exactly what you want to achieve? You can configure the advertising interval, so you can select how often you want advertising packets to be sent out. Data packets is a bit more complex, but finding the connection interval isn't hard. See this. If you want to see what is actually happening on air you need to use a Sniffer. The best would be a commercial one, from for example Frontline or Ellisys. Or you can use our nRF Sniffer (it has some issues, but it is free)

Related