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: GAPRole_SendUpdateParam strange behavior

Part Number: CC2541
Other Parts Discussed in Thread: CC2540,

Hi!

I have my old project based on cc2541 and TI BLE stack 1.2.1 where GAPRole_SendUpdateParam used to change the connection interval during connection.

I've updated my project with TI BLE stack 1.4.2.2 and found strange behavior when GAPRole_SendUpdateParam is called.

Everything works fine when I'm truing to reduce the connection interval.

And nothing happens when I trying to increase it (GAPRole_SendUpdateParam called with the connection interval greater than the current).

Why is it happens and how can I avoid this?

Best regards, Sergey

  • What GAPRole are you using? What is the return status of the command?
  • Hi Tim!

    Thank you for your answer.

    GAPRole in this project is Peripheral Role.
    I'm using BTool for debug with default connection interval of 80 (100ms).

    Defines in the my project are:

    #define DEFAULT_DESIRED_CONN_TIMEOUT 100

    #define GAPROLE_NO_ACTION 0 // Take no action upon unsuccessful parameter updates

    When I called GAPRole_SendUpdateParam (0x0A, 0x0A, 0x00, DEFAULT_DESIRED_CONN_TIMEOUT, GAPROLE_NO_ACTION) for a first time after successful connection I'm getting return code 0. And in BTool window I can see:

    [43] : <Rx> - 10:34:49.322
    -Type : 0x04 (Event)
    -EventCode : 0x00FF (Event)
    -Data Length : 0x0B (11) bytes(s)
    Event : 0x0607 (1543) (GAP_LinkParamUpdate)
    Status : 0x00 (0) (Success)
    ConnHandle : 0x0000 (0)
    ConnInterval : 0x000A (10)
    ConnLatency : 0x0000 (0)
    ConnTimeout : 0x0064 (100)
    Dump(Rx):
    0000:04 FF 0B 07 06 00 00 00 0A 00 00 00 64 00 ............d.

    Later I call GAPRole_SendUpdateParam (0x08, 0x08, 0x00, DEFAULT_DESIRED_CONN_TIMEOUT, GAPROLE_NO_ACTION) and getting return code 0 again. And in BTool window I can see:

    [47] : <Rx> - 10:35:01.159
    -Type : 0x04 (Event)
    -EventCode : 0x00FF (Event)
    -Data Length : 0x0B (11) bytes(s)
    Event : 0x0607 (1543) (GAP_LinkParamUpdate)
    Status : 0x00 (0) (Success)
    ConnHandle : 0x0000 (0)
    ConnInterval : 0x0008 (8)
    ConnLatency : 0x0000 (0)
    ConnTimeout : 0x0064 (100)
    Dump(Rx):
    0000:04 FF 0B 07 06 00 00 00 08 00 00 00 64 00 ............d.

    And now I make a call GAPRole_SendUpdateParam (0x0A, 0x0A, 0x00, DEFAULT_DESIRED_CONN_TIMEOUT, GAPROLE_NO_ACTION) to increase a connection interval. I got return code 0 again. But nothing in BTool and connection interval is not changes.


    Such behaviour happens every time when requested connection interval is greater than current one.

    P.S. All was fine in BLE stack 1.2.1 I used before.

    Best regards, Sergey

  • Does anyone know how to work around this bug in the new TI BLE stack?

    Unfortunately TI support ignores such questions. :(

    The same unanswered question here https://e2e.ti.com/support/wireless_connectivity/bluetooth_low_energy/f/538/p/428931/1533354

    P.S. There are some parameters checking in GAPRole_SendUpdateParam and in gapRole_startConnUpdate later. But both of them are fine. In my opinion the problem is inside of GAP_UpdateLinkParamReq and it's function from binary library. :( 

  • Well the master needs to ultimately accept the parameter update so it's possible that your request is just being declined.  What is the master?

    Can you attach a sniffer capture with corresponding BTool log? Please ensure to include minimal functionality to display the issue in these.

  • Hi Tim,

    Have you tried to read what I wrote above?

    I'm using TI USB stick based on cc2540 and BTool.

    I do not have an opportunity to sniffer and capture BLE traffic.

    I do not understand why the customer must prove that the bug inside of your stack.

    I do not understand why you are wasting time of your customers again.

    This problem has been reported sometimes and it was absent in older versions of the stack.

    Carefully read all written above, and try to understand that the function call with the same parameters can be successful or not depending on the current connection interval.

    Have you tried to reproduce it at your site?

    Just try and you will be able to sniff and capture all the things that you need.

    P.S. It will be much more easier to find out a bug by myself and do not trying to get support from you. But unfortunately this bug is inside of TI binary library.

  • This functionality is highly dependent on the central device which you have provided no information about. This could easily be deduced from a sniffer capture.

    In the absence of a sniffer capture, I can try to reproduce this if you provide clear detailed, numbered, steps to reproduce, using TI hardware, and a list of minimal code modifications required.
  • My project is SimpleBLEPeripheral based.

    So, you can get SimpleBLEPeripheral and modify any characteristic write to call GAPRole_SendUpdateParam with new connection interval.

    That's all what you need.

  • This is not enough information to replicate. Please supply everything that was requested in my previous post.

  • Tim,

    6825.SimpleBLEPeripheral.zip

    It's a modified SimpleBLEPeripheral from 1.4.2.2

    1. Compile it for target "CC2541DK-MINI Keyfob"

    2. Flash to your KeyFob.

    3. Press "Advertise" button

    4. Connect to KeyFob by latest BTool

    5. Write 0x08 to handle 0x25

    6. Connection interval will be changed to 8

    7. Write 0x06 to handle 0x25

    8. Connection interval will be changed to 6

    9. Write 0x08 to handle 0x25

    10. Connection interval will not be changed.

    Is it clear enough?

    Best regards, Sergey

  • Tim, 

    Are you  reproduced this problem?

    Is it possible to get support from TI?

    Sergey