Getting Started
Page 28
2.7.1.1
Accessing SMBus/I2C Devices via Generic Access using smb2_ctrl
The
smb2_ctrl
tool provides direct access to any SMBus/I2C device.
The tool provides two different operation modes:
Command Line Interface (CLI) Mode: The tool operates in this mode when you call
smb2_ctrl
only with the device name parameter, e.g.:
smb2_ctrl smb2_1
. Then you will
get a CLI that asks you for further actions.
Command Mode: Call
smb2_ctrl
with the device name parameter and at least the
action (i.e. the command) you want to perform. E.g.:
smb2_ctrl smb2_1 rb
Note: The command mode is useful to script the tool.
For a detailed description about all supported tool options, just call
smb2_ctrl
, e.g.:
Usage Examples
List all available SMB devices at SMBus instance
smb2_1
:
Access the board information EEPROM (SMB address
0xAC
) to read byte at offset 8:
Access the CPU board BMC (in this example at SMB address
0x9C
) to read out the
operating hours counter:
Access the CPU board BMC (in this example at SMB address
0x9C
) to set the upper
limit of the watchdog to 200 ms:
C:\MEN\ErtcSmb\Applications>
smb2_ctrl
>
smb2_ctrl smb2_1 list
>
smb2_ctrl smb2_1 rbd -a=0xac -o=0x8
>
smb2_ctrl smb2_1 rbk -a=0x9c -o=0x94
>
smb2_ctrl smb2_1 wwd -a=0x9c -o=0x14 -d=0x0002