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.

CC2652R7: Reducing the Number of Max Connections causing problems

Part Number: CC2652R7
Other Parts Discussed in Thread: SYSCONFIG

Good Afternoon,

    So when I try reducing the number of maximum connections I can't find the device anymore in any BLE app. Is there anything I need to change when reducing the number of maximum connections? I'm using SDK:7_10_01_24 and using project zero.

Regards,
Kenneth Thomas

  • Hello Kenneth,

    Thanks for reaching out.

    Where are you modifying the max number of connection parameters?

    You can try changing this using sysconfig. I think by default this parameter is set to 2 in project zero. When set to 1 the SimpleLink Connect app can still successfully discover it and generate a connection, as expected.

    Hope this helps.

    David.

  • Hey David,

    I was also able to connect to the device however, once I disconnected from the device and tried to reconnect I wasn't able to rediscover the device unless I reset it.

    Regards,
    Kenneth

  • Hello Kenneth,

    I see, this is happening for 1 connection because advertisement is not being enabled again after a connection has been established. You can see this inside project_zero.c, specifically the ProjectZero_processGapMessage function. I would suggest adding the following evaluation inside the GAP_LINK_TERMINATED_EVENT case.

    case GAP_LINK_TERMINATED_EVENT:
    {
        gapTerminateLinkEvent_t *pPkt = (gapTerminateLinkEvent_t *)pMsg;
    
        // Display the amount of current connections
        Log_info0("Device Disconnected!");
        Log_info1("Num Conns: %d", linkDB_NumActive());
    
        if(linkDB_NumActive() < MAX_NUM_BLE_CONNS)
        {
            // Start advertising since there is room for more connections
            GapAdv_enable(advHandleLegacy, GAP_ADV_ENABLE_OPTIONS_USE_MAX, 0);
        }
    . 
    .
    .

    Please let me know if that helps.

    David.

  • Thanks, David! That fixed the issue.