Faking Sensor Readings

rgrs rgrs at protonmail.com
Fri Dec 6 22:32:30 AEDT 2019


Hi,

I dont see any new service even after adding dbus-sensors.
Please can you point to any platform in upstream that I can refer to?

Thanks,
Raj

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, December 4, 2019 10:40 PM, James Feist <james.feist at linux.intel.com> wrote:

> On 12/4/19 1:39 AM, rgrs wrote:
>
> > Hi James,
> > I tried busctl set-property, but the values didn't change.
> > Are the steps below correct?
> > (test with both 'field mode' enabled and disabled)
> > root at obmc:~# busctl introspect xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value --no-pager
> > NAME TYPE SIGNATURE RESULT/VALUE FLAGS
> > .MaxValue property x 0 emits-change writable
> > .MinValue property x 0 emits-change writable
> > .Scale property x -3 emits-change writable
> > .Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable
>
> This looks like phosphor-hwmon, not dbus-sensors
> https://github.com/openbmc/dbus-sensors.
>
> > .Value property x 18500 emits-change writable
> > root at obmc:~# busctl --no-pager set-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value x 50000
> > root at saber:~# busctl --no-pager get-property xyz.openbmc_project.Hwmon-2439434288.Hwmon1 /xyz/openbmc_project/sensors/temperature/INLET_TEMP xyz.openbmc_project.Sensor.Value Value
> > x 18500
> > root at obmc:~#
> > Thanks,
> > Raj
> > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> > On Wednesday, December 4, 2019 1:34 AM, James Feist james.feist at linux.intel.com wrote:
> > > On 12/3/19 5:49 AM, Alexander Amelkin wrote:
> > >
> > > > 03.12.2019 15:06, rgrs wrote:
> > > >
> > > > > Hi,
> > > > > How do I fake sensor readings in OpenBMC?
> > > > > We're trying to fake temperature sensors and make sure fans ramp up/down
> > > > > accordingly.
> > > >
> > > > We ended up patching the kernel driver to fake the readings by request.
> > > > I'm not aware of any ready interface in OpenBMC for that.
> > >
> > > If you're using d-bus sensors, the sensor property is writable. It is
> > > also supported by patching the sensor value in redfish.
> > >
> > > > With best regards,
> > > > Alexander Amelkin
> > /james.feist at linux.intel.com




More information about the openbmc mailing list