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: bluetooth answer slow

Part Number: CC2541

app send message to ble device (write character), device answer (notify) very slow,  average 150-200ms,   is it normal? 

  • It depends on many things such as the connection interval and the processing that the app is doing. So yes, this could (and probably is) entirely normal.

    Please provide some more information about what you are doing. What software / hardware? What connection interval? Really any more information would be better.
  • DEFAULT_DESIRED_MIN_CONN_INTERVAL 80

     DEFAULT_DESIRED_MAX_CONN_INTERVAL 80

     DEFAULT_DESIRED_SLAVE_LATENCY 0

     DEFAULT_ENABLE_UPDATE_REQUEST TRUE

    android phone 6.0/7.0 several test the same result.

    hardware: CC2541, minimum system board,  signal strength very good.  we are testing it on desk, distance 1 meter.

  • also tested on android 8.0 phone, the same.
  • Well these defines are just parameters from the peripheral side. However, the central side (the phone) is in charge of setting the connection interval and accepting parameter updates.

    I'm still not even sure what delay you are referring to. Is this the full round-trip time, the time for the notify to be sent after receiving the GATT write, or something else.

    In any case, assuming that the defines you posted are actually being used, then yes I would expect a 200 ms round-trip time.
  • it is the time app recorded, between write to get notification.

    200ms is too slow, how to speed it?

  • hey dsp999

    Did you check the PERIODIC_EVENT_PERIOD ? Is it modified or default 5000 ms ?

    regards
    sumanth
  • searched and not found this parameter "PERIODIC_EVENT_PERIOD".

  • hey dsp999


    #define SBP_PERIODIC_EVT_PERIOD 100

    You will find the above macro in the simpleBLEperipheral.c. It defines the time for occurring periodic event. I defined 100 where it indicates 100 ms. The default value will be 5000 ms as per CC2541 BLE_software_developer pdf. This is called in SimpleBLEPeripheral_ProcessEvent in simpleBLEperipheral.c file

    Regards
    sumanth
  • There are many variables here that you can change.
    1. Connection interval. If you use a shorter connection interval, you will increase throughput.
    2. Application processing delay. I don't know what application you are using but you should ensure that it is sending the response as soon as possible.
  • have tested different interval, not get better result.   for example, small interval, will get lower delay for some types of phone, but higher for some other. 

    application no delay, directly respond without process.