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: simpleBLEperipheral -- will not connect on busy networks

Part Number: CC2540

Using a raspberry pi to connect to CC2540.  It works fine in the lab, and environments with many other advertisers.

When put in an environment that has many bluetooth advertisers, can't connect to the cc2540, or very rarely connects.

Using the bluepy library on raspberry pi.

Any advice on why the busier network blocks the connection. I was expecting that once the advertising packet was seen, a connection could be made.

Only thing I can think of is that the network is crowded, but I still expected it would make a connection.

Are there parameters in the cc2540 that make it more favorable connect; are there parameters from the master side (pi) that might be more favorable to connect.

If I get a usb plug in bluetooth module (and don't use the rapsberry pi module), is there a model that might work better.

Thanks - Jim

  • Hi Jim,

    Are you able to scan and detect the CC2540 device?

    There are two reasons why the device would not be able to connect:

    1. Your central device is not seeing it in the scan results. When there are many devices some centrals will limit the number of scan responses that they queue up, if the CC254x's is not the first encountered, you may need to scan multiple times to detect it.

    2. The connect request sent form the central to peripheral is not received by the CC254x, this is unlikely.

    However, to determine more information, a sniffer capture is required. Do you have a sniffer available?
  • We definitely see it on the scan. The rssi is good, -42dbm. It works fine if we move the entire system to a conference room in the building.

    But on the main floor where we are operating, when I scan a see a constant stream of advertising devices.

    When we see our unit, we immediately do a connect. The server side hangs; I don't have a debugger on the cc2540 to see what it is doing. Eventually the scanner times out and rescans, finds it again, and the process repeats without making a connection in general.

    Every now and then we get a connection, but it is rare.

    I am wondering if the network being busy is causing an issue, and there are some retry counts or timeouts we need to increase in the device.

    I have a protocol scanner; I am not at the site, but can travel there to scan the connection.
  • Hi Jim,

    A CCDebugger and a BLE Sniffer will be critical for resolving this issue.

    The sniffer capture will be able to discern if the connection request from central to peripheral is acknowledged or missed.

    Have you tried re-sending the connect request if it is not received by the peripheral.