update firmware via uart from android

Hi all,

I use nRF52832 connect a android device with uart, and I want to update firmware via uart.

I can update my nrf device success on pc for test with the help of your colleagues and this link.

But I have no idea how to do this on android device.

And if I don't want to use nrfutil do you guys have any other example for me to update the version?

Any help or suggestion is appreciated!

Best regards

Lurn

Parents Reply Children
  • Hi Vidar,

    Sorry for the late reply.

    I used the nrfutil-linux on my linux PC, I got something wrong and the logs is here

    ./nrfutil-linux dfu serial -pkg dfu_image_rx.zip -p /dev/ttyUSB0 -fc 0 -b 115200 -t 5 -cd 0 -prn 0
      [------------------------------------]    0%
      2023-04-06 11:03:58,728 No trigger interface found for device with serial number: A50285BI, Product ID: 0x6001 and Vendor ID: 0x403
    
    
    Traceback (most recent call last):
      File "nordicsemi/__main__.py", line 1555, in <module>
      File "click/core.py", line 1137, in __call__
      File "click/core.py", line 1062, in main
      File "click/core.py", line 1668, in invoke
      File "click/core.py", line 1668, in invoke
      File "click/core.py", line 1404, in invoke
      File "click/core.py", line 763, in invoke
      File "nordicsemi/__main__.py", line 1073, in serial
      File "nordicsemi/__main__.py", line 988, in do_serial
      File "nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
      File "nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image
      File "nordicsemi/dfu/dfu_transport_serial.py", line 214, in open
    pc_ble_driver_py.exceptions.NordicSemiException: No ping response after opening COM port
    [64515] Failed to execute script '__main__' due to unhandled exception!

    What is the problem with this error?

    And how can I get/set the application version?

    Is this code based on windows or linux or universal?

    If I need the source on linux, which branch should I choose?

    Best regards,

    Lurn

  • Hi Lum,

    The error indicates that there is a communication issue between the board and your PC. Are you sure /dev/ttyUSB0 is the correct port for your serial bridge? If not, can you try to disconnect the USB to see if the port is still listed?

    Thanks,

    Vidar

  • Hi Vidar,

    Yes, I'm sure that /dev/ttyUSB0 is the correct port. Because when I connect the USB the list only have one port. and I can use it to send data over uart.

    And how can I get/set the application version?

    Is this code based on windows or linux or universal?

    If I need the source on linux, which branch should I choose?

    Also, please help me with these problems.

    Best regads,

    Lurn

  • Hi Lurn, 

    Thanks for confirming. The other common reason for the error is when the target device is not in DFU mode. Do you have a way to confirm if the device is in DFU mode? 

    As for the version numbers, these are specified in the DFU package itself, see Generating DFU packages

    Best regards,

    Vidar

  • Hi Vidar,

    Do you have a way to confirm if the device is in DFU mode? 

    I will only program the mbr and bootloader to make sure the device enter DFU mode.

    And May I ask what platform this nrfutil source code is based on?

    Windows, Linux or universal?

    Best regards,

    Lurn

Related