How to do OTA firmware update through BLE?

Hi,

1- I want to know want the OTA firmware update, as I know with DFU we can only update firmware of BLE chip that is NRF 52480. But in my case, I want to update the firmware of my sensor microcontroller that is connected with BLE chip NRF 52480 through UART. How to do that?

2- How to use BLOB, is there any example?

3- In DFU, we need BLOB (correct me if I am wrong) but when I see DFU example ble_app_buttonless_dfu, their is no mentioning of blob. Please clear this confusion and answer my questions.

Parents
  • Hi Ayu7,

    First of all, if you are starting a new project, then please know that we recommend the nRF Connect SDK. The nRF5 SDK is in maintenance mode and will not receive new feature updates.

    1- I want to know want the OTA firmware update, as I know with DFU we can only update firmware of BLE chip that is NRF 52480. But in my case, I want to update the firmware of my sensor microcontroller that is connected with BLE chip NRF 52480 through UART. How to do that?

    I assume that you would like to use the nRF chip as an interface to download the data and then forward them to your sensor microcontroller. Is that correct?

    If so, this likely depends on how your sensor microcontroller can be updated. If you have the documentation of its DFU solution, you can implement a compatible DFU client on the nRF Application, that sends the necessary data over UART.

    2- How to use BLOB, is there any example?

    Could you please clarify what the "BLOB" that you have been referring to is? I don't think you are referring to blob simply as a chunk of data. Do you mean Binary large object?

    If you are talking about that, then we don't have any specific example for that. Most applications just divide the data into smaller chunks the size of a BLE GATT packet, and send it over one at a time.

    There are two examples that you might want to look at in any cases.

    The UART/Serial Port Emulation over BLE example demonstrates how to send arbitrary chunk of data and then route it to UART.

    The Experimental: ATT_MTU Throughput Example demonstrates how a large chunk of data is sent and received over multiple smaller chunks.

    3- In DFU, we need BLOB (correct me if I am wrong) but when I see DFU example ble_app_buttonless_dfu, their is no mentioning of blob. Please clear this confusion and answer my questions.

    The DFU solution in the nRF5 SDK v17.1.0 and relevant BLE protocol is documented here: https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_dfu_transport.html.

    From the documentation, you will learn that the data is not actually transferred to the ble_app_buttonless_dfu application, but to the bootloader application instead.

    Hieu

  • Thankyou for your response. So how for ble OTA DFU.zip file is needed in the same manner I need to upload zip file for microcontroller firmware dfu file by following these steps: https://infocenter.nordicsemi.com/pdf/nrfutil_v6.1.0.pdf?  Kindly confirm.  

  • I am afraid I don't fully your question. Could you please rephrase it?

  • Hi Hieu,

    1- For ble dk firmware update, through OTA, we generally upload a DFU.zip file. So, for updating the microcontroller firmware(OTA) through the BLE nrf device, do we need any other dfu file and if not, then how to do it?

    2- If we don't want DFU, then can we upload firmware on the BLE device and then through UART, transfer those files to a microcontroller? 

    So which one is the correct way of doing the firmware update of the microcontroller(OTA) bridge with ble nrf and how to do that? 

    Edit: So I got to know that I can also create Firmware update characteristics and in that I can send data. But how much does it generally take to send firmware data that can be 100kb or more? Or is there any other better way.

Reply
  • Hi Hieu,

    1- For ble dk firmware update, through OTA, we generally upload a DFU.zip file. So, for updating the microcontroller firmware(OTA) through the BLE nrf device, do we need any other dfu file and if not, then how to do it?

    2- If we don't want DFU, then can we upload firmware on the BLE device and then through UART, transfer those files to a microcontroller? 

    So which one is the correct way of doing the firmware update of the microcontroller(OTA) bridge with ble nrf and how to do that? 

    Edit: So I got to know that I can also create Firmware update characteristics and in that I can send data. But how much does it generally take to send firmware data that can be 100kb or more? Or is there any other better way.

Children
  • Hi Ayu7,

    Ayu7 said:
    1- For ble dk firmware update, through OTA, we generally upload a DFU.zip file. So, for updating the microcontroller firmware(OTA) through the BLE nrf device, do we need any other dfu file and if not, then how to do it?

    I have explained this in my first reply:

    Hieu said:

    I assume that you would like to use the nRF chip as an interface to download the data and then forward them to your sensor microcontroller. Is that correct?

    If so, this likely depends on how your sensor microcontroller can be updated. If you have the documentation of its DFU solution, you can implement a compatible DFU client on the nRF Application, that sends the necessary data over UART.

    The method is completely up to you. Nordic does not have an existing solution for this in the nRF5 SDK.


    Ayu7 said:
    2- If we don't want DFU, then can we upload firmware on the BLE device and then through UART, transfer those files to a microcontroller? 

    DFU stands for Device Firmware Update, which is a generic concept, not specific to Nordic products.

    I assume that by "if we don't want DFU," you mean "if you don't want to use the DFU solution in the nRF5 SDK." This solution does not work to update your other controller through the nRF chip. It is only for updating the firmware of the nRF chip.

    It is a fine approach to upload the firmware to the BLE device, and then transfer the firmware to another controller.


    Ayu7 said:
    Edit: So I got to know that I can also create Firmware update characteristics and in that I can send data. But how much does it generally take to send firmware data that can be 100kb or more? Or is there any other better way.

    Do you mean how much time? For that, I see there are some testimonies for the nRF5 SDK v15.x in the link below. The nRF5 SDK v17.1.0 should do equally well, if not better.

     Can the SDK15 BLE DFU speed improvements be backported to an SDK14 bootloader? 

Related