How to send IPMI commands over I2C?

3.3k views Asked by At

I am looking into trying to run ipmitool over I2C and was wondering if this is supported. I have a raspberry Pi connected via I2C to another device that has a BMC. I have the character device /dev/i2c-1 which I can use to write I2C commands to but I am hoping to be able to send IPMI commands instead, such as with ipmitool.

If I connect the Pi and other system both to the same network, I can still send commands over ipmitool's lanplus interface but that is not what I want to do. I would like to see if sending them over I2C is possible.

Most commands I run with ipmitool seem to attempt to open the file /dev/ipmi-N which doesn't exist on my raspberry pi. I checked the driver support in the kernel for getting that (https://www.kernel.org/doc/html/latest/driver-api/ipmi.html) and made sure that my kernel has ipmi_msghandler, ipmi_devintf, and ipmi_ssif compiled into it. But still no luck. I suspect the issue is that I haven't correctly configured the ipmi_ssif driver on the kernel command line. Am I on the right path with this? I determined the i2c address with i2cdetect -y 1 and it shows up as 0x10. Dumping the file cat /sys/class/i2c-adapter/i2c-1/name shows me that my adapter is bcm2835. This led me to try to add ipmb_ssif.addr=0x10 ipmi_ssif.adapter=bcm2835 ipmi_ssif.dbg=1,2,4,8 ipmi_ssif.dbg_probe=1 to the kernel command line. However, I didn't specify anything for ipmi_ssif.slave_addrs, ipmi_ssif.tryacpi, or ipmi_ssif.trydmi which admittedly could be my problem. I don't know if it could also be just something with the raspberry Pi maybe not having some support for this or something. Any ideas?

I also tried the driver ipmi_si, although the Pi doesn't seem to have the hardware support for this. I suspect that's trying to access a BMC locally instead of trying to go over I2C. Since the ipmi_ssif talks about going over an SMBus that seemed like the one that I wanted.

I did also looked through some of the other interfaces that ipmitool supports and went down a bit of a rabbit hole with the ipmb-dev-int driver (https://www.kernel.org/doc/html/latest/driver-api/ipmb.html) since that also looked promising and originally mistook it for imb interface. But it doesn't look like ipmitool has that as an interface. But perhaps there is another one there that might be a better option for what I am trying to do. Maybe the free interface for working with freeipmi?

Any ideas would be greatly appreciated!

1

There are 1 answers

0
Andrew On

I posted a similar question to the folks who maintain ipmitool https://github.com/ipmitool/ipmitool/discussions/296 and one of the maintainers there helped me out by pointing me to another ipmb driver https://github.com/Mellanox/ipmb-host that looks like I might be able to use in combination with the OpenIPMI interface.