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.

CC2541 BLE pairing problem

Other Parts Discussed in Thread: CC2541, CC2540

Hi,

I am using CC2541 for development . I am facing one issue regarding pairing of bluetooth device.

I am setting pairing mode to "GAPBOND_PAIRING_MODE_INITIATE".and I am setting pass code.

I am also keeping "GAPBOND_MITM_PROTECTION" to 1. 

When device connects with my phone , it shows connected state and even if I enter wrong key it is still in connected mode. 

Do I need to change any other setting?

Anybody faced this issue?

  • Hi Maulik,

    If the phone is setup to not use MITM protection, it will not be used. Any way, it would be nice to see a sniffer capture of this communication. Could you provide that?

    Best Regards 

    Joakim

  • 2313.BLE_log_final.psd

    Hi Joakim,

    Thank you for your quick reply.

    I am attaching sniffer log here. Let me tell you scenario how sniff log has been captured.

    1. I have put device into advertising mode.

    2. ios app detects device and when I press 'connect device' it asks for pairing key (which is set to 123456).

    3. I entered 000000. But still it shows into connected mode and  posting data.

    kindly refer logs.

    Thanks.

  • Hi Maulik,

    That sniffer log only contains advertisement packets, the connection and pairing process are missing. Note that the sniffer only listens to one channel so if the connection is created on any of the other two, the sniffer will miss it. Theoretically, you have 33% chance of "catching" the connection. You could use three sniffers on the different channels or change the embedded firmware on the product to only advertise on one channel (the one you are sniffing on).

    Best Regards

    Joakim

  • Hi Maulik,

    You can also look at using advanced sniffers like the perytons smart for your development.

    Evaluation version is available for free download, and provides lot of features.

    http://www.perytons.com/bluetooth/products/peryton-smart#TextTop

    You will need 3 nos of CC2540 USB dongles, as joakim mentioned, to capture all the activity on the 3 advertising channels.

    Regards,

    Vijay

  • Hi Joakim and Vijayasarathy, 

    Thanks for reply. 

    I don't have 3 sniffer devices , so I would like to go for firmware changes, 

    I have changes macro "GAP_ADVCHAN_ALL" to  0x01 which is GAP_ADVCHAN_37. 

    It should be sufficient for advertisement on channel 37, right? 

    and When I try to capture logs from sniffer , only advertisement packet comes, No data packets. 

    I was able to capture data packets but tool crashes everytime, I get one or two data packet.

  • Hi Maulik,

    The Packet Sniffer should not crash, are you using the latest version?

    Best Regards

    Joakim

  • Yes, 

    I am using 2.18.1 on windows 7.