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.

  • Hi @,

    As you said, by default this settings are enabled.

    I have compiled the code in SES and flashed in DK board to check whether it is working or not.

    I have opened RTT viewer and connected to board.

    Now I want to start dfu using nrfutil. right? and I'll get backend logs on rtt viewer.

    Please tell me how?

  • Hello ,

    Thank you very much for your support. OTA over serial is sucessfull. Relaxed

    The problem was in the init packet. I had used softdevice.dat file for init packet. I converted this file into hex by online hex converter. now I used application.dat file for the init packet and sent over serial and after that sent app file and OTA worked.

    Can you please tell me how to make init packet. please share init packet structure. I checked nrfutil code but its quit confusing for me. I have sent following packet.

    uint8_t init_packet1[] = {8, 10, 67, 8, 1, 18, 63, 8, 3, 16, 2, 26, 2, 175, 1, 32, 0, 40, 0, 48, 0, 56, 196, 93, 66, 36, 8, 3, 18, 32, 14, 112, 16, 50, 29, 176, 115, 77, 235, 99, 214, 61, 143, 198, 237, 176, 123, 34, 183, 203, 209, 236, 252, 234, 62, 106, 216, 241, 146, 51, 178, 154, 72, 0, 82};
    uint32_t init_packet1_len = 65;
    uint8_t init_packet2[] = {8, 4, 8, 1, 18, 0};
    uint32_t init_packet2_len = 6;

    Thanks a lot again!!

    Regards,

    Somesh

  • Hello ,

    I have a problem while upgrading firmware. I am upgrading firmware by sending init packet and then app file serially. In some condition init packet is sent successfull and executed using ( 0x04 ) command but while sending app file due to some reason not executed successfully and OTa over serial fails. 

    after that I tried again to do the same but init packet is not getting executed successfully becuase it was done before. so my question is, Is there any way to reset nrf bootloader so that after if ota fails then second time bootloader should start again( erase all files) from init packet.

    Please help me to handle this.

    Awaiting your quick response.

    With warm regards,

    Somesh Burkule

  • Hello,

    I am sorry. I didn't see this until now. When a message is marked as a "verified answer", it no longer pops up in the queue. Did you manage to generate the init packet?

    Do you know why the init execute command fails? Where was it "done before"? I didn't understand that part. 

    Could the problem be that you don't use Flow Control on the UART? Or do you use flow control?

    BR,
    Edvin

Related