# Identify device when booting in Serial Downloader mode

**URL:** <https://community.solid-run.com/t/identify-device-when-booting-in-serial-downloader-mode/633>\
**Category:** NXP i.MX8M Plus\
**Tags:** iMX8M-plus\
**Created:** [April 25, 2023, 3:47pm UTC](https://community.solid-run.com/t/identify-device-when-booting-in-serial-downloader-mode/633 "2023-04-25T15:47:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jetxeberria](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jetxeberria](https://community.solid-run.com/u/jetxeberria)\
**Post date:** [April 25, 2023, 3:47pm UTC](https://community.solid-run.com/t/identify-device-when-booting-in-serial-downloader-mode/633/1 "2023-04-25T15:47:53Z")

</div>

Hi,

We have a huge number of devices and we need to register them automatically in an internal inventory. We’re trying to unequivocally identify each device before flashing it, as a preliminary step in the flashing procedure. Hence, the device is booted in Serial Downloader mode.

Then, in that boot mode we need to gather at least this information:

- MAC
- Module Serial Number, or any other identifier that never changes and is unique for each device.

How could we get this information? We will need to include this gathering to a script to be run automatically.

Thanks in advance,  
Jose

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [April 26, 2023, 7:07am UTC](https://community.solid-run.com/t/identify-device-when-booting-in-serial-downloader-mode/633/2 "2023-04-26T07:07:10Z")

</div>

Are your devices being fused with the MAC address at the factory, or is the eeprom being programmed with TLV factory data?

---

<div class="post-metadata">

**Author:** ![jetxeberria](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jetxeberria](https://community.solid-run.com/u/jetxeberria)\
**Post date:** [April 26, 2023, 7:53am UTC](https://community.solid-run.com/t/identify-device-when-booting-in-serial-downloader-mode/633/3 "2023-04-26T07:53:00Z")

</div>

Currently, we’ve received a first batch programmed with TLV factory data, but we expect to receive the big batch fused. What would be the process to obtain that information in each case?

---

<div class="post-metadata">

**Author:** ![jetxeberria](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jetxeberria](https://community.solid-run.com/u/jetxeberria)\
**Post date:** [April 26, 2023, 10:59am UTC](https://community.solid-run.com/t/identify-device-when-booting-in-serial-downloader-mode/633/4 "2023-04-26T10:59:35Z")

</div>

In the case of MAC, we see it by:

- booting from eMMC
- connecting serial port with Minicom
- running ‘net list’

When booting in Serial Downloader mode, we’ve defined a custom ‘.lst’ file derived from the original ‘emmc\_burn\_all.lst’ containing 'FB: ucmd net list ’ and executed the ‘uuu’. However:

- The output is not seen in stdout
- We see the output in the Minicom console, but, the MAC that appears there is clearly wrong as it reports that:

eth1 : ethernet@30bf0000 00:00:00:00:00:00 active

How can we see and gather the output of uuu through the USB port, and get the proper value?

---

<div class="post-metadata">

**Author:** ![jetxeberria](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jetxeberria](https://community.solid-run.com/u/jetxeberria)\
**Post date:** [April 26, 2023, 11:51am UTC](https://community.solid-run.com/t/identify-device-when-booting-in-serial-downloader-mode/633/5 "2023-04-26T11:51:08Z")

</div>

Regarding the command ‘printenv’. Adding it to the ‘.lst’ file and running it with ‘uuu’ in Serial Downloader mode reports different variables than running it directly from u-boot when booting from eMMC.

Booting from eMMC:

eth1addr=6a:29:f9:3e:a9:3c  
ethact=ethernet@30bf0000  
ethprime=eth1

Booting in Serial Downloader mode, the unique variable referring to the ethernet is:

ethprime=eth1

---

<div class="post-metadata">

**Author:** ![jetxeberria](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jetxeberria](https://community.solid-run.com/u/jetxeberria)\
**Post date:** [April 27, 2023, 9:02am UTC](https://community.solid-run.com/t/identify-device-when-booting-in-serial-downloader-mode/633/6 "2023-04-27T09:02:33Z")

</div>

Surfing in the doc it says that MAC can be programmed in the TLV ([source](https://solidrun.atlassian.net/wiki/spaces/developer/pages/344883516/iMX8MP+EEPROM+Programming+-+TLV#Programming-from-U-Boot.1)):

> "The EEPROM can be programmed from the U-Boot cli accordingly by the following commands:  
> …  
> `tlv_eeprom set 0x24 '12:34:56:78:9a:bc'`

However, when I try to run `tlv_eeprom` in u-boot, well in the eMMC or in the uSD, it reports that:

> Unknown command ‘tlv\_eeprom’ - try ‘help’

And the `help` command shows no command related with tlv

Also, in that doc ([source](https://solidrun.atlassian.net/wiki/spaces/developer/pages/344883516/iMX8MP+EEPROM+Programming+-+TLV#SoM)), it points that there are some variables programmed in TLV such as:

```auto
TLV_CODE_SERIAL_NUMBER (mandatory)
TLV_CODE_DEVICE_VERSION (mandatory) Board Revision, incremented when parts or layout changes; MAJOR.MINOR revisions are encoded by storing MAJOR in the four most significant bits, MINOR in the four least significant bits.

```

How can I read that values? They are not in `printenv`.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![jetxeberria](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jetxeberria](https://community.solid-run.com/u/jetxeberria)\
**Post date:** [May 2, 2023, 8:49am UTC](https://community.solid-run.com/t/identify-device-when-booting-in-serial-downloader-mode/633/7 "2023-05-02T08:49:22Z")

</div>

Please @jnettlet , could you provide us some light in this topic?
