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 & CC2640] Central with multiple peripherals - Disconnects problem with reason 0x08

Expert 4001 points
Other Parts Discussed in Thread: CC2541, CC2640, CC2650

Hi experts,

Recently we were trying to change from CC2541 (Central role) to CC2640 (Central role too) to increase the number of connection simultaneously (we expect 6 to 8 SensorNodes).

So we started with CC2650 LauchPad for hardware, and “spp ble client” project sample combine with “Central to Multiple Peripherals Demo” sample, based on BLE Stack v2.1.1 for firmware. For the SensorNode, we keep using our custom board base on CC2541.

Unfortunately, the problem from this thread still remain. Beside that, I also met new problem when trying to define MAX_NUM_BLE_CONNS and HEAPMGR_SIZE to increase the number of connection simultaneously.

 

-        If I define MAX_NUM_BLE_CONNS=6 and HEAPMGR_SIZE=5556 (4096 + (730*2))

The 2 first connecting establishment is OK. But when I try to establish the 3rd connection, I didn’t receive GAP_LINK_ESTABLISHED_EVENT. I guess that’s not enough  HEAPMGR_SIZE.

-        Then if I define MAX_NUM_BLE_CONNS=6, HEAPMGR_SIZE > 6718; (exactly in my code), I get a error when build:

program will not fit into available memory.  run placement with alignment fails for section ".stack" size 0x400 .  Available memory ranges:

 

So I stopped with MAX_NUM_BLE_CONNS=6, HEAPMGR_SIZE = 6718 and test again. All 6 connections were established successfully. But after about 15 – 20 seconds, the last connection was terminated, and sometime, more then 1 left successful established connections were also terminated after that. The reason always is 0x08.

 

In summary, there are some questions that need your help to answer:

1. Where could the disconnected issue with reason 0x08 came from, the firmware, hardware, or both?

2. If I want to increase the number of connection simultaneously between a Gateway(CC2640 controlled by extenal MCU) and at least 6 sensor nodes:

a. The combination between “spp ble client” and “Central to Multiple Peripherals Demo” sample project is the right choice, or are there any better way?

b. How should I define the MAX_NUM_BLE_CONNS and HEAPMGR_SIZE(or anything else) to increase the simultaneous connection up do 8?

  • Hi,

    See responses below:

    1. The disconnect usually comes from the controller firmware. 0x08 means connection/supervision timeout.
    2a. I would probably just use the central to multiple peripheral demo since the spp ble client adds more memory especially due to the serial data interface.
    2b. 8 connections might not be possible depending on your application size, you will have to experiment different values to get optimum number of connections supported.

    Best wishes
  • Thanks for your help, Zahid.