cancel
Showing results for 
Search instead for 
Did you mean: 

BLE central: connection timeout with sleeping peer device is not triggered by BLE stack, blocking all further connections

Shrikrishna
Associate II

Hi,

We are using BLE central stack,

Version: 1.17

Use case: BLE central on a WB55 node performs device discovery and tries to connect to a BLE device with random address. A typical good flow works very well, central connects and read out all characteristics. But as the BLE device is battery powered and sometime goes to sleep. When BLE device is in sleep mode (after advertising for certain duration) and if BLE central tries to connect this sleeping device, the connection timeout event (or any such event with HandleHciLeConnectionUpdateCompleteEvent) is not raised by stack. All further calls to API 

aci_gap_create_connection is returned with error 12 (means stack connect API is busy). The only option is to reset the MCU. 
 
Here are the input parameters to aci_gap_create_connection:
 

 

 

 

      auto peerAddress = RANDOM_ADDR;
        
        // Create connection parameters
        const uint16_t leScanInterval = 0x320;
        const uint16_t leScanWindow = 0x320;

        // Connection Interval parameters
        const uint16_t minConnectionEventLength = 0;
        const uint16_t maxConnectionEventLength = 0x280; // 400 ms

        // Terminate connection
        const uint8_t remoteUserTerminatedConnection = 0x13;

        uint16_t minConnIntMultiplier = 6;  // 7.5 ms
        uint16_t maxConnIntMultiplier = 6;  // 7.5 ms  
        uint16_t slaveLatency = 0;
        uint16_t supervisorTimeoutMs = 50;  // 500 ms

        aci_gap_create_connection(
            leScanInterval, leScanWindow, peerAddress, macAddress.data(), RESOLVABLE_PRIVATE_ADDR,
            minConnIntMultiplier, maxConnIntMultiplier,
            slaveLatency, supervisorTimeoutMs,
            minConnectionEventLength, maxConnectionEventLength);

 

 

 

 
1 REPLY 1
Jacob WOODRUFF
ST Employee

Hi All,

 

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

 

Regards,

Jake

ST Support