Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

OTA over serial failure| sdk 15.2

Hello Everyone,

I am using nrf52832 and sdk 15.2 for ota over serial. I have made bootloader for OTA over UART and tested same with nrfutil using my dfu package file. firmware is upgraded successfully and  working fine.

Now I need to upgrade firmware using host MCU. I tried sending dfu package file( .zip ) to nrf52832 over UART using slip librairy to upgrade firmware but it is not working.

Is there any compulsion to send Ping packet, PNR, MTU Packet, init packet, application and bootloader separately over UART?

Can we send directly dfu package created through nrfutil to nrf52832 from other MCU over UART?

Kindly suggest me right approach.

Parents Reply Children
  • Then you need to follow the same behavior as nrfutil does. This protocol is described in the documentation on infocenter here and here, and probably more in detail in the github repository for nrfutil

    That are the protocols that you need to use to transfer a new application to the nRF via the serial bootloader.

    BR,
    Edvin

  • I am following UART DFU Master code given here and implemented but not getting results.

    is there any documentaion for the same code?

    I am using baud rate 115200, HW flow control disabled. sending image.hex file as per MTU size.

  • Can you describe for me how you proceeded? Please note that this is not an official example from Nordic. You can use it as a reference, but there is no guarantee that it works. You should really familiarize yourself with the uart protocol that nrfutil uses, and understand what is happening in the example that you link to.

     

    Somesh Burkule said:
    but not getting results.

     What is happening? Does it run at all? does it start the DFU? Does it finish?

    does it work if you transfer the same image via nrfutil?

    BR,

    Edvin

  • I have made code in c same as given example. first sending init packet and then image but not getting any response from nrf. I also written simple UART ping packet and sent over UART but receiving garbage data continuously. 

    As I uploaded dfu package through nrfutil it works.

    Can we send directly DFU package file through UART?

  • Somesh Burkule said:
    Can we send directly DFU package file through UART?

     

    You need the init packet first, if that was the question.

    I suggest that you rather dig into why it doesn't respond to the ping request. Have you tried to perform the DFU with different number of --verbose in the command? It will print more info the more "--verbose" commands you use in the DFU command.

    e.g.:

    nrfutil --verbose --verbose --verbose --verbose dfu serial -pkg dfu_image.zip -p COM48 -b 115200

    will print all the data going over the UART.

    Have you tried to analyze the UART coming from your master? Is there any data on the line? Is it anything coming back on the UART RX? Are both sides using the same baudrate?

    BR,

    Edvin

Related