Table of Contents
Restoring lost serial numbers in Chroma tags.
One of the sectors of the Chroma's SPI EEPROM contains unique per tag information such as the tag's serial number. The firmware uses this serial number to generate the OEPL MAC address.
If the firmware is unable to read the serial number from the EEPROM it sets the MAC address to a default serial value ending in 8 zeros. Since every tag must have a unique MAC address this becomes a problem if you have more than one tag with an corrupted EEPROM.
The lost serial number can be restored by patching the OEPL firmware using a Python script. Reflashing the tag with the patched firmware will correct the serial number and hence the MAC address.
Important
The firmware only resets the SN if when it's corrupt or it ends with 8 zeros, so be careful not to flash two tags with the same SN!
It is easiest to patch and reflash the tag while it is being programmed the first time, but it also possible to patch an OTA update at a later time.
SN patching utility
Requirements
- Python 3.14 or later.
- intelhex Python library.
- patch_sn.py script
The patch_sn.py script can be found here.
The script can be used to patch full firmware images (hex or binary) as well as OTA updates.
To correct a tag's serial number:
- Install the requirements
- Run patch_sn.py giving it the path to the full image or OTA update to patch and the desired serial number.
- Reflash or update the tag with the patched file.
For example:
skip@Dell-5510:~/$ python --version
Python 3.10.6
skip@Dell-5510:~/$ pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting intelhex==2.3.0
Using cached intelhex-2.3.0-py2.py3-none-any.whl (50 kB)
Installing collected packages: intelhex
Successfully installed intelhex-2.3.0
skip@Dell-5510:~/$ python patch_sn.py
usage: patch_sn.py [-h] filename [SN]
patch_sn.py: error: the following arguments are required: filename
skip@Dell-5510:~/$ python patch_sn.py chroma29_full_0010.bin JA00123456
SN in full binary file changed from JA00000000 to JA00123456
If patch_sn.py is run without a serial number it simply displays the serial number currently in the image and exits.
skip@Dell-5510:~/$ python patch_sn.py chroma29_full_0010.bin
SN is JA00123456