This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Slow master DFU implementation over BLE

Hello,

I am looking for some tips to speed up a DFU transfer.

I have 2 BLE, I implemented a DFU master in the first one using SDK11.

Transfer duration is about 3mn30s (.bin is 180ko), too long compared to Nordic mobile App DFU (less than one minute).

For writing to DFU Packet characteristic, (WriteWithoutResponse required), I use the following :
            msg->req.write_req.gattc_params.write_op = BLE_GATT_OP_WRITE_CMD;

Then, I send next byte using BLE_EVT_TX_COMPLETE event in my custom_service_on_ble_evt(ble_ows_c_t * p_ble_ows_c, const ble_evt_t * p_ble_evt) function.

Do you know why the transfer is slow ?

Thank you

Best regards

Parents
  • Hi,

    It could be several things, but the first thing I would check is the bandwidth configuration of the nRF that is acting as DFU master and also observe the link with a sniffer. How many packets is transmitter per connection event?

  • Hello,

    I do not understand what to check. When you said check bandwidth config, where is it setup ? I write my app from an hrs example (central side). 

    Also, how to check the number of packets per connection event? Thks

  • Hi,

    Vincent Smf said:
    I do not understand what to check. When you said check bandwidth config, where is it setup ? I write my app from an hrs example (central side). 

    If still using SDK 11 with a version 2.x.x SoftDevice, you use the options API to set the bandwidth configuration (search for "BLE_CONN_BW_HIGH" here to see an example of that.

    Vincent Smf said:
    Also, how to check the number of packets per connection event? Thks

    You need to use a sniffer to see this clearly.

    I cannot say for sure if this is the issue,  but if you check with a sniffer, then we would know more. Another potentially relevant parameter is the packet receipt notification (PRN) in the DFU protocol. Do you by any chance set the PRN to 1 in the "slow" DFU master implementation?

Reply
  • Hi,

    Vincent Smf said:
    I do not understand what to check. When you said check bandwidth config, where is it setup ? I write my app from an hrs example (central side). 

    If still using SDK 11 with a version 2.x.x SoftDevice, you use the options API to set the bandwidth configuration (search for "BLE_CONN_BW_HIGH" here to see an example of that.

    Vincent Smf said:
    Also, how to check the number of packets per connection event? Thks

    You need to use a sniffer to see this clearly.

    I cannot say for sure if this is the issue,  but if you check with a sniffer, then we would know more. Another potentially relevant parameter is the packet receipt notification (PRN) in the DFU protocol. Do you by any chance set the PRN to 1 in the "slow" DFU master implementation?

Children
Related