Dell S5248F-ON Open Networking Hardware Diagnostic Guide December 2021 - Page 35

i2ctool, get output, Tests, CLI options

Page 35 highlights

get output root@dell-diag-os:~# gpiotool --get --pin=1 Chip 0 Core Gpio bits: 60 CORE gpiochip196 Bit Name Dir Value set output root@dellemc-diag-os:~# gpiotool --set --pin=1 --val=1 i2ctool The i2ctool allows for scanning, reading, and writing of the I2c bus devices. To read and write to devices on the i2c bus, use the i2ctool. The i2ctool also scans the i2c busses and reports what devices are found. The scan reads address 0x0 from all the devices in the address range of 0x0 to 0x7f on all i2c busses present. The i2ctool does not automatically traverse MUXes along the i2c bus. Other tools use this tool to read i2c device information and pass the results back through a named pipe. Tests To test, the i2ctool has a configuration file that lists all the devices on the busses. The tool runs through the list and tries to reach the devices. The i2ctool reports when a device is not returning data. CLI options DellEmc Diag - I2C Tool version 1.5, x.xx.x.x-x build, 2017/05/23, Syntax: i2ctool To Scan the (Specific) I2C devices:= i2ctool --scan [--bus=/dev/i2c-] (or) i2ctool -n [-b /dev/i2c-] To Test the pre-programmed configuration or from config file:= i2ctool --test [--config=] (or) i2ctool -t [-f ] Execute repeatedly command by count:= i2ctool --iteration=max/ [option1] [option2]... (or) i2ctool -I max/ [option1] [option2]... Read:= i2ctool --read --bus=/dev/i2c- --addr= --reg= --count= --width= --display_size= (or) i2ctool -r -b /dev/i2c- -a -R -C -W -D Read(16 bit addressing):= i2ctool --read --bus=/dev/i2c- -- addr= --reg16= [--reg_le] --count= --width= -- display_size= (or) i2ctool -r -b /dev/i2c- -a -o [-L] -C -W -D Write:= i2ctool --write --bus=/dev/i2c- --addr= --reg= --width= --val= (or) Dell EMC DAIG-OS tools 35

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82

get output
root@dell-diag-os:~# gpiotool --get --pin=1
Chip 0
Core Gpio
bits: 60 CORE gpiochip196
===================================
Bit
Name
Dir
Value
===================================
set output
root@dellemc-diag-os:~# gpiotool --set --pin=1 --val=1
i2ctool
The
i2ctool
allows for scanning, reading, and writing of the
I2c
bus devices.
To read and write to devices on the
i2c
bus, use the
i2ctool
. The
i2ctool
also scans the
i2c
busses and reports what
devices are found. The scan reads address 0x0 from all the devices in the address range of 0x0 to 0x7f on all
i2c
busses
present. The
i2ctool
does not automatically traverse MUXes along the
i2c
bus. Other tools use this tool to read
i2c
device
information and pass the results back through a named pipe.
Tests
To test, the
i2ctool
has a configuration file that lists all the devices on the busses. The tool runs through the list and tries to
reach the devices. The
i2ctool
reports when a device is not returning data.
CLI options
DellEmc Diag - I2C Tool
version 1.5, x.xx.x.x-x
build, 2017/05/23,
Syntax: i2ctool <option>
To Scan the (Specific) I2C devices:=
i2ctool --scan [--bus=/dev/i2c-<bus_number>]
(or)
i2ctool -n [-b /dev/i2c-<bus_number>]
To Test the pre-programmed configuration or from config file:=
i2ctool --test [--config=<config_file_name>]
(or)
i2ctool -t [-f <config_file_name>]
Execute repeatedly command by count:=
i2ctool --iteration=max/<count> [option1] [option2]...
(or)
i2ctool -I max/<count> [option1] [option2]...
Read:=
i2ctool --read --bus=/dev/i2c-<bus_number> --addr=<address> --reg=<register>
--count=<count> --width=<width> --display_size=<display_size>
(or)
i2ctool -r -b /dev/i2c-<bus_number> -a <address> -R <register> -C <count> -W
<width> -D <display_size>
Read(16 bit addressing):=
i2ctool --read --bus=/dev/i2c-<bus_number> --
addr=<address> --reg16=<register(16bit)> [--reg_le] --count=<count> --width=<width> --
display_size=<display_size> (or)
i2ctool -r -b /dev/i2c-<bus_number> -a <address> -o <register(16bit)> [-L] -C
<count> -W <width> -D <display_size>
Write:=
i2ctool --write --bus=/dev/i2c-<bus_number> --addr=<address> --reg=<regiser>
--width=<width>
--val=<value>
(or)
Dell EMC DAIG-OS tools
35