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.

CC2540 BLE Sniffer - How to sniff correctly?

Other Parts Discussed in Thread: CC2541, CC2540

Hi guys

I have some trouble with the CC2540 BLE Sniffer. My problem is, that i don't exactly know how the settings should be, that i can sniff the communication between my iPhone(Multitool App) and the CC2541 Keyfob. If the Keyfob is looking for a device I can sniff some data, but as soon as I connect it with my iPhone, there is nothing more sniffed. But I think after connecting if I press the buttons and they're recognized in the app or if I set the alert in the app and the Keyfob makes sounds, there should be some communication sniffed. Or am I wrong?

The image shows what is sniffed while the Keyfob is looking for a device.

Thanks for your help

Regards

Cédéric

  • Hi Cederic,

    The sniffer can only sniff on one channel of the three advertising channels. If the connection is created on any of the other two, you will miss establishment and thus never be able to see more packets (as Bluetooth low energy uses frequency hopping and the channel map is distributed at connection establishment).

    Either you try to sniff the other channels and hope the connection will be created there, or you can hack your keyfob implementation to only advertise on one channel (which you are sniffing).

    There are several threads on this forum about this and you can also read more here 

    Best Regards

    Joakim

  • Hi Joakim

    I have now read out the IEEE Address of my Keyfob to filter its packages out. This works but only when the Keyfob is advertising(the red LED is blinking fast). My problem now is that if I connect the Keyfob with the TI BLE Multitool App on my iPhone, it won't find packeges anymore.

    Do I need an other advertising Address in case the Keyfob is connectet to the iPhone, to see the packages sent between the iPhone and the Keyfob?

    Best Regards

    Cédéric

  • Hi Cederic,

    The sniffer is probably simply missing the connection request. You can only sniff one of the three adv channels with the TI Sniffer. You can either try another channel (TI Sniffer: Radio Configuration -> Advertising Channel) or you can change your keyfob software to only advertise on the specific channel you are advertising on. This is done by something like this;

    uint8 channelsUsed = HCI_ADV_CHAN_37;  //HCI_ADV_CHAN_ALL 

    GAPRole_SetParameter(GAPROLE_ADV_CHANNEL_MAP, sizeof( uint8 ), &channelsUsed );

    Best Regards

    Joakim