title: How to send IPMI commands over I2C?
body: <p>I am looking into trying to run <code>ipmitool</code> 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 <code>/dev/i2c-1</code> which I can use to write I2C commands to but I am hoping to be able to send IPMI commands instead, such as with <code>ipmitool</code>.</p>
  <p>If I connect the Pi and other system both to the same network, I can still send commands over ipmitool's <code>lanplus</code> interface but that is not what I want to do. I would like to see if sending them over I2C is possible.</p>
  <p>Most commands I run with <code>ipmitool</code> seem to attempt to open the file <code>/dev/ipmi-N</code> which doesn't exist on my raspberry pi. I checked the driver support in the kernel for getting that (<a href="https://www.kernel.org/doc/html/latest/driver-api/ipmi.html" rel="nofollow noreferrer">https://www.kernel.org/doc/html/latest/driver-api/ipmi.html</a>) and made sure that my kernel has <code>ipmi_msghandler</code>, <code>ipmi_devintf</code>, and <code>ipmi_ssif</code> compiled into it. But still no luck. I suspect the issue is that I haven't correctly configured the <code>ipmi_ssif</code> driver on the kernel command line. Am I on the right path with this? I determined the i2c address with <code>i2cdetect -y 1</code> and it shows up as <code>0x10</code>. Dumping the file <code>cat /sys/class/i2c-adapter/i2c-1/name</code> shows me that my adapter is <code>bcm2835</code>. This led me to try to add <code>ipmb_ssif.addr=0x10 ipmi_ssif.adapter=bcm2835 ipmi_ssif.dbg=1,2,4,8 ipmi_ssif.dbg_probe=1</code> to the kernel command line. However, I didn't specify anything for <code>ipmi_ssif.slave_addrs</code>, <code>ipmi_ssif.tryacpi</code>, or <code>ipmi_ssif.trydmi</code> 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?</p>
  <p>I also tried the driver <code>ipmi_si</code>, 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 <code>ipmi_ssif</code> talks about going over an SMBus that seemed like the one that I wanted.</p>
  <p>I did also looked through some of the other interfaces that <code>ipmitool</code> supports and went down a bit of a rabbit hole with the ipmb-dev-int driver (<a href="https://www.kernel.org/doc/html/latest/driver-api/ipmb.html" rel="nofollow noreferrer">https://www.kernel.org/doc/html/latest/driver-api/ipmb.html</a>) since that also looked promising and originally mistook it for imb interface. But it doesn't look like <code>ipmitool</code> 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 <em>free</em> interface for working with <code>freeipmi</code>?</p>
  <p>Any ideas would be greatly appreciated!</p>