<?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>ot-nrf52840 dfu trigger library</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77386/ot-nrf52840-dfu-trigger-library</link><description>I&amp;#39;m working with following project and would like to add the DFU trigger library. 
 https://github.com/openthread/ot-nrf528xx 
 1. Build like this, I&amp;#39;m using a PCA10059 Dongle 
 ./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB 
 2. I create the hex</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Jul 2021 21:03:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77386/ot-nrf52840-dfu-trigger-library" /><item><title>RE: ot-nrf52840 dfu trigger library</title><link>https://devzone.nordicsemi.com/thread/320112?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 21:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9682ca8e-3754-4a46-8673-295042a121e2</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Uyl,&lt;/p&gt;
&lt;p&gt;Sorry, I do not fully understand your meaning before.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did the following changes and it does work with nrfutil, but the issue is that you have to program this package first, then you would be able to use USB DFU&amp;nbsp;buttonless triggering next time.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;&lt;span&gt;##&amp;nbsp;&lt;/span&gt;src\nrf52833\transport-config.h&amp;nbsp;&lt;span&gt;##&lt;br /&gt;&lt;/span&gt;&lt;span&gt;define&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;USB_CDC_AS_SERIAL_TRANSPORT&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;## third_party\NordicSemiconductor\config\app_config.h ##&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;define&lt;/span&gt;&lt;span&gt;&amp;nbsp;APP_USBD_PID&amp;nbsp;&lt;/span&gt;&lt;span&gt;0xC00A&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;define APP_USBD_NRF_DFU_TRIGGER_ENABLED 1&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Your configuration should also work. The nrfutil command is the same as before:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;sudo nrfutil dfu usb-serial -pkg app_dfu_package.zip -p /dev/ttyACM0
[####################################]  100%          
Device programmed.&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I also experience error reports like below. Just try to wait a bit longer to program again. I guess sometimes it takes longer time to trigger DFU, but the nrfutil is timeout. Use &amp;quot;ls /dev/ttyACM*&amp;quot; to check you are always using the correct serial port.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;Traceback (most recent call last):
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/nordicsemi/dfu/dfu_transport_serial.py&amp;quot;, line 197, in open
    self.__ensure_bootloader()
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/nordicsemi/dfu/dfu_transport_serial.py&amp;quot;, line 326, in __ensure_bootloader
    trigger.enter_bootloader_mode(device)
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/nordicsemi/dfu/dfu_trigger.py&amp;quot;, line 171, in enter_bootloader_mode
    libusb_device = self.select_device(listed_device)
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/nordicsemi/dfu/dfu_trigger.py&amp;quot;, line 134, in select_device
    SNO = handle.getSerialNumber()
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/usb1/__init__.py&amp;quot;, line 1154, in getSerialNumber
    return self.getASCIIStringDescriptor(
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/usb1/__init__.py&amp;quot;, line 1307, in getASCIIStringDescriptor
    received = mayRaiseUSBError(libusb1.libusb_get_string_descriptor_ascii(
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/usb1/__init__.py&amp;quot;, line 127, in mayRaiseUSBError
    __raiseUSBError(value)
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/usb1/__init__.py&amp;quot;, line 119, in raiseUSBError
    raise __STATUS_TO_EXCEPTION_DICT.get(value, __USBError)(value)
usb1.USBErrorTimeout: LIBUSB_ERROR_TIMEOUT [-7]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &amp;quot;/usr/local/bin/nrfutil&amp;quot;, line 8, in &amp;lt;module&amp;gt;
    sys.exit(cli())
  File &amp;quot;/usr/lib/python3/dist-packages/click/core.py&amp;quot;, line 764, in __call__
    return self.main(*args, **kwargs)
  File &amp;quot;/usr/lib/python3/dist-packages/click/core.py&amp;quot;, line 717, in main
    rv = self.invoke(ctx)
  File &amp;quot;/usr/lib/python3/dist-packages/click/core.py&amp;quot;, line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File &amp;quot;/usr/lib/python3/dist-packages/click/core.py&amp;quot;, line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File &amp;quot;/usr/lib/python3/dist-packages/click/core.py&amp;quot;, line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File &amp;quot;/usr/lib/python3/dist-packages/click/core.py&amp;quot;, line 555, in invoke
    return callback(*args, **kwargs)
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/nordicsemi/__main__.py&amp;quot;, line 1014, in usb_serial
    do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, serial_number, False,
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/nordicsemi/__main__.py&amp;quot;, line 970, in do_serial
    dfu.dfu_send_images()
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/nordicsemi/dfu/dfu.py&amp;quot;, line 127, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/nordicsemi/dfu/dfu.py&amp;quot;, line 88, in _dfu_send_image
    self.dfu_transport.open()
  File &amp;quot;/usr/local/lib/python3.8/dist-packages/nordicsemi/dfu/dfu_transport_serial.py&amp;quot;, line 203, in open
    &amp;quot;. Reason: {1}&amp;quot;.format(self.com_port, e.strerror))
AttributeError: &amp;#39;USBErrorTimeout&amp;#39; object has no attribute &amp;#39;strerror&amp;#39;
&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ot-nrf52840 dfu trigger library</title><link>https://devzone.nordicsemi.com/thread/319944?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 07:52:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c264019b-deed-4e37-91ec-d513b38cc6e6</guid><dc:creator>Uyl</dc:creator><description>&lt;p&gt;Hello Charlie&lt;/p&gt;
&lt;p&gt;I know&amp;nbsp;the procedure with the reset button.&lt;/p&gt;
&lt;p&gt;But I&amp;#39;m going to have a Thread network with 100 devices&amp;nbsp; for Testing and i dont want to press the rest button 100 times &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I want to be able to Flash firmware updates without pressing the RESET button.&amp;nbsp;&amp;nbsp;&lt;strong&gt;I can enter the Bootloader mode without pressing the RESET button. But it doesn&amp;#39;t work with NRFutil only with NRF-Connect programmer&amp;nbsp;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This appears and when i press it, it changes to sDFU. &lt;strong&gt;This is all good but how can i trigger it with NRFutil?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1626248977660v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1626249091578v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ot-nrf52840 dfu trigger library</title><link>https://devzone.nordicsemi.com/thread/319939?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 07:43:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa36a1b5-9573-4fd3-a1e2-35882de51425</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Uyl,&lt;/p&gt;
&lt;p&gt;This is already a Nordic Open bootloader preprogrammed into nRF52840 Dongle. You only need to trigger DFU mode manually. Plug in nRF52840 Dongle and press &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf52840_dongle%2FUG%2Fnrf52840_Dongle%2Fhw_button_led.html&amp;amp;cp=3_0_5_5_3"&gt;reset button&lt;/a&gt; to trigger the DFU mode, you will see the red LED start to blink.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I repeat your procedure without changing any codes and it&amp;nbsp;worked well. It is on Ubuntu system but should be the same with Windows.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd ot-nrf528xx
./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB
arm-none-eabi-objcopy -O ihex build/bin/ot-cli-ftd ot-cli-ftd.hex
nrfutil pkg generate --debug-mode --hw-version 52 --sd-req 0x00 --application ot-cli-ftd.hex app_dfu_package.zip
sudo nrfutil dfu usb-serial -pkg app_dfu_package.zip -p /dev/ttyACM0
[####################################]  100%          
Device programmed.&lt;/pre&gt;Could you confirm the way you trigger DFU mode is the same as I mentioned?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlile&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ot-nrf52840 dfu trigger library</title><link>https://devzone.nordicsemi.com/thread/319931?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 07:00:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d8b6d0e-33ba-47f8-a320-f881d3db03a6</guid><dc:creator>Uyl</dc:creator><description>&lt;p&gt;It&amp;#39;s is only blinking when you enter the bootloader mode.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve changed following things:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB -DOT_APP_CLI=ON -DOT_MTD=ON&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;and the config files:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;## app_config.h ##&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#ifndef APP_USBD_PID&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#define APP_USBD_PID 0x0C00A&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;endif&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#ifndef APP_USBD_NRF_DFU_TRIGGER_ENABLED&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#define APP_USBD_NRF_DFU_TRIGGER_ENABLED 1&lt;/span&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#endif&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; ## nrf52840/sdk_config.h ##&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#ifndef APP_USBD_ENABLED&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#define APP_USBD_ENABLED 1&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#endif&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#ifndef APP_USBD_CONFIG_SELF_POWERED&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#define APP_USBD_CONFIG_SELF_POWERED 0&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#endif&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#ifndef APP_USBD_CDC_ACM_ENABLED&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#define APP_USBD_CDC_ACM_ENABLED 1&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#endif&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#ifndef APP_USBD_NRF_DFU_TRIGGER_CONFIG_LOG_ENABLED&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#define APP_USBD_NRF_DFU_TRIGGER_CONFIG_LOG_ENABLED 1&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#endif&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Now the devices appears as &amp;quot;&amp;nbsp; nRF Connect USB CDC ACM (COM11) &amp;quot; and I can trigger the Reset with the NRF-Connect Programmer.&lt;/p&gt;
&lt;p&gt;But it still doesn&amp;#39;t work with nrfutil, do you know the command?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ot-nrf52840 dfu trigger library</title><link>https://devzone.nordicsemi.com/thread/319867?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 14:50:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9abf7586-62cb-4287-bff1-75414e5d9fa3</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Uyl,&lt;/p&gt;
&lt;p&gt;Did you see the red led blink?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>