# DevEUI for non-hardware assigned values

**URL:** <https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093>\
**Category:** End Devices (Nodes)\
**Created:** [May 11, 2016, 12:28pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093 "2016-05-11T12:28:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ursm](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ursm/32/46475_2.png) [@ursm](https://www.thethingsnetwork.org/forum/u/ursm)\
**Post date:** [May 11, 2016, 12:28pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/1 "2016-05-11T12:28:31Z")

</div>

Is it intended that for devices that do not have a preconfigured hardware based DevEUI (as RFM9x), an segment is provided, which does not collide with the others?

---

<div class="post-metadata">

**Author:** ![andrewl](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/andrewl/32/37697_2.png) [@andrewl](https://www.thethingsnetwork.org/forum/u/andrewl)\
**Post date:** [May 11, 2016, 1:31pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/2 "2016-05-11T13:31:38Z")

</div>

You could always add a chip that gives a unique DevEUI so that you’ll know you won’t clash with any other device.

Andrew

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [May 11, 2016, 1:40pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/3 "2016-05-11T13:40:01Z")

</div>

Some time ago @kersing mentioned [this chip](https://www.microchip.com/wwwproducts/en/en561219) that comes with a unique EUI64

---

<div class="post-metadata">

**Author:** ![Mirmit](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mirmit/32/11119_2.png) [@Mirmit](https://www.thethingsnetwork.org/forum/u/Mirmit)\
**Post date:** [May 11, 2016, 2:50pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/4 "2016-05-11T14:50:35Z")

</div>

Some microcontrolers have a unique ID embedded. I’m thinking of STM32 for example, which will same a bit of BOM.

---

<div class="post-metadata">

**Author:** ![ursm](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ursm/32/46475_2.png) [@ursm](https://www.thethingsnetwork.org/forum/u/ursm)\
**Post date:** [May 11, 2016, 3:05pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/5 "2016-05-11T15:05:02Z")

</div>

thanks for the suggestions so far, but adding some chips makes existing hardware much more complicated.  
e.g. MoteinoMega with RFM95W has no space for it.  
Teensy3.2 and all other projects based on ESPxx are mostly built from standard components.  
so I think I go further by using an 8 byte random number … and assuming that in combination with the AppEUI no collisions should occur.

---

<div class="post-metadata">

**Author:** ![Mirmit](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mirmit/32/11119_2.png) [@Mirmit](https://www.thethingsnetwork.org/forum/u/Mirmit)\
**Post date:** [May 11, 2016, 4:48pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/6 "2016-05-11T16:48:04Z")

</div>

The MoteinoMega can have a SPI flash - bnot shure this is the version you have. These have a 64 bits unique IDs. Maybe, you can rely on them.

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [May 11, 2016, 6:11pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/7 "2016-05-11T18:11:09Z")

</div>

> [@ursm](#):
>
> I think I go further by using an 8 byte random number

The whole point of an EUI (Extended Unique Identifier) is that they are guaranteed to be unique. If you start using random numbers for the EUI, it’s not going to be an EUI anymore.

I’m not sure if this is true, but I suppose that you could also base your EUI on a MAC address you already own, for example the MAC address of your WiFi card (which the manufacturer sold to you). These MAC addresses are 48 bits long, which means that you can fill the first 48 bits of the DevEUI with your MAC address, and choose the remaining 16 bits yourself.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [May 11, 2016, 9:27pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/8 "2016-05-11T21:27:16Z")

</div>

> [@ursm](#):
>
> adding some chips makes existing hardware much more complicated.

If you buy chips with unique id there is no need to mount the chip on the module, just read the unique id, assign it to the device and make sure you do not reuse the id for another device. Buying the chip ensures you bought the right to use the unique id embedded in it. Or if you want to use a large block of ids, buy the block like TTN did 😉

---

<div class="post-metadata">

**Author:** ![matthijskooijman](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@matthijskooijman](https://www.thethingsnetwork.org/forum/u/matthijskooijman)\
**Post date:** [May 12, 2016, 5:31am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/9 "2016-05-12T05:31:19Z")

</div>

> [@htdvisser](#):
>
> I’m not sure if this is true, but I suppose that you could also base your EUI on a MAC address you already own, for example the MAC address of your WiFi card (which the manufacturer sold to you). These MAC addresses are 48 bits long, which means that you can fill the first 48 bits of the DevEUI with your MAC address, and choose the remaining 16 bits yourself.

There is a standardized way to translate a MAC address to a EUI-64, though I can’t recall where it is documented. IIRC it is a 1-to-1 mapping that is more complex than just padding the end with zeroes. Your suggested scheme of adding 16 bits to fill up the MAC address would actually mean that every single MAC address would prevent 2^16 addresses from being used.

Using this standardized way is only possible if the manufacturer actually supports this scheme, meaning he guarantees that he will not use the DevEUI that results from translating a MAC address for any other purposes, so you can use it here. If the manufacturer just uses his OUI to generate both MAC addresses and EUI-64’s independently, uniqueness is not guaranteed.

Having said that, I believe the spec requires using a (by definition unique and assigned by the IEEE) EUI-64 identifier for the DevEUI, but in practice it might be sufficient to use _any_ identifier that is unique within the AppEUI. Any overlap in DevEUI can be handled, as long as the AppEUI is different. IIRC this is true for at least TTN, other LoRaWAN networks might be more strict / more easily confused.

---

<div class="post-metadata">

**Author:** ![ursm](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ursm/32/46475_2.png) [@ursm](https://www.thethingsnetwork.org/forum/u/ursm)\
**Post date:** [May 12, 2016, 7:25am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/10 "2016-05-12T07:25:54Z")

</div>

> [@htdvisser](#):
>
> for example the MAC address of your WiFi card (which the manufacturer sold to you)

oh yes, I know what a MACaddress is and how to convert it, _but_ except the nodes with ESPxx don’t have them.

> [@kersing](#):
>
> Or if you want to use a large block of ids, buy the block

It’s not a problem of mine, it’s a general problem of us all, having non-hardwase-numbered devices

> [@matthijs](#):
>
> but in practice it might be sufficient to use any identifier that is unique within the AppEUI. Any overlap in DevEUI can be handled, as long as the AppEUI is different.

THANKS!

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [May 12, 2016, 7:47am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/11 "2016-05-12T07:47:57Z")

</div>

> [@matthijs](#):
>
> in practice it might be sufficient to use any identifier that is unique within the AppEUI

For development this should be okay.

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [May 12, 2016, 8:49am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/12 "2016-05-12T08:49:18Z")

</div>

but can you buy just a few of these chips ?  
maybe in the future in the TTN webshop… a special 'hard to get for hobbyist chip page with special discounts ’ 🕶

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [May 13, 2016, 8:10am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/13 "2016-05-13T08:10:13Z")

</div>

Or start selling EUIs in the webshop

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [May 13, 2016, 8:44am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/14 "2016-05-13T08:44:22Z")

</div>

unavoidable, there is no free in free beer in the future imho 🕶

\*\* from the perspective of the hardware designer, its off course very important to know now, if your integrated micro chip 24AA02E64 in your node design, are worthless in the (near) future\*

---

<div class="post-metadata">

**Author:** ![gonzalo](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gonzalo/32/40499_2.png) [@gonzalo](https://www.thethingsnetwork.org/forum/u/gonzalo)\
**Post date:** [May 13, 2016, 8:47am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/15 "2016-05-13T08:47:12Z")

</div>

Aren’t there any cheap RFID / NFC tags with EUIs pre-burned onto them? If so, it would serve dual purpose, not only gives you an id, but also makes it easy to get the id of a sensor by just moving your phone close to it.

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [May 13, 2016, 9:15am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/16 "2016-05-13T09:15:42Z")

</div>

> [@BoRRoZ](#):
>
> free beer

The trick with free beer is usually that someone else pays for it.

For AppEUIs we solved this by buying a [block of EUIs](http://standards.ieee.org/develop/regauth/oui36/index.html). Maybe we could crowdfund another block for DevEUIs, but it’s probably easier to just buy some cheap (less €0.30) chips that have an EUI. Just search for “EUI” on [farnell.com](http://farnell.com) 😉

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [May 13, 2016, 9:24am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/17 "2016-05-13T09:24:27Z")

</div>

exactly, but you cannot buy just 10 chips… thats why I suggested the TTN webshop to the rescue, maybe in cooperation with Micro Chip / Semtech , maybe a combined purchase effort…or what you suggest a crowdfund.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [May 13, 2016, 10:28am UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/18 "2016-05-13T10:28:32Z")

</div>

> [@BoRRoZ](#):
>
> but you cannot buy just 10 chips

You can even buy singles at Farnell if you are a business customer, so 10 is not problem at all. For Dutch private customers I know of at least one electronics parts retailer willing to order and resell parts from Farnell, however the overhead cost for each order would make the chips relatively expensive.

---

<div class="post-metadata">

**Author:** ![Batilan](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/batilan/32/38420_2.png) [@Batilan](https://www.thethingsnetwork.org/forum/u/Batilan)\
**Post date:** [May 13, 2016, 2:26pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/19 "2016-05-13T14:26:33Z")

</div>

> [@htdvisser](#):
>
> Maybe we could crowdfund another block for DevEUIs,

I like the idea of crowdfunding a block of DevEUI’s. How about if TTN buys these and offers them on [the TTN webshop](https://shop.thethingsnetwork.com/)? I’ll buy 10 at least (for starters). 😊

---

<div class="post-metadata">

**Author:** ![gonzalo](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gonzalo/32/40499_2.png) [@gonzalo](https://www.thethingsnetwork.org/forum/u/gonzalo)\
**Post date:** [May 13, 2016, 9:31pm UTC](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093/20 "2016-05-13T21:31:01Z")

</div>

> [@Batilan](#):
>
> I’ll buy 10 at least

same here.

[Next page](https://www.thethingsnetwork.org/forum/t/deveui-for-non-hardware-assigned-values/2093.md?page=2)
