Skip to contentSkip to conversation

ipmitool reading i2c devices

DISCUSSION Patton, Schuyler 2 participants 2 messages Sep 29, 2022

lore
Share & tools
lore
#0 lore raw

Hi all,
I am trying to use an ipmitool running on a Linux PC and trying to read the i2c bus on a board running openbmc. This is the command I am using:
Ipmitool -v -I lanplus -H <ip address> -C 17 -U root -P 0penBmc i2c bus=1 0x40 2

Looking at the apphandler.cpp code I see that a white list is required. I added one based on the format described in the cpp source file. This is the error I am seeing:

I2C Master Write-Read command failed: Invalid command.

Othe ipmitool commands work such as bmc info. Is there additional config that I need to do to be able to read a device on an I2C bus?

Thanks and Regards,
Schuyler Patton

#1 lore raw

Hi Schuyler,

Quoted 9 lines · Schuyler

Hi all,

I am trying to use an ipmitool running on a Linux PC and trying to read the i2c bus on a board running openbmc. This is the command I am using:

Ipmitool -v -I lanplus -H <ip address> -C 17 -U root -P 0penBmc i2c bus=1 0x40 2

Quoted 6 lines

Looking at the apphandler.cpp code I see that a white list is required. I added one based on the format described in the cpp source file. This is the error I am seeing:

I2C Master Write-Read command failed: Invalid command.

This command is dangerous and controlled by ENABLE_I2C_WHITELIST_CHECK,
There are 2 ways we can use this command,
1. Disable this option, let i2c-whitelist-check=disable, this is dangerous.
[0]: https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb#L29

2. Install a white list, see
https://github.com/openbmc/phosphor-host-ipmid/blob/master/apphandler.cpp#L1554

Quoted 11 lines

Othe ipmitool commands work such as bmc info. Is there additional config that I need to do to be able to read a device on an I2C bus?

Thanks and Regards,

Schuyler Patton