# Hex, lsb or msb?

**URL:** <https://www.thethingsnetwork.org/forum/t/hex-lsb-or-msb/2809>\
**Category:** Application Development\
**Created:** [July 15, 2016, 1:49am UTC](https://www.thethingsnetwork.org/forum/t/hex-lsb-or-msb/2809 "2016-07-15T01:49:24Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [February 4, 2019, 5:04pm UTC](https://www.thethingsnetwork.org/forum/t/hex-lsb-or-msb/2809/10 "2019-02-04T17:04:46Z")

</div>

For future reference, when using LMIC:

In TTN Console, go to Applications, find your application and then find your device. Configure it **for OTAA** , and save the settings. Next, if things look like this for the configuration of your device:

![MSB](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/2/1/217ea804ea52bdfe32ab7fdae14542cd6a7e41ea.png)

…then for LMIC, click the `<>` icon (showing “hex/C-style” when hovering your mouse over it) and `⇄` icon (showing “lsb/msb” when hovering) to the left of the Device EUI and Application EUI, to get “C-style” and “lsb” for those two. Also click the `<>` icon to get “C-style” and “msb” for the App Key.

When done, this should get you two values labeled as “lsb”, and one as “msb”:

![LSB and MSB](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/9/9/999774f7054b7127a83324832716cda99f2b7b24.png)

Next, use the clipboard icon `⎘` to the right of all values to copy them into your LMIC code. As every TTN provided AppEUI [starts with 0x70B3D57ED](https://www.thethingsnetwork.org/docs/lorawan/address-space.html#applications), you’ll see that in LSB format the LMIC APPEUI **ends with** `0xD5, 0xB3, 0x70 }`.

**For ABP** AppSKey and NwkSKey, LMIC wants MSB instead.

See: [Format of Keys and ID's for Arduino LMIC libraries [HowTo]](https://www.thethingsnetwork.org/forum/t/format-of-keys-and-ids-for-arduino-lmic-libraries-howto/28243)

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/hex-lsb-or-msb/2809)._
