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

Mesh DFU Example not working (no serial communication for Linux and more ...)

Hi @ll,

I tried to get the dfu example up and running but there are a lot of problems I encountered:

- Using the device_page_generator.py the string for the public key was read as unicode so I had to add this part:

if(isinstance(data, unicode)):
    data = data.encode('utf-8')

after line 65. So I got this running and could generate device pages. Even though I can not imagine that I am the only one having this problem O_o

- After I flashed everything I tired using the nrfutil (mesh_dfu-branch) to perform the dfu
    --> But I had no serial connection as it stucks at 0% forever
    --> So I tried the bootloader_verify.py which is not getting a serial connection at all (everything up to now on a ubuntu 17.10 machine using sudo or not)
        --> Tried it on a windows laptop and it works ... at least the bootloader_verify.py
        --> nrfutil responds: Failed to upgrade target. Error is: Device returned an unknown status code (142) on a DFU state beacon packet.

I'm using the following files/settings:
- nRF52 PC10040 v1.1.0 DevKits
- Softdevice s132 6.0.0
- mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex as the bootloader
- examples/dfu for the application
- device_page_generator.py -c bootloader_config.json -sd "s132_6.0.0"
    with bootloader_config.json being: 
     {
         "bootloader_config": {
         "bootloader_id": 1,
         "bootloader_version": 1,
         "company_id": 89,
         "application_id": 1,
         "application_version": 1,
         "public_key":"xxxMyKeyxxx"
         }
     }
- nrfutil dfu genpkg --application [...]new.hex --company-id 0x00000059 --application-id 1 --application-version 2 --sd-req 0x00A8 --key-file [...]/mesh_test.pem --mesh dfu_test.zip
- Using latest SEGGER JLink 6.32c

Is there a way to get this stuff up and running using linux instead of windows? See also my other ticket for serial communication of the interative_pyaci:
https://devzone.nordicsemi.com/f/nordic-q-a/34021/interactive-pyaci-timeout-aka-working-by-chance

Is there something I did not pay into account?

Thank you in advance for your help Slight smile

Bye
Andrej

Parents
  • Hi Andrej, 

    Sorry for the delayed answer. We are in a week with many public holidays here in Norway. We only get back to full staff from next Tuesday. 

    It would be nice if you can have a logic analyzer on the UART lines to see if there is any communication between the PC and the DFU board. 

    When you test DFU, we would suggest you to try with very small simple application, you can try with the app_green_s132.hex example image. Keep in mind that DFU with mesh take very long time. And application as small as the app_green_s132.hex (turn on the green LED of the PCA10031, no mesh application) can take a minute to finish.

     I assume you also tested with Segger v6.16c 

Reply
  • Hi Andrej, 

    Sorry for the delayed answer. We are in a week with many public holidays here in Norway. We only get back to full staff from next Tuesday. 

    It would be nice if you can have a logic analyzer on the UART lines to see if there is any communication between the PC and the DFU board. 

    When you test DFU, we would suggest you to try with very small simple application, you can try with the app_green_s132.hex example image. Keep in mind that DFU with mesh take very long time. And application as small as the app_green_s132.hex (turn on the green LED of the PCA10031, no mesh application) can take a minute to finish.

     I assume you also tested with Segger v6.16c 

Children
Related