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.

BLE stack 1.4.1 Multiple connection issue

Other Parts Discussed in Thread: CC2541S

I recently ported my code to the new 1.4.1 BLE stack. I am working with CC2540s and CC2541s. My application code for my central device listens and tries to connect with multiple peripherals. The code worked fine with BLE stack 1.4.0. My applications scans for advertisers and once if finds one it connects and then scans for more. What I have noticed with the 1.4.1 stack is that once I connect to a peripheral I no longer receive any GAP_DEVICE_INFO_EVENT events. But as soon as I close the existing connection, they start coming in again. I am assuming that I am missing some config setting somewhere or something. Any help would be great.

Thanks

  • You'll need to provide some more debug information. Are you progressing through the GAP state machine as expected? What event are you receiving instead of GAP_DEVICE_INFO_EVENT? Have you verified the device starts to scan properly?
  • Thanks for the reply tim.

    Yes, I do belive that I am progressing through the state machine correctly. 

    At startup I get the GAP_DEVICE_INIT_DONE_EVENT

    Then I start scanning. The call to GAPCentralRole_StartDiscovery() returns success.

    Then I get GAP_DEVICE_INFO_EVENTS for each of my advertising peripherals.

    Once the scan is done I get GAP_DEVICE_DISCOVERY_EVENT. At this point I establish a connection with the first device in my list.

    I get the GAP_LINK_ESTABLISHED_EVENT.

    Then if there are other devices in my list I will attempt to connect to them else I start scanning again. 

    This time when I scan i get SUCCESS from GAPCentralRole_StartDiscovery() but I do not get any GAP_DEVICE_INFO_EVENTS.  

    Then once the scanning period is over I get the GAP_DEVICE_DISCOVERY_EVENT, but there are not devices in my list to connect to because I did not see and GAP_DEVICE_INFO_EVENTS.

    I know my other device is out there because my scanner sees the advertisement packets. 

    Also if I happen to find more than one device in the first scan, I will try to connect to that second device and the GAPCentralRole_EstablishLink() returns SUCCESS but then I never get a GAP_LINK_ESTABLISHED_EVENT. So the connection never starts. 

  • This topic is being taken up again here: e2e.ti.com/.../1724219
  • I do not have permission to view the above link provide. How may i get to see this?