Send a response directly in the same "connection interval" in Bluetooth

Hello

For my application (which is based on the ble_thread_dyn_mtd_coap_cli example), I would like to be able to send a file (for an update) using bluetooth. To do this, I send a 100 byte data packet and wait for the acknowledgment before sending the next one.

I would like to send multiple packets (with responses) in a "connection interval" but by doing some tests, I notice that the responses are always sent in the following interval ...

In the following example, I would have liked to be able to send the reply (message number 7014) already at the time of message 7012.


Would it be possible to send a response directly in the same "connection interval"?

Thank you

Parents
  • Getting an application level ACK using a GATT procedure will not be possible in the same connection interval as there is not enough time for the response to get to the event before it closes (it has only 150us) and additionally the Radio buffer needs to be filled for the response before the event starts which would be impossible , so the short answer to your question is No. 


    However you are getting the Radio level acknowledgements for the Write Commands and the Handle Value Notifications and you can use them as acknowledgements.
    Handle Value Notifications will generate a BLE_GATTS_EVT_HVN_TX_COMPLETE  and Write Command will generate a BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE.

    This means that you can send a lot of your packets and then get the acknowledgement events as they arrive.  This will allow you to send a lot lot of packets in a single event and also get acks in the same event. Will this work for you ?

Reply
  • Getting an application level ACK using a GATT procedure will not be possible in the same connection interval as there is not enough time for the response to get to the event before it closes (it has only 150us) and additionally the Radio buffer needs to be filled for the response before the event starts which would be impossible , so the short answer to your question is No. 


    However you are getting the Radio level acknowledgements for the Write Commands and the Handle Value Notifications and you can use them as acknowledgements.
    Handle Value Notifications will generate a BLE_GATTS_EVT_HVN_TX_COMPLETE  and Write Command will generate a BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE.

    This means that you can send a lot of your packets and then get the acknowledgement events as they arrive.  This will allow you to send a lot lot of packets in a single event and also get acks in the same event. Will this work for you ?

Children
Related