Is there API for obtaining ipmi fru raw bytes? I need to work with custom FRU data. I've tried to use freeipmi library - but it seems it has only API to access custom fields and does not expose API to read whole fru buffer.
2 Answers
I am not sure if any library provides special API function for reading raw FRU data. As you noticed freeipmi and openipmi provides convenient functions that provides 'cooked' data.
But openipmi (I think freeipmi) as well provides API functions for sending raw commands and and IPMI commands to get raw FRU data. Openipmi has functions ipmi_send_command_addr()
and ipmi_mc_send_command()
and they send an IPMI command to a specified target.
To get raw fru data you need to issue IPMI command "Get FRU Inventory Area Info" to get FRU length and then issue IPMI command "Read FRU data".

- 3,155
- 3
- 24
- 42
In FreeIPMI 1.5.2 there is a new --read-fru and --write-fru option in bmc-device that allows you to read out a FRU into a file and write a FRU raw file back to a specific device ID. If you take a look at the code in bmc-device, perhaps that code would be sufficient for your needs.
It is specific to read/write for a specific device ID. But a loop and some error handling should enable you to obtain the entire FRU buffer.
Full Disclosure: I'm the maintainer of FreeIPMI.

- 313
- 1
- 5