<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>cannot convert &amp;#39;NoneType&amp;#39; object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96228/cannot-convert-nonetype-object-to-bytearray-while-flashing-with-nrfutil</link><description>Hi, devzone, 
 I&amp;#39;m currently trying to flash the nrf52840 dongle from a custom IMX6-Ull board where it is attached and I&amp;#39;m also able to communicate and run the application flashed in the dongle. 
 I want to integrate the nrfutil tool into the board for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Feb 2023 19:35:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96228/cannot-convert-nonetype-object-to-bytearray-while-flashing-with-nrfutil" /><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/409948?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 19:35:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1916c7d6-b9a6-452c-98c4-4aeade634c70</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I see. Hopefully the&amp;nbsp;&lt;span&gt;IMX6 will be able to communicate with the nRF52840 when you use UART instead of the USB interface. Let me know if it doesn&amp;#39;t.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/409886?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 14:14:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4d55441-b259-463a-85c3-bfeb71bb423d</guid><dc:creator>Tamizh</dc:creator><description>&lt;p&gt;via UART&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/409869?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 13:07:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:687ec441-6d76-430a-8b36-18802a554b6e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="123203" url="~/f/nordic-q-a/96228/cannot-convert-nonetype-object-to-bytearray-while-flashing-with-nrfutil/409865"]I&amp;#39;ll be receiving the custom board from my team with integrated nrf52840 SoC.[/quote]
