openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ipmitool reading i2c devices
@ 2022-09-29  6:06 Patton, Schuyler
  2022-09-29  7:47 ` [External] " Zhang Jian
  0 siblings, 1 reply; 2+ messages in thread
From: Patton, Schuyler @ 2022-09-29  6:06 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 2829 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [External] ipmitool reading i2c devices
  2022-09-29  6:06 ipmitool reading i2c devices Patton, Schuyler
@ 2022-09-29  7:47 ` Zhang Jian
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang Jian @ 2022-09-29  7:47 UTC (permalink / raw)
  To: Patton, Schuyler; +Cc: openbmc

Hi Schuyler,

On Thu, Sep 29, 2022 at 2:22 PM Patton, Schuyler <spatton@ti.com> wrote:
>
> 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.
>
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
>
>
> 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
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-29  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29  6:06 ipmitool reading i2c devices Patton, Schuyler
2022-09-29  7:47 ` [External] " Zhang Jian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).