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

Unable to perform DFU over serial and USB-serial

I am using RIGADO Evaluation Board 320-00050 

I am using nrfutil v5.2.0 to perform DFU i am able to create DFU package and when sending the package i am facing problems

When i performed DFU over a serial UART connection i get following error:

raise NordicSemiException('Writing to serial port failed: ' + str(e) + '. '
pc_ble_driver_py.exceptions.NordicSemiException: Writing to serial port failed: WriteFile failed (WindowsError(5, 'Access is denied.')). If MSD is enabled on the target device, try to disable it ref. https://wiki.segger.com/index.php?title=J-Link-OB_SAM3U

i have disabled MSD also even then i get this error

When i performed DFU over a serial USB connection  i get following error:

self.mtu = struct.unpack('<H', bytearray(response))[0]
TypeError: 'NoneType' object is not iterable

Please help me out to perform DFU

Thanks,

Krupa

Parents Reply Children
  • Ok, did you install nrfutil using pip install or did you download the .exe from https://github.com/NordicSemiconductor/pc-nrfutil/releases ? 

    If you're not using the .exe, then please download that. If you are using it, then please run nrfutil with the -vvvv option, i.e. 

    nrfutil -vvvv dfu serial -pkg app_dfu_package_2.zip -p COM3 -b 115200

    This should generate a more detailed log.

  • D:\BLE MESH TEKktronics\SDK\nRF5-SDK-for-Mesh-master>nrfutil -vvvv dfu serial -pkg app_dfu_package_2.zip -p COM3 -b 115200
    2019-09-30 18:00:51,878 Using board at serial port: COM3
    2019-09-30 18:00:51,885 Sending Application image.
    2019-09-30 18:01:25,154 SLIP: --> [9, 1]
    2019-09-30 18:01:26,157 Serial: No ping response
    2019-09-30 18:01:26,157 SLIP: --> [9, 2]
    2019-09-30 18:01:27,158 Serial: No ping response
    2019-09-30 18:01:27,158 SLIP: --> [9, 3]
    2019-09-30 18:01:28,160 Serial: No ping response
    2019-09-30 18:01:28,161 SLIP: --> [9, 4]
    2019-09-30 18:01:29,164 Serial: No ping response
    2019-09-30 18:01:29,164 SLIP: --> [9, 5]
    2019-09-30 18:01:30,165 Serial: No ping response
    2019-09-30 18:01:30,167 SLIP: --> [9, 6]
    2019-09-30 18:01:31,168 Serial: No ping response
    2019-09-30 18:01:31,170 SLIP: --> [9, 7]
    2019-09-30 18:01:32,173 Serial: No ping response
    2019-09-30 18:01:32,173 SLIP: --> [9, 8]
    2019-09-30 18:01:33,174 Serial: No ping response
    2019-09-30 18:01:33,174 SLIP: --> [9, 9]
    2019-09-30 18:01:34,177 Serial: No ping response
    2019-09-30 18:01:34,178 SLIP: --> [9, 10]
    2019-09-30 18:01:35,180 Serial: No ping response
    2019-09-30 18:01:35,180 SLIP: --> [9, 11]
    2019-09-30 18:01:36,181 Serial: No ping response
    2019-09-30 18:01:36,183 SLIP: --> [9, 12]
    2019-09-30 18:01:37,186 Serial: No ping response
    2019-09-30 18:01:37,187 SLIP: --> [9, 13]
    2019-09-30 18:01:38,188 Serial: No ping response
    2019-09-30 18:01:38,190 SLIP: --> [9, 14]
    2019-09-30 18:01:39,193 Serial: No ping response
    2019-09-30 18:01:39,193 SLIP: --> [9, 15]
    2019-09-30 18:01:40,194 Serial: No ping response
    2019-09-30 18:01:40,196 SLIP: --> [9, 16]
    2019-09-30 18:01:41,198 Serial: No ping response
    2019-09-30 18:01:41,200 SLIP: --> [9, 17]
    2019-09-30 18:01:42,201 Serial: No ping response
    2019-09-30 18:01:42,203 SLIP: --> [9, 18]
    2019-09-30 18:01:43,206 Serial: No ping response
    2019-09-30 18:01:43,206 SLIP: --> [9, 19]
    2019-09-30 18:01:44,207 Serial: No ping response
    2019-09-30 18:01:44,209 SLIP: --> [9, 20]
    2019-09-30 18:01:45,210 Serial: No ping response
    2019-09-30 18:01:45,211 SLIP: --> [9, 21]
    2019-09-30 18:01:46,214 Serial: No ping response
    2019-09-30 18:01:46,216 SLIP: --> [9, 22]
    2019-09-30 18:01:47,217 Serial: No ping response
    2019-09-30 18:01:47,219 SLIP: --> [9, 23]
    Traceback (most recent call last):
    File "C:\Python27\Scripts\nrfutil-script.py", line 11, in <module>
    load_entry_point('nrfutil==5.2.0', 'console_scripts', 'nrfutil')()
    File "c:\python27\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
    File "c:\python27\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
    File "c:\python27\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "c:\python27\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "c:\python27\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "c:\python27\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
    File "c:\python27\lib\site-packages\nordicsemi\__main__.py", line 1042, in serial
    timeout)
    File "c:\python27\lib\site-packages\nordicsemi\__main__.py", line 958, in do_serial
    dfu.dfu_send_images()
    File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu.py", line 129, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
    File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu.py", line 90, in _dfu_send_image
    self.dfu_transport.open()
    File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 210, in open
    if self.__ping() == True:
    File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 371, in __ping
    self.dfu_adapter.send_message([DfuTransportSerial.OP_CODE['Ping'], self.ping_id])
    File "c:\python27\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 125, in send_message
    raise NordicSemiException('Writing to serial port failed: ' + str(e) + '. '
    pc_ble_driver_py.exceptions.NordicSemiException: Writing to serial port failed: Write timeout. If MSD is enabled on the target device, try to disable it ref. https://wiki.segger.com/index.php?title=J-Link-OB_SAM3U

    This was the response i got. i installed nrfutil.exe

  • Ok, and if you disable MSD? What output do you get then with the -vvvv option?

  • Yes i get this response even after MSD is disabled and verified that MSD is disabled

  • Hi Bjorn,

    Can you please tell where i can get following details

    • --application-version version: the version of the application image, for example, 0xff
    • --dev-revision version: the revision of the device that should accept the image, for example, 1
    • --dev-type type: the type of the device that should accept the image, for example, 1
    • --sd-req sd_list: a comma-separated list of FWID values of SoftDevices that are valid to be used with the new image, for example, 0x4f,0x5a
Related