&lt;p&gt;Will the 52840 be connected to the host MCU via USB or UART in this case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/409865?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 13:02:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:427f4924-8320-46e5-8521-0528467ea8ca</guid><dc:creator>Tamizh</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;Sorry for the delay. I&amp;#39;ve tried the above method also, but still, it is not working.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll be receiving the custom board from my team with integrated nrf52840 SoC. I&amp;#39;ll try the same on the board and update the&amp;nbsp;result here.&lt;/p&gt;
&lt;p&gt;But if you have any other ideas for the dongle dfu, please suggest that also.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/408616?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2023 14:46:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a626f6e5-db30-42a0-8900-55203c226f1b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for confirming.&lt;/p&gt;
&lt;p&gt;There is no JLink involved in this case (the nrf52840 dongle does not have an on-board Jlink like the devkits).&amp;nbsp;&lt;span&gt;ttymxc6 should communicate directly with the nRF52840 USB (CDC) on the dongle. What I do not understand is why you have TX/RX communication when running the OT CLI, but not when running the bootloader.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I do not have experience with these NXP boards, and I am unsure what troubleshooting step to suggest next. Maybe you can try to enable flow control to see if it makes any difference?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1675781156991v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/408280?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2023 12:51:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2b23d2c-32cd-4fcd-bfef-0623126fd852</guid><dc:creator>Tamizh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes the dfu mode is enabled and the red LED is blinking but not sure why it&amp;#39;s still unable to communicate. Is there any config need to be enabled (by JLINK) for flashing through the serial port(ttymxc6)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/407998?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2023 12:30:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3867ba77-dd67-4833-ac71-41b5c320d726</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The logs confirm there is no response from the dongle. Can you please double check that the dongle is in DFU mode when you are testing this? The red LED should be blinking to indicate DFU mode if you are using our nRF52840 Dongle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/407977?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2023 11:17:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8f0c2e0-ac1d-4e28-bff9-20db01ba9be6</guid><dc:creator>Tamizh</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve run the command with the verbose as you&amp;#39;ve said and this is the output.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;root@12046998:~# nrfutil -v -v -v -v dfu usb-serial -pkg /real/zephyr.zip -p /dev/ttymxc6
2023-02-03 11:12:24,138 Using board at serial port: /dev/ttymxc6
2023-02-03 11:12:24,199 Sending Application image.
2023-02-03 11:12:57,383 Serial: Set Packet Receipt Notification 0
2023-02-03 11:12:57,386 SLIP: --&amp;gt; [2, 0, 0]
2023-02-03 11:12:58,395 SLIP: --&amp;gt; [7]
Traceback (most recent call last):
  File &amp;quot;/usr/bin/nrfutil&amp;quot;, line 33, in &amp;lt;module&amp;gt;
    sys.exit(load_entry_point(&amp;#39;nrfutil==6.1.7&amp;#39;, &amp;#39;console_scripts&amp;#39;, &amp;#39;nrfutil&amp;#39;)())
  File &amp;quot;/usr/lib/python3.8/site-packages/click/core.py&amp;quot;, line 1130, in __call__
    return self.main(*args, **kwargs)
  File &amp;quot;/usr/lib/python3.8/site-packages/click/core.py&amp;quot;, line 1055, in main
    rv = self.invoke(ctx)
  File &amp;quot;/usr/lib/python3.8/site-packages/click/core.py&amp;quot;, line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File &amp;quot;/usr/lib/python3.8/site-packages/click/core.py&amp;quot;, line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File &amp;quot;/usr/lib/python3.8/site-packages/click/core.py&amp;quot;, line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File &amp;quot;/usr/lib/python3.8/site-packages/click/core.py&amp;quot;, line 760, in invoke
    return __callback(*args, **kwargs)
  File &amp;quot;/usr/lib/python3.8/site-packages/nordicsemi/__main__.py&amp;quot;, line 1032, in usb_serial
    do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, serial_number, False,
  File &amp;quot;/usr/lib/python3.8/site-packages/nordicsemi/__main__.py&amp;quot;, line 990, in do_serial
    dfu.dfu_send_images()
  File &amp;quot;/usr/lib/python3.8/site-packages/nordicsemi/dfu/dfu.py&amp;quot;, line 127, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File &amp;quot;/usr/lib/python3.8/site-packages/nordicsemi/dfu/dfu.py&amp;quot;, line 88, in _dfu_send_image
    self.dfu_transport.open()
  File &amp;quot;/usr/lib/python3.8/site-packages/nordicsemi/dfu/dfu_transport_serial.py&amp;quot;, line 217, in open
    self.__get_mtu()
  File &amp;quot;/usr/lib/python3.8/site-packages/nordicsemi/dfu/dfu_transport_serial.py&amp;quot;, line 366, in __get_mtu
    self.mtu = struct.unpack(&amp;#39;&amp;lt;H&amp;#39;, bytearray(response))[0]
TypeError: cannot convert &amp;#39;NoneType&amp;#39; object to bytearray
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/407785?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 13:11:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa704edc-0697-428e-841c-854b551a350c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks When using nrfutil, please&amp;nbsp;for confirming. It is good to know that the USB communication works with the OT CLI, at least.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try to use nrfutil with verbose logging in case the log may provide us some additional clues:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrfutil -v -v -v -v dfu usb-serial -pkg zephyr.zip -p /dev/ttymxc6&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/407771?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 12:48:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dccca856-9d52-458d-9915-f61cc5f5da2e</guid><dc:creator>Tamizh</dc:creator><description>&lt;p&gt;Hi &lt;span style="background-color:#eeeeee;"&gt;&lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#eeeeee;"&gt;Thanks for the reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#eeeeee;"&gt;In the dongle, I&amp;#39;ve already flashed the rcp coprocessor open-thread application program which gives a CLI for interaction called ot-ctl.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#eeeeee;"&gt;I&amp;#39;m able to send commands and get the firmware version and other information from the dongle through uart&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#eeeeee;"&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1675341842689v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#eeeeee;"&gt;so I think the connection is fine through /dev/ttymxc6.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#eeeeee;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: cannot convert 'NoneType' object to bytearray while flashing with nrfutil</title><link>https://devzone.nordicsemi.com/thread/407746?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 11:52:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40659cc8-7b2b-435f-9649-c523cde865bc</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The Python&amp;nbsp;traceback&amp;nbsp;shows that the script fails because it does not receive anything in response from the DFU target&amp;nbsp;after it sends the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_dfu_transport.html#lib_dfu_transport_op_mtu"&gt;MTU Get&lt;/a&gt;&amp;nbsp;request. But I am not sure why this would happen. Would it&amp;nbsp;be possible to run the&amp;nbsp;&lt;a title="Command Line Interface (CLI) Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/cli_example.html?cp=9_1_4_6_7"&gt;Command Line Interface (CLI) Example&lt;/a&gt;&amp;nbsp;on your dongle and connect it to your&amp;nbsp;&lt;span&gt;IMX6-Ull to verify&amp;nbsp;if the USB communication is working?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>