<?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>sprintf - Not displaying leading Zero of MAC address (SDK15.2 SEGGER)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74908/sprintf---not-displaying-leading-zero-of-mac-address-sdk15-2-segger</link><description>Just need a little help on something that is probably very simple. I am sure I will be embarrassed at how simple this is. 
 I get the nr52 device MAC address and append 4 digits of it to the end of our device name to make the device name (kind of) unique</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 08 May 2021 18:55:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74908/sprintf---not-displaying-leading-zero-of-mac-address-sdk15-2-segger" /><item><title>RE: sprintf - Not displaying leading Zero of MAC address (SDK15.2 SEGGER)</title><link>https://devzone.nordicsemi.com/thread/308829?ContentTypeID=1</link><pubDate>Sat, 08 May 2021 18:55:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:367824fd-8e91-41ca-9a92-742e8ef8b38c</guid><dc:creator>Bryan H</dc:creator><description>&lt;p&gt;Only needed to add 02 in front of the&amp;nbsp;&lt;span&gt;Unsigned hexadecimal integer (%X&amp;nbsp; - needs to be %02X)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;new line of code looks like this now:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;sprintf(&amp;amp;device_name[name_size], &amp;quot;%02X%02X&amp;quot;, addr.addr[BLE_GAP_ADDR_LEN - 5], addr.addr[BLE_GAP_ADDR_LEN - 6]);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sprintf - Not displaying leading Zero of MAC address (SDK15.2 SEGGER)</title><link>https://devzone.nordicsemi.com/thread/308828?ContentTypeID=1</link><pubDate>Sat, 08 May 2021 17:23:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2d40009-3da6-467b-933d-76e603001bae</guid><dc:creator>Bryan H</dc:creator><description>&lt;p&gt;FYI:&lt;/p&gt;
&lt;p&gt;The above code is from:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/16389/unique-ble-device-name"&gt;devzone.nordicsemi.com/.../unique-ble-device-name&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>