...
Table of Contents
...
We want to run the following command (Note that bus 2 3 address 0X50 is used in this example):
Code Block |
---|
python3 TLV_write.py 23 0x50 TLV_CODE_SYS_NAME "MySystem" TLV_CODE_SYS_VERSION "1.0" |
Panel |
---|
panelIconId | atlassian-info |
---|
panelIcon | :info: |
---|
bgColor | #F4F5F7 |
---|
|
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 "1.2.3" TLV_CODE_FAMILY "Industrial" TLV_CODE_MANUF_NAME "TechCorp" TLV_CODE_MANUF_DATE "2024-03-11" TLV_CODE_PLATFORM_NAME "ARM Cortex-A72" |
00: 54 6c 76 49 6e 66 6f 00 01 65 00 30 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 31 2e 32 2e 33 20 0a 49 6e 64 75 73 74 93?1.2.3 ?Indust 40: 72 69 61 6c 25 08 54 65 63 68 43 6f 72 70 23 0a rial%?TechCorp#? 50: 32 30 32 34 2d 30 33 2d 31 31 24 0e 41 52 4d 20 2024-03-11$?ARM 60: 43 6f 72 74 65 78 2d 41 37 32 fe 04 6e 7e c0 fd Cortex-A72??n~?? 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ header version Total Payload Length Type Length Value crc checksum |
Info |
---|
Finding the I2C Bus NumberTo 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. |
...