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

DFU compatibility for a mesh example

Hi,

I am interested to know how to make a mesh node (for example, a light server) compatible to perform a DFU.

I have gone through the DFU page and I noticed that the DFU is done over the Serial port. I understand that the dfu firmware is being replaced with blinky firmware. Correct me if I am wrong.

Now, what changes should I make to the commands inorder to make the light_server example node to be DFU compatible/capable over the air?

Would replacing the application hex file on step 8 to light_server instead of dfu solve it? or should I add any other commands to have light_server firmware first?

Thank you.

  • Yes. That is the intention? Now you have updated the device that matched the device page from another board with another application and device page.

    Yep that cleared the question about the keys. 

    Next one is about updating the application with UART. I will try this scenario and will update the result!!

    This is what I tried: In a different 3.1.0 Mesh SDK and 15.2.0 SDK, I made changes to few UART files and implemented a mesh example with UART. I copied that hex file into a folder containing the stock SDK's, created a zip file in that folder and tried to push it onto the boards with Mesh dfu stock example. It failed to push the update.

    Thank you.

  • Hello, You can add an event handler for your UART by changing nrf_mesh_serial_init(NULL) with nrf_mesh_serial(nrf_mesh_serial_app_rx_cb_t app_rx_cb).

    What do you tent do use your UART for? Do you need to send data as well?

  • Please note that the nRF52832 only can use one UART at once, so it is not straight forward to have more UARTs. If you can use the same UART for what you want, that is fine, but if you want to implement a second UART for a sensor or whatever, you would need to switch between two different UARTs, so you can't enable both at once.

  • Hello,

    Yes, I am using the uart for a sensor to send/receive data.

    I tried this following scenario:

    (Note: No multiple UARTS used)

    I developed a UART application in a folder with stock SDK's. My application required few changes to UART files (app_uart.c, app_uart_fifo.c, nrfx_uart.c), change of baud rate and hardware flow control was disabled. I built the project and copied the hex file into a different folder that has stock SDK's which I was using to perform DFU.

    Now, I programmed two development boards with DFU stock example and device pages with different keys. Generated the DFU zip with key 2 and pushed the packet to board 1. 

    Transfer started (I didn't expect it to) and the process was very slow. It felt like the update is going to take few days. After 5-7 minutes, the transfer failed.

    Do you have any idea of why the transfer started? and after it started, why it failed? 

    if you want to implement a second UART for a sensor or whatever, you would need to switch between two different UARTs

    I will try it.

    Thank you.

  • Hello,

    What compiler do you use? Segger Embedded Studio? Armgcc (what version)?

    I have seen this error before, and it was caused by an "untested" compilator. 

    Just to clarify the UART situation. You can have the bootloader over Mesh on a node without using the UART (so you can use the UART for a sensor), but it is a bit more challenging to use UART for sensor + DFU. I suggest that you have one node that only uses UART for DFU, and the rest can use it for the sensors. Is that a viable solution?

    If not, you would have to somehow decide to disconnect the UART from the sensor, and initialize the UART for the DFU.

    BR,

    Edvin

Related