<?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>Progress bar when executing nrfutil in Nodejs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76864/progress-bar-when-executing-nrfutil-in-nodejs</link><description>I see a progress bar when executing nrfutil on the command line followed by a &amp;#39;Device programmed.&amp;#39; message after it finishes, but when I try to execute nrfutil in a nodejs app using exec and listening on &amp;#39;data&amp;#39; event from stdout I don&amp;#39;t see any output</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Mar 2023 14:31:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76864/progress-bar-when-executing-nrfutil-in-nodejs" /><item><title>RE: Progress bar when executing nrfutil in Nodejs</title><link>https://devzone.nordicsemi.com/thread/417929?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 14:31:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07ec50f4-556f-48a0-900d-3d6d70ec7911</guid><dc:creator>patjshan</dc:creator><description>&lt;p&gt;Thank yoou &lt;a href="https://devzone.nordicsemi.com/members/tesc"&gt;tesc&lt;/a&gt;&amp;nbsp;for the speedy reply!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Progress bar when executing nrfutil in Nodejs</title><link>https://devzone.nordicsemi.com/thread/417916?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 13:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b90284d8-3428-48f1-912d-dadd1f82390f</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;To build the exe file we use pyinstaller, fetched with &amp;quot;&lt;code&gt;python -m pip install &lt;a href="https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz"&gt;github.com/.../develop.tar.gz&lt;/a&gt;&lt;/code&gt;&amp;quot; and executed from the pc-nrfutil folder with the command &amp;quot;&lt;code&gt;pyinstaller nrfutil.spec&lt;/code&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Progress bar when executing nrfutil in Nodejs</title><link>https://devzone.nordicsemi.com/thread/417907?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 13:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cef67d14-4e46-4b24-ae23-1c083866fd2e</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please note that the &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil"&gt;old nrfutil&lt;/a&gt; (versions 1 through 6) is now deprecated, as can be seen from the deprecation notice in the &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil#readme"&gt;readme&lt;/a&gt;. The &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-util"&gt;new nRF Util (starting from version 7) is available from our web pages&lt;/a&gt;. It includes the legacy commands from the old nrfutil, but also adds new (closed source) functionality.&lt;/p&gt;
&lt;p&gt;I have asked internally how the exe files are built, and will get back to you when I have the answer.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Progress bar when executing nrfutil in Nodejs</title><link>https://devzone.nordicsemi.com/thread/417687?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 13:01:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6928a7ff-c1cc-40b5-aa42-d4c574abaa1e</guid><dc:creator>patjshan</dc:creator><description>&lt;p&gt;due to a similar case I am looking to customize the nrfutil behavior on dfu progress as well. however right now I am using the nrfutil.exe to call this function from inside another program. &lt;a href="https://devzone.nordicsemi.com/members/tesc"&gt;tesc&lt;/a&gt;&amp;nbsp;Can you advise on how Nordic compiles the python module into the executable for release on github? i would like to match the process as closely as possible since I know it works already&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Progress bar when executing nrfutil in Nodejs</title><link>https://devzone.nordicsemi.com/thread/317800?ContentTypeID=1</link><pubDate>Tue, 29 Jun 2021 19:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:019c3376-53c7-4643-8765-f49db51f7b5f</guid><dc:creator>amacbw</dc:creator><description>&lt;p&gt;thank you, i will try out your suggestions&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Progress bar when executing nrfutil in Nodejs</title><link>https://devzone.nordicsemi.com/thread/317718?ContentTypeID=1</link><pubDate>Tue, 29 Jun 2021 12:46:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6d615b1-1dae-4db0-985d-d4b656e6243f</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;DFU progress in nrfutil is displayed on screen, but not ending up in the console log. This has to do with how to display and update ascii based &amp;quot;graphics&amp;quot; in a terminal, through the use of ANSI escape codes.&lt;/p&gt;
&lt;p&gt;Please note that nrfutil is an application, not a library, and so it is not written for interactive use from a different computer program.&lt;/p&gt;
&lt;p&gt;Since you are using nodejs, it would probably be a better idea to have a look at javascript implementations of DFU. We do have an implementation for &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver-js/tree/master/api/dfu"&gt;BLE DFU in pc-ble-driver-js&lt;/a&gt;, and for USB DFU in &lt;a href="https://github.com/NordicSemiconductor/pc-nrf-dfu-js"&gt;pc-nrf-dfu-js&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you still want to use nrfutil, and want to e.g. get status percentages from stdout and parse those, then you can always customize nrfutil by changing the &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/blob/af139f1fa2e511c9bf378eff00049d8bb69b8a15/nordicsemi/__main__.py#L934"&gt;update_progress&lt;/a&gt; callback function in order to get the behavior that you want.&lt;/p&gt;
&lt;p&gt;Alternatively you can figure out how to get javascript exec (or similar command) to play well with command line tools using ANSI escape codes for displaying status information, but I am afraid that is outside of the scope of what we can provide support for here. I recommend visiting a javascript forum if you want to pursue that path.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>