Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
python3 TLV_write.py <i2c_bus> <eeprom_address> [--yes] [-b] <key> <value> <key> <value> ...

...

Argument

Description

i2c_bus

The I2C bus number.

eeprom_address

The EEPROM address (hex or decimal).

--yes
-y
--force

Automatically confirms the operation (skips user confirmation).

-b

Writes the TLV data to a binary file (/tmp/eeprom_tlv.bin) without writing to the EEPROM. You can later write it manually using dd.

<key> <value>

One or more key-value pairs to write to EEPROM.

...

Panel
bgColor#FFFFFF

eeprom example for this :

Code Block
python3 TLVwriter.py 3 0x50 TLV_CODE_SYS_NAME "EmbeddedDevice" \
      TLV_CODE_SYS_SKU "ED-2024" \
      TLV_CODE_SYS_SERIAL_NUMBER "SN123456789" \
      TLV_CODE_SYS_VERSION "01.02" \
      TLV_CODE_FAMILY "Industrial" \
      TLV_CODE_MANUF_NAME "Solid-Run" \
      TLV_CODE_MANUF_DATE "2024-03-11" \
      TLV_CODE_PLATFORM_NAME "Bedrock-IPC"

00: 54 6c 76 49 6e 66 6f 00 01 65 0030 0e 45 6d 62 TlvInfo.?e.0?Emb
10: 65 64 64 65 64 44 65 76 69 63 65 3107 45 44 2d eddedDevice1?ED-
20: 32 30 32 34 32 0b 53 4e 31 32 33 34 35 36 37 38 20242?SN12345678
30: 39 33 05 30 31 2E 30 32 20 0a 49 6e 64 75 73 74 93?01.02?Indust
40: 72 69 61 6c 25 09 73 6f 6c 69 64 2d 72 75 6e 23 rial%.solid-run#
50: 0a 32 30 32 34 2d 30 33 2d 31 31 24 0b 42 65 64 .2024-03-11$.Bed
60: 72 6f 63 6b 2d 49 50 43 fe 04 6e 7e c0 fd 00 00 rock-IPC??n~??
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: ……

header

version

Total Payload Length (little endian)

Type

Length

Value

crc checksum TLV

...