Getting iMX8 serial number from userspace


I’m trying to get the Toradex iMX8 serial number from user space so I can have a unique ID for each of my boards. I see that the serial number can usually be obtain with the following:

cat /proc/device-tree/serial-number

but when I use that command, this is what I get in return:

root@colibri-imx8x:~#  cat /proc/device-tree/serial-number

I also tried:

root@colibri-imx8x:~# hexdump -C /proc/device-tree/serial-number
00000000  00 00 00 00 00 00 00 00  00                       |.........|

So I wanted to know if I’m doing something wrong or if there is another way to obtain the serial number.


Michael Brown

What exact hardware (module and carrier board) and software versions of things are you talking about? As this works just fine for meTM:

TDX Wayland with XWayland 2.6-snapshot colibri-imx8x ttyLP3

Colibri-iMX8X_Qt5-X11-Image 3.0b3.60-nightly 20191113

colibri-imx8x login: root
Last login: Thu Nov 21 17:41:47 UTC 2019 on tty7
root@colibri-imx8x:~# cat /proc/device-tree/serial-number; echo

I’m using the iMX8QXP 2GB WB IT V1.0B

I was previously using a custom carrier board but popped the same module on to an Iris V1.1B as a control and I’m getting the same response.

I was using: TDX Wayland with XWayland 2.6-snapshot-20190827 (thud)
So maybe I can try a newer image like yours.

It doesn’t matter which carrier board are you using.

Let us know once you tried this with the newer image.

Thanks and Best regards,