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.

How can the "CC2540 USB Dongle" sniff a conversation between a BLE Central and a BLE peripheral?

Other Parts Discussed in Thread: CC2540

Hello,

I have a BLE Central and a BLE Peripheral and the CC2540 USB Dongle using the Smart RF Packet Sniffer. When the BLE Peripheral is advertising, I see all the advertisements in the "Smart RF Packet Sniffer", but, when the Central and Peripheral connect I don't see any of the packets between them thereafter.

How can I configure the "CC2540 USB Dongle with the Smart RF Packet Sniffer" to sniff a conversation between a BLE Central and a BLE peripheral?

Thank you,

Hector

  • Hello Hector,

    Welcome to the Forum!

    I have notice a similar thing using Windows XP.  You have to stop and start the Sniffer several times or start and stop the advertisements and then the connection will show up on the the sniffer screen.  The screen will stop the advertising when the connection is established.  When you terminate the connection, the advertisements will start again.

    There is probably a better solution out there.  Until then, the best way to solve it is to start and stop the advertisements until it displays the connected communications.  Restarting the sniffer sometimes allow you to see the communication between the devices.

    Thanks,

  • Hello,

    The same question was discussed several times in the forum. Adv packets are sent in three channels (37,38,39) and the sniffer sniffs the adv packets using only one channel which you can specify using the SW. (Radio Configuration -> Advertising Channel). Suppose that you choose 37; then you have 1/3 probabilty that you will sniff the connection packets. In order to make it %100, you should modify the source code of the peripheral by simply changing;

    In the void GAPRole_Init( uint8 task_id ) function;

      gapRole_AdvChanMap = GAP_ADVCHAN_ALL; -> gapRole_AdvChanMap = GAP_ADVCHAN_37;

    This should work. Let me know if it doesnt.

  • Well, thank you very much Cagatay.

  • Thank you greenja !!

  • Thanks a lot Cagatay !! This explanation is great. I'll give it a try and let you guys know my results.