<?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>Set last byte of EUI-48 to 0x00</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16887/set-last-byte-of-eui-48-to-0x00</link><description>This piece of code appears in all IoT SDK examples: 
 eui48_t ipv6_medium_eui48;
err_code = ipv6_medium_eui48_get(m_ipv6_medium.ipv6_medium_instance_id,
 &amp;amp;ipv6_medium_eui48);

ipv6_medium_eui48.identifier[EUI_48_SIZE - 1] = 0x00;

err_code = ipv6_medium_eui48_set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Oct 2016 12:06:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16887/set-last-byte-of-eui-48-to-0x00" /><item><title>RE: Set last byte of EUI-48 to 0x00</title><link>https://devzone.nordicsemi.com/thread/64686?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2016 12:06:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b67a727-53b8-49e9-afd6-7fe429024cf3</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Please have a look at &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.iotsdk.v0.9.0/iot_sdk_user_guides_ipv6_address_creation.html?cp=4_1_0_2_4"&gt;this&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The 6LoWPAN implementation on Linux requires the BLE address to be public.&lt;/p&gt;
&lt;p&gt;When the BLE address is public the 7th bit in the first byte in the IID should be 1, because it is globally unique.&lt;/p&gt;
&lt;p&gt;And for it to 1, it has to be 0 in the EUI-64, since it is flipped. Since it is 0 in EUI-64, it has to be 0 in the public BLE address.&lt;/p&gt;
&lt;p&gt;Instead of only setting the 7th bit of 6th byte in the public BLE address we set the whole byte to 0x00, to make it easier for you to figure out what the IPv6 addresses are.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>