<?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>nRF52840 SDK16 - OTA DFU - Application version</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67248/nrf52840-sdk16---ota-dfu---application-version</link><description>Hi everyone, 
 I am working on buttonless OTA DFU. I have generated my own private and public keys using nrfutil and created the .zip file for DFU. 
 While generating the ZIP file I had to include application&amp;#39;s version as shown: 
 nrfutil pkg generate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Oct 2020 08:29:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67248/nrf52840-sdk16---ota-dfu---application-version" /><item><title>RE: nRF52840 SDK16 - OTA DFU - Application version</title><link>https://devzone.nordicsemi.com/thread/275511?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 08:29:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4a9b720-c1ce-4ff1-8a0e-24ca1936951e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]1. Can I use float numbers for versioning e.g 1.1[/quote]
&lt;p&gt;&amp;nbsp;Technically not a float, but you can specify the application version as a string instead of an integer value, see help text below.&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --help&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/1488.pastedimage1603095020078v1.png" alt=" " /&gt;&lt;/p&gt;
[quote user=""]2.&amp;nbsp;What is the procedure if I want to initialize the version numbering (for example to downgrade from v.5 to v.1). I need to compile a new bootloader with new public key?[/quote]
&lt;p&gt;Downgrades can be accepted by building the bootloader with NRF_DFU_APP_DOWNGRADE_PREVENTION disabled in sdk_config.h&lt;/p&gt;
[quote user=""]3. When I flashed the secure bootloader I was not asked to enter any version.. I just used&amp;nbsp;&lt;strong&gt;nrfjprog -f NRF52 --program file.hex --chiperase -r&amp;nbsp;&lt;/strong&gt;to flash the softdevice and&amp;nbsp;&lt;strong&gt;nrfjprog -f NRF52 --program file.hex&amp;nbsp; -r&amp;nbsp;&lt;/strong&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;to flash the bootloader. So, If I want to flash a new secure bootloader how I will increament its version? Is this something that is performed automatically by the system?[/quote]
&lt;p&gt;The version numbers are specified when you generate Bootloader settings page. You can find instructions on how to generate it here: &lt;strong&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader#h61sjziauupw1j397q9s9ldr01q4j6d5"&gt;Combine application, bootloader and softdevice image - Bootloader setting&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
[quote user=""]4. How can I keep track of the current version of the application? I mean how could I know the current version of my application running on chip?[/quote]
&lt;p&gt;&amp;nbsp;It will be stored in the bootloader settings structure (&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/structnrf__dfu__settings__t.html"&gt;nrf_dfu_settings_t&lt;/a&gt;) at the last flash page, so you can reference it with a pointer.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>