Versions Compared

Key

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

...

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).

<key> <value>

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

Example Usage

For example if we want the following data to appear in DMI:

Code Block
Handle 0xXXXX, DMI type 1, XX bytes
System Information
	Manufacturer: XXXXX
	Product Name: MySystem
	Version: 1.0
	Serial Number: XXXXXX
	UUID: XXXXXX-XXXXX-XXXXX-XXXXX-XXXXX
	Wake-up Type: XXXXXXXXXXXX
	SKU Number: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
	Family: XXXXXXXXXXXXXXXXXXXXXXX

We want to run the following command (Note that bus 2 is used in this example):

Code Block
python3 TLV_write.py 2 0x50 TLV_CODE_SYS_NAME "MySystem" TLV_CODE_SYS_VERSION "1.0"
Panel
panelIconId1f9d0
panelIcon:face_with_monocle:
panelIconText🧐
bgColor#B3D4FF

this usage writes:

  • System name: MySystem

  • i2c_bus: 2

  • eeprom_address: 0X50.

    Info

    Finding the I2C Bus Number

    To determine the correct I2C bus number, run the following command:

    Code Block
    sudo i2cdetect -y 1

    If no EEPROM device is found, repeat the command with different bus numbers (e.g., 2, 3, 4, etc.) until you detect an address 0x50 or 0x56. Once found, use the corresponding bus number in the script.

    Example:

    Code Block
    sudo i2cdetect -y 2

    If the output shows:

    Code Block
         0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
    00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    Then bus 2 and address 0x50 should be used in the script.

    ...

    Anchor
    TLV_KEYS_ANCH
    TLV_KEYS_ANCH
    Supported TLV Keys

    ...