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.

CC2340R5: Connection Parameter Update

Part Number: CC2340R5

Tool/software:

Hi,

CCS version : 12.7.1

SDK version : 8.10.01.02

Project : basic_ble

sysconf:
Enabled Peripheral + Central roles.

I connect the device to the Central.
After connecting, I perform Connection Parameter Update.

// Set low speed
gapUpdateLinkParamReq_t params;
params.connectionHandle = gattMsg->connHandle;
params.connTimeout = 3200;
params.intervalMin = 3200;
params.intervalMax = 3200;
params.connLatency = 0;
status = GAP_UpdateLinkParamReq(&params);

After execution status = SUCCESS.

1) I monitor the frequency of Connect by power consumption.

1- Connecting the device to Central
2- Periodic connection check (100мс)

If you don't call Connection Parameter Update after connecting, nothing changes.

2) For some reason, after performing Connection Parameter Update, there are no events, both for confirming changes and for canceling them.



  • Hi,

    Thank you for reaching out. We will take a look at this and get back to you as soon as possible.

    Best Regards,

    Jan

  • Hello Ivan,

    I am not quite sure I understand the problem you are describing.

    1. When in your energy profile diagram are you calling GAP_UpdateLinkParamReq()? Is the section 1 before the connection has been established?
    2. Do you mean that after executing GAP_UpdateLinkParamReq(), you don't receive a BLEAPPUTIL_LINK_PARAM_UPDATE_EVENT?

    BR,

    David.

  • Hello David,
    To control Connection Parameter Update I use the STM32CubeMonitir-Power program.
    1) I connect the device - marked on the screen as 1.
    2) I receive the BLEAPPUTIL_LINK_ESTABLISHED_EVENT event - marked as 2. I observe a frequency of 100 ms.
    3) After receiving the BLEAPPUTIL_LINK_ESTABLISHED_EVENT event I call GAP_UpdateLinkParamReq. I observe a frequency of 4 sec.

    Often the connect frequency remains unchanged at 100ms.
    Since my device is powered by batteries, energy consumption is very important to me.
    Therefore, I need to check that the new parameters have been installed.
    But there is no event about parameter changes, and there is also no event about the failure to change the parameters.

  • Hello Ivan,

    Could you please confirm your connection handler is subscribed to the GAP_LINK_PARAM_UPDATE_EVENT or BLEAPPUTIL_LINK_PARAM_UPDATE_EVENT (in the bleapp util context)? Then I would expect an event of type BLEAPPUTIL_LINK_PARAM_UPDATE_EVENT to be triggered inside the Connection_ConnEventHandler callback function. Once inside you can parse the incoming data such as gapLinkUpdateEvent_t *pPkt = (gapLinkUpdateEvent_t *)pMsgData; and check the status code of the structure. Could you please check if you able to reach this point?

    BR,

    David.

  • Hello David,



    I don't get to the breakpoints (line 179, 195).


  • Hello Ivan,

    Thanks for confirming this. There are some actions I would suggest:

    1. Use the function BLEAppUtil_paramUpdateReq() or a similar implementation where you verify that the connection is active before calling GAP_UpdateLinkParamReq() just for sanity check. Your parameter update structure should have a structure like this (you can get the connectionHandle from the linkDB_GetInfo()).
        gapUpdateLinkParamReq_t pParamUpdateReq =
        {
         .connectionHandle = xxxx,
         .intervalMin = xxxx,
         .intervalMax = xxxx,
         .connLatency = xxxx,
         .connTimeout = xxxx
        };
    2. Make sure you are calling the Update parameter request withing the BLE context, I dont see where in the code you are calling the GAP_UpdateLinkParamReq, from what you mentioned it is called after receiving a BLEAPPUTIL_LINK_ESTABLISHED_EVENT.
    3. Do you have a Bluetooth sniffer we can use to understand what is happening over the air?

    BR,

    David.