Getting module serial number at flash-time

Based on the wifi-config-check.sh script, it seems that there is an EEPROM on the TX1 module with a module serial number that we can query like this:

### Now try to get the serial number information of Module and Base board
  cvm_addr=0x50
  cvb_addr=0x57
  for I in $cvm_addr $cvb_addr ; do
    if [ "$I" = "$cvm_addr" ] ; then
      phrase=`echo "Serial Number of Module"`
    else
      phrase=`echo "Serial Number for Base board"`
    fi
  #  echo $phrase
    # First get the CVM serial number
    mapfile -t sn_lines < <( i2cdump -f -y -r 74-86 2 $I b )

    len=${#sn_lines[@]}
    if [ "$len" -ne "3" ]; then
            echo "FAILED to get $phrase!!"
            echo "EEPROM content:"
            i2cdump -f -y 2 $I b
    else 
    sn_str1=$(echo ${sn_lines[1]} | rev | cut -d' ' -f1 | rev)
    sn_str2=$(echo ${sn_lines[2]} | rev | cut -d' ' -f1 | rev)
    sn_str=$sn_str1$sn_str2
    echo "$phrase is $sn_str"
    fi
  done

Which prints something like:

Serial Number of Module is 0331516020892
Serial Number for Base board is 0320716036192

In addition, with the devkit in recovery mode it seems that we can use tegrarcm to query a chip UID. ‘./tegrarcm --uid’ prints something like this:

BR_CID: 0x3210100164105749240000000a008300
  1. Does anyone know the relationship (if any) between this UID and the module serial number?
  2. is it possible to get the module serial number using tegrarcm?
  3. is it possible to get the “chip UID” at runtime on the system?
  4. would either of these be better as a unique system identifier?

I’m considering using one of these two values to generate “UID”-based values for automatic configuration. Things like hostname (i.e. using hostnames like jetsonXXXXX where XXXXX is some value generated from the serial number or chip UID). I’d prefer to use something that can be queried before the system is flashed (i.e. while it is in recovery mode), so that I can flash the correct configuration and not need any post-first-boot script.

Hello, josh_sky:
Generally, the chip UID is read from fuse, which is chip-specific. ‘module serial number’ you’ve got from script is stored in EEPROM, which is module-specific.

You can implement your own method to classify the board you make.

br
ChenJian

This works well for the X1 but is there an equivalent I2C address for the X2 to read the module serial number?

Hi dan_w,

Please file another topic for TX2 issue into TX2 board.

Thanks