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.

RTOS/LAUNCHXL-CC26X2R1: Can't connect to peripheral (Project Zero) after reaching maximum number of connections and disconnecting one or more devices.

Part Number: LAUNCHXL-CC26X2R1


Tool/software: TI-RTOS

Hello!

I'm facing a problem where I can't connect to a CC26X2R1 Launchpad Rev. 1.0.1 running Project Zero from simplelink_cc26x2_sdk_2_20_00_36 after having reached the maximum number of connections and having closed 1 or more of the connections.

Steps to Reproduce

Setup:

  1. Take a CC26X2R1 Launchpad Rev. 1.0.1;
  2. Open Project Zero from simplelink_cc26x2_sdk_2_20_00_36;
  3. Modify MAX_NUM_BLE_CONNS to 2 (since I don't have 8 devices available to connect);
  4. Build and Flash the CC26X2R1 Launchpad Rev. 1.0.1 (from step 1);

Experiment:

  1. Connect MAX_NUM_BLE_CONNS (in my case, 2) devices to your CC26X2R1 Launchpad Rev. 1.0.1 running Project Zero from simplelink_cc26x2_sdk_2_20_00_36;
  2. Disconnect one of the connected devices (observe that the CC26X2R1 Launchpad Rev. 1.0.1 does not start advertising again);
  3. Try to reconnect to the CC26X2R1 Launchpad Rev. 1.0.1 (Connection fails, even though the device has less than MAX_NUM_BLE_CONNS connections).

How can I solve this problem? Is this a problem in the Bluetooth Stack or is it a problem in Project Zero?

  • Hi,

    Were you connected via a serial terminal? The out of the box project zero, once you’ve connected the max number and disconnected one, you need to tell the device to re-enable advertising via the serial terminal menu that the project prints over a COM port.

  • Aren't you talking about the Simple peripheral project? The project zero does not display any menu via serial whatsoever. It shows logs instead.

  • Yes. I was connected via a serial terminal to the board. The only thing I see there is a log. Something like the following:

    #000001 [ 0.098 ] INFO: (led_service.c:221) Registered service, 5 attributes, status 0x00
    #000002 [ 0.098 ] INFO: (button_service.c:260) Registered service, 7 attributes
    #000003 [ 0.099 ] INFO: (data_service.c:239) Registered service, 6 attributes
    #000004 [ 0.100 ] INFO: (project_zero.c:684) Registered OAD Service
    #000005 [ 0.100 ] INFO: (project_zero.c:2906) Left button not held under boot, not reverting to factory.
    #000006 [ 0.100 ] INFO: (project_zero.c:2908) Right+Left button not held under boot, not erasing external flash.
    #000007 [ 0.100 ] INFO: (project_zero.c:702) OAD Image v0001
    #000008 [ 0.100 ] INFO: (led_service.c:237) Registered callbacks to application. Struct @20002720
    #000009 [ 0.100 ] INFO: (button_service.c:278) Registered callbacks to application. Struct @20002710

    ...

  • Hi Arthur,

    Try adding the following to the GAP_LINK_TERMINATED_EVENT in project_zero.c::ProjectZero_processGapMessage()

            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);
            }