| #
cf77ef54
|
| 02-Sep-2025 |
Jagpal Singh Gill <paligill@gmail.com> |
add firmware inventory support
Add support to display the firmware version using the Firmware version register from EM configuration. The version will be exposed as xyz.openbmc_project.Software.Vers
add firmware inventory support
Add support to display the firmware version using the Firmware version register from EM configuration. The version will be exposed as xyz.openbmc_project.Software.Version interface on the Dbus.
Tested: Unit Test - ``` > meson test -t 10 -C builddir/ --print-errorlogs --wrapper="valgrind --error-exitcode=1" test_firmware ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir' ninja: no work to do. 1/1 test_firmware OK 3.37s
Ok: 1 Fail: 0 ```
Tested on Qemu - ``` > busctl tree xyz.openbmc_project.ModbusRTU `- /xyz `- /xyz/openbmc_project |- /xyz/openbmc_project/inventory_source | |- /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB0 | |- /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB1 | |- /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB0 | `- /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB1 |- /xyz/openbmc_project/sensors | `- /xyz/openbmc_project/sensors/temperature | |- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Inlet_Temp_C | |- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Outlet_Temp_C | |- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Inlet_Temp_C | `- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Outlet_Temp_C `- /xyz/openbmc_project/software |- /xyz/openbmc_project/software/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_PLC_FW_Revision_9071 `- /xyz/openbmc_project/software/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_PLC_FW_Revision_8053
> busctl introspect xyz.openbmc_project.ModbusRTU /xyz/openbmc_project/software/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_PLC_FW_Revision_9071 NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.Association.Definitions interface - - - .Associations property a(sss) 1 "running" "ran_on" "/xyz/openbmc_pr... emits-change writable xyz.openbmc_project.Software.Activation interface - - - .Activation property s "xyz.openbmc_project.Software.Activat... emits-change writable .RequestedActivation property s "xyz.openbmc_project.Software.Activat... emits-change writable xyz.openbmc_project.Software.Version interface - - - .Purpose property s "xyz.openbmc_project.Software.Version... emits-change writable .Version property s "ABABABAB" emits-change writable ```
Change-Id: I985e12ef88547585cca93569b083f347e74a8695 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
| #
e92aba45
|
| 16-Oct-2025 |
Jagpal Singh Gill <paligill@gmail.com> |
rtu: implement modbus sensor read
Read the modbus device config from the Entity Manager configuration and create the sensor interfaces for related sensor register config.
Tested: Added new Unit tes
rtu: implement modbus sensor read
Read the modbus device config from the Entity Manager configuration and create the sensor interfaces for related sensor register config.
Tested: Added new Unit test named test_sensors - ``` > meson test -t 10 -C builddir/ --print-errorlogs --wrapper="valgrind --error-exitcode=1" test_sensors ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir' [2/2] Linking target tests/test_sensors 1/1 test_sensors OK 13.98s
Ok: 1 Fail: 0 ```
Tested on Qemu using Mock Modbus Device - ``` root@ventura:~# busctl tree xyz.openbmc_project.ModbusRTU └─ /xyz └─ /xyz/openbmc_project ├─ /xyz/openbmc_project/inventory_source │ ├─ /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB0 │ ├─ /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB1 │ ├─ /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB0 │ └─ /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB1 └─ /xyz/openbmc_project/sensors └─ /xyz/openbmc_project/sensors/temperature ├─ /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Inlet_Temp_C ├─ /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Outlet_Temp_C ├─ /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Inlet_Temp_C └─ /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Outlet_Temp_C
busctl introspect xyz.openbmc_project.ModbusRTU /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Outlet_Temp_C NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.Sensor.Value interface - - - .MaxValue property d nan emits-change writable .MinValue property d nan emits-change writable .Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable .Value property d 1670.6 emits-change writable ```
Change-Id: I1368e8df5999b5cee9ac19d185ee110a9ecc3021 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
| #
cad9ecf6
|
| 22-Oct-2025 |
Jagpal Singh Gill <paligill@gmail.com> |
rtu: implement modbus rtu inventory source service
Implement phosphor-modbus-rtu inventory source service based on [1].
[1]: https://gerrit.openbmc.org/c/openbmc/docs/+/77318
Tested: Unit test pas
rtu: implement modbus rtu inventory source service
Implement phosphor-modbus-rtu inventory source service based on [1].
[1]: https://gerrit.openbmc.org/c/openbmc/docs/+/77318
Tested: Unit test passes and tested on qemu with simulated modbus server. ``` root@bmc:~# busctl tree xyz.openbmc_project.ModbusRTU └─ /xyz └─ /xyz/openbmc_project └─ /xyz/openbmc_project/inventory_source └─ /xyz/openbmc_project/inventory_source/modbus ├─ /xyz/openbmc_project/inventory_source/modbus/Heat_Exchanger_12_DevTTYUSB0 ├─ /xyz/openbmc_project/inventory_source/modbus/Heat_Exchanger_12_DevTTYUSB1 ├─ /xyz/openbmc_project/inventory_source/modbus/Reservoir_Pumping_Unit_12_DevTTYUSB0 └─ /xyz/openbmc_project/inventory_source/modbus/Reservoir_Pumping_Unit_12_DevTTYUSB1 root@bmc:~# busctl tree xyz.openbmc_project.EntityManager └─ /xyz └─ /xyz/openbmc_project ├─ /xyz/openbmc_project/EntityManager └─ /xyz/openbmc_project/inventory └─ /xyz/openbmc_project/inventory/system ├─ /xyz/openbmc_project/inventory/system/board │ └─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus │ ├─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/DevTTYUSB0 │ ├─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/DevTTYUSB1 │ ├─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/Heat_Exchanger │ └─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/Reservoir_Pumping_Unit └─ /xyz/openbmc_project/inventory/system/chassis ├─ /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB0 ├─ /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB1 ├─ /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB0 └─ /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB1
root@bmc:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.AddObject interface - - - .AddObject method a{sv} - - xyz.openbmc_project.Inventory.Decorator.Asset interface - - - .BuildDate property s "Unknown" emits-change .Manufacturer property s "Unknown" emits-change .Model property s "Unknown" emits-change .PartNumber property s "Unknown" emits-change .SerialNumber property s "Unknown" emits-change .SparePartNumber property s "ABABABAB" emits-change xyz.openbmc_project.Inventory.Item.Chassis interface - - - .Name property s "Heat Exchanger 12 DevTTYUSB0" emits-change .Probe property s "xyz.openbmc_project.Inventory.Source.M… emits-change .Type property s "Chassis" emits-change root@bmc:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB1 NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.AddObject interface - - - .AddObject method a{sv} - - xyz.openbmc_project.Inventory.Decorator.Asset interface - - - .BuildDate property s "Unknown" emits-change .Manufacturer property s "Unknown" emits-change .Model property s "Unknown" emits-change .PartNumber property s "Unknown" emits-change .SerialNumber property s "Unknown" emits-change .SparePartNumber property s "ABABABAB" emits-change xyz.openbmc_project.Inventory.Item.Chassis interface - - - .Name property s "Heat Exchanger 12 DevTTYUSB1" emits-change .Probe property s "xyz.openbmc_project.Inventory.Source.M… emits-change .Type property s "Chassis" emits-change
root@bmc:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.AddObject interface - - - .AddObject method a{sv} - - xyz.openbmc_project.Inventory.Decorator.Asset interface - - - .BuildDate property s "ABABABAB" emits-change .Manufacturer property s "Unknown" emits-change .Model property s "ABABABABABABABAB" emits-change .PartNumber property s "Unknown" emits-change .SerialNumber property s "ABABABABABABABAB" emits-change .SparePartNumber property s "ABABABAB" emits-change xyz.openbmc_project.Inventory.Item.Chassis interface - - - .Name property s "Reservoir Pumping Unit 12 DevTTYUSB0" emits-change .Probe property s "xyz.openbmc_project.Inventory.Source.M… emits-change .Type property s "Chassis" emits-change root@bmc:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB1 NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.AddObject interface - - - .AddObject method a{sv} - - xyz.openbmc_project.Inventory.Decorator.Asset interface - - - .BuildDate property s "ABABABAB" emits-change .Manufacturer property s "Unknown" emits-change .Model property s "ABABABABABABABAB" emits-change .PartNumber property s "Unknown" emits-change .SerialNumber property s "ABABABABABABABAB" emits-change .SparePartNumber property s "ABABABAB" emits-change xyz.openbmc_project.Inventory.Item.Chassis interface - - - .Name property s "Reservoir Pumping Unit 12 DevTTYUSB1" emits-change .Probe property s "xyz.openbmc_project.Inventory.Source.M… emits-change .Type property s "Chassis" emits-change ```
Change-Id: Ic0ea739de3833044c95da8164be1e2f3f8e6a063 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
| #
a32d241b
|
| 01-Oct-2025 |
Jagpal Singh Gill <paligill@gmail.com> |
modbus_rtu_lib: implement library APIs
Implement modbus-rtu library APIs which will be used by phosphor-modbus-rtu service based on [1].
[1]: https://gerrit.openbmc.org/c/openbmc/docs/+/77318
Test
modbus_rtu_lib: implement library APIs
Implement modbus-rtu library APIs which will be used by phosphor-modbus-rtu service based on [1].
[1]: https://gerrit.openbmc.org/c/openbmc/docs/+/77318
Tested: Added a Mock Modbus RTU server using socat which intercepts and replies to modbus messages for testing. ``` > meson test -C builddir ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir' ninja: no work to do. 1/2 test_modbus_commands OK 0.01s 2/2 test_modbus OK 6.02s
Ok: 2 Fail: 0 ```
Change-Id: I66cdc8fd930dd6f7ad6888116d1419ad8f8b8ed8 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|