CC2340R5: SimpleGattProfile_setParameter status returning as blePending

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi,

Currently I am working on basic_ble Peripheral profile project. And we are facing an issue when trying to send data from module to mobile continuously with the size of MTU excahnged size 247(mtu_value) after multiple packets transmission from the module, we are getting an status as blePending.

After this error occurs we are not able to connect or pair with the module and module requires an power restart to recover.

Status =  SimpleGattProfile_setParameter(SIMPLEGATTPROFILE_CHAR4, mtu_value,&uartReadBuffer[SentDataLen]); 

And here are the interval settings calling SimpleGattProfile_setParameter() with 50 milliseconds and tried with 100,200 milliseconds and Connection interval parameters image attached below.

Kindly help us to resolve the issues.

SDK Version : simplelink_lowpower_f3_sdk_8_10_01_02 (peripheral)

CCS version: CCS 12.7.1

Regards,

Vignesh.

  • Hi Vignesh,

    Thank you for reaching out. Can you try pausing the device execution after the blePending value starts appearing? Is the device hanging in icall_abort or in a fault ISR? it is possible we are trying to enqueue data faster than it can be sent given the connection parameters. Is the behavior seen if you modify the connection interval?

    Best Regards,

    Jan

  • Hi Jan,

    I have tried modifying  the connection interval still blePending is occurring. Where  sending data from module to mobile continuously with the size of MTU exchanged size 247(mtu_value) after multiple packets transmission from the module, we are getting an status as blePending.

    After giving 1 sec delay for each packet , randomly we are facing an blePending but module not entering into unknown state when the interval of 20 milliseconds calling SimpleGattProfile_setParameter(). If the delay more than 20 milliseconds module gets disconnect with the mobile.

    let us know how to overcome with this issue.

    Regards,

    Vignesh.

  • Hi Vignesh,

    Got it. Thank you for testing. To clarify, you are seeing blePending is being returned by SimpleGattProfile_setParameter()? I do not think it should be possible to see blePending be returned from this function. Is the GATTServApp_ProcessCharCfg() the one that is returning blePending? If so, then are you waiting for the previous notification to be sent before the next one is queued up?

    Best Regards,

    Jan

  • Hii Jan,

           We found that  GATTServApp_ProcessCharCfg() the one that is returning blePending. We are waiting for return status to be success to send an next packet to process but still we are getting an blePending status.

    Can you able to tell the what is the min wait time is required for multiple packets to process and let us know what is the best connection interval to be set for this condition.

    Thanks,

    Vignesh.

  • Hi Vignesh,

    The min wait time will vary depending on things such as BLE parameters, stack/heap availability, current tasks active, etc. That said, the amount of packets that you can enqueue before getting a BLE pending will depend on the max number of PDUs and the PDU size. Can you try increasing these in sysconfig to see if the behavior is impacted? I would start with setting them to the max value of 255 to start and later we can lower this value to something more reasonable.

    Best Regards,

    Jan

  • Hi Jan,

          Previously  Max Number of PDUs value by default is 5 and Max Size of PDU has set to 255.

     I have changed Max Number of PDUs to 255 and Max Size of PDU as 255 now while sending data we didn't getting an BLE pending status.

    Now setting an  Max Number of PDUs as 255 will encounter any issues in future?

    Thanks,

    Vignesh.

  • Hi Vignesh,

    Glad to hear we were able to resolve the blePending issue. I don't expect any issues to arise from having the max size and max amount of PDUs very large. It will increase the queue of the amount of ble events that can be queued up which may increase the peak size of the heap in the worst case.

    Best Regards,

    Jan