OTA update in mesh

I am working on OTA update .

Right now i am working simple 

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fmd_doc_user_guide_modules_dfu_configuring_performing.html

using this link to configure DFU 

I know this is simple one but i think i am just messing up something 

Traceback (most recent call last):
  File "C:\Python27\Scripts\nrfutilmesh-script.py", line 11, in <module>
    load_entry_point('nrfutil==0.3.0.0', 'console_scripts', 'nrfutil')()
  File "C:\Python27\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Python27\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Python27\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python27\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python27\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python27\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\python27\lib\site-packages\nrfutil-0.3.0.0-py2.7.egg\nordicsemi\__main__.py", line 276, in genpkg
    package.generate_package(zipfile_path)
  File "c:\python27\lib\site-packages\nrfutil-0.3.0.0-py2.7.egg\nordicsemi\dfu\package.py", line 212, in generate_package
    Package.normalize_firmware_to_bin(work_directory, firmware[FirmwareKeys.FIRMWARE_FILENAME])
  File "c:\python27\lib\site-packages\nrfutil-0.3.0.0-py2.7.egg\nordicsemi\dfu\package.py", line 366, in normalize_firmware_to_bin
    temp.tobinfile(new_filepath)
  File "c:\python27\lib\site-packages\nrfutil-0.3.0.0-py2.7.egg\nordicsemi\dfu\nrfhex.py", line 162, in tobinfile
    super(nRFHex, self).tobinfile(fobj, start=start_address, size=size)
  File "c:\python27\lib\site-packages\nrfutil-0.3.0.0-py2.7.egg\nordicsemi\dfu\intelhex\__init__.py", line 401, in tobinfile
    fobj.write(self._tobinstr_really(start, end, pad, size))
  File "c:\python27\lib\site-packages\nrfutil-0.3.0.0-py2.7.egg\nordicsemi\dfu\intelhex\__init__.py", line 373, in _tobinstr_really
    return asstr(self._tobinarray_really(start, end, pad, size).tostring())
  File "c:\python27\lib\site-packages\nrfutil-0.3.0.0-py2.7.egg\nordicsemi\dfu\intelhex\__init__.py", line 342, in _tobinarray_really
    raise ValueError("tobinarray: wrong value for size")
ValueError: tobinarray: wrong value for size

So i have tried again and again but failed now i am getting this error .

Please help me to get out of this .

At first i was trying to do with latest version of nrfutil but when i try to run the package it was giving me error .

  • 00> <t:          3>, main.c,  227, ----- Bluetooth Mesh DFU Example -----
    00> <t:       8811>, nrf_mesh_dfu.c,  753, Version info: BL(ver, id): 0x01 0x01 SD: 0x0100
    00> <t:       8815>, nrf_mesh_dfu.c,  755, Version info: APP company: 0x20210304 id: 0x0001 version: 0x00000001
    00> <t:       8827>, serial_handler_prov.c,  267, Generating encryption keypair...
    00> <t:      13608>, main.c,  233, Initialization complete!
    00> <t:      18278>, main.c,  254, Enabling serial interface...
    00> <t:      18281>, mesh_app_utils.c,   66, Device UUID (raw): 0F2EAF580D3F439FBB24D199F320A8BE
    00> <t:      18284>, mesh_app_utils.c,   67, Device UUID : 0F2EAF58-0D3F-439F-BB24-D199F320A8BE
    00> <t:      18296>, nrf_mesh_dfu.c,  554,   RADIO TX! SLOT 0, count 15, interval: periodic, handle: FFFE
    00> <t:      18300>, nrf_mesh_dfu.c,  593,   SERIAL TX (type: 65534)
    00> <t:      18308>, main.c,  262, DFU example started!

    These are logs of RTT viewer . 

    LOG: Connecting to J-Link via USB...
    LOG: Device "NRF52840_XXAA" selected.
    LOG: InitTarget() start
    LOG: InitTarget() end
    LOG: Found SW-DP with ID 0x2BA01477
    LOG: DPIDR: 0x2BA01477
    LOG: CoreSight SoC-400 or earlier
    LOG: Scanning AP map to find all available APs
    LOG: AP[2]: Stopped AP scan as end of AP map has been reached
    LOG: AP[0]: AHB-AP (IDR: 0x24770011)
    LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
    LOG: Iterating through AP map to find AHB-AP to use
    LOG: AP[0]: Core found
    LOG: AP[0]: AHB-AP ROM base: 0xE00FF000
    LOG: CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    LOG: Found Cortex-M4 r0p1, Little endian.
    LOG: FPUnit: 6 code (BP) slots and 2 literal slots
    LOG: CoreSight components:
    LOG: ROMTbl[0] @ E00FF000
    LOG: [0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
    LOG: [0][1]: E0001000 CID B105E00D PID 003BB002 DWT
    LOG: [0][2]: E0002000 CID B105E00D PID 002BB003 FPB
    LOG: [0][3]: E0000000 CID B105E00D PID 003BB001 ITM
    LOG: [0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
    LOG: [0][5]: E0041000 CID B105900D PID 000BB925 ETM
    LOG: RTT Viewer connected.
    LOG: Terminal 0 added.

  • Good, but I need the RTT log until you get the error (Error is: Failed to establish the connection). 

    -Amanda

  • Nothing is changed in RTT log 

    In fact now its empty with i run hex file of blink then erase it after that i try to do all steps but i didn't see anything in RTT logs . 

    Is there any issue if this warning comes after connection . 

  • Hi, 

    Mohsin khan said:
    Nothing is changed in RTT log 

    Please try to test again without the signing keys. 

    Please make sure UART is working between your computer and the board, you can test using a UART example. 

    Here is a similar case that might help. 

    Mohsin khan said:
    In fact now its empty with i run hex file of blink then erase it after that i try to do all steps but i didn't see anything in RTT logs .

    Follow this Configuring and performing DFU over Mesh document to program the bootloader again. 

    Mohsin khan said:
    Is there any issue if this warning comes after connection . 

    It detects that your probe is a J-Link clone, and cannot guarantee the operation correctly. Please contact your provider for the issue. 

    -Amanda 

Related