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.

problems with reconnecting with BLE after disconnecting

Other Parts Discussed in Thread: CC2540

I am currently using the cc2540 chip with BLE stack 1.4.1. I have modified the HIDEmuKbd demo.

I am facing issues upon leaving the range of the device and reconnecting with my PC when I return. I have my bluetooth settings open and it will repeatedly disconnect and connect while at other times, a stable connection will persist. This occurs even in close proximity with the device. 

I was wondering if anyone had any solutions or ideas what's causing the problem. 

  • Hello,

    I would start by taking sniffer traces to see why it's disconnecting in the first place, that will tell you where to start looking. Also, is this with your custom HW or TI Reference HW? Antenna layout issues are one of the most common RF issues related to range / connection stability on custom HW.

    Best wishes
  • Thanks for the response. We are using custom hw so I can see how range might be an issue, but what I've noticed after doing some tests and narrowing down the problems is that after the initial pair, if I turn off my pc's Bluetooth and then re-enable it, my paired PC takes forever to actually connect back to the device. In the meantime, the device is available to be paired with any other product (and can successfully pair with another device), so I know it is advertising.

    (I've done these tests within close proximity of the device and the initial pair-connect is pretty stable) I mainly seem to have trouble reconnecting within an appropriate amount of time after disconnecting.

    I was wondering if there is a bug within the stack that prevents proper authentication of a previously paired device or if there might be another issue?

    -Lewis

  • Hello Lewis,

    It most definitely could be a bug in the stack - on the PC side. Without a proper BLE air sniffer trace, it's hard to do further analysis.
    Also, just for clarity, when you say "pair" do you me connection or Pairing/Bonding (LE Security)?

    Best wishes
  • Hi,

         I actually figured out the problem with our code. We had to change the battery settings from limited to general to keep our advertising on forever. We aren't using a battery and our connections were time sensitive, but this seems to have resolved our reconnecting issues.

    Thanks for the help.

    -Lewis

  • Thanks for letting us know that it's working!

    Best wishes