9. Serial Number & MAC Address

9.1. Serial Number

Each PX30-uQ7 module has a unique serial number that can be read by software.

In U-Boot, the serial number is contained in the environment variable serial#. You can print it using the command:

printenv serial#

Under Linux, it is represented by a simple text file in /sys:

cat /sys/firmware/devicetree/base/serial-number

The serial number is fixed in hardware (derived from the SoC CPU ID) and cannot be modified.

9.2. MAC Address

By default, the MAC address of each module is a random value derived from the serial number. The properties of this default MAC address are:

  • It is a Locally Administered Address: The U/L bit of the MAC address is set to 1

  • It is not guaranteed to be globally unique

  • The address is fixed for each module. It stays constant across reboots as it is deterministically derived from the serial number

To set your own Universally Administered Address, you overwrite the U-Boot environment variable ethaddr. On the U-Boot prompt, with XX:XX:XX:XX:XX:XX replaced by your MAC address:

setenv ethaddr XX:XX:XX:XX:XX:XX
saveenv

The MAC address can be queried from the U-Boot prompt using:

printenv ethaddr

To reset the MAC address to the default value, run:

env delete ethaddr
saveenv