* all discrete sensor shows na
@ 2020-10-31 2:31 周 远清
2020-11-02 14:25 ` 回复: " 周 远清
0 siblings, 1 reply; 2+ messages in thread
From: 周 远清 @ 2020-10-31 2:31 UTC (permalink / raw)
To: openbmc; +Cc: uperic
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
Hi,
I added some discrete sensors to openbmc, but I used the ipmitool command to query and found that all discrete sensors displayed na. Please help and guide, thank you. Examples are as follows.
F:\ipmitool v1.8.18>ipmitool.exe -I lanplus -C 17 -H 172.16.90.172 -U root -P 0penBmc sensor list
PowerDrop | na | discrete | na | na | na | na | na | na | na
F:\ipmitool v1.8.18>ipmitool.exe -I lanplus -C 17 -H 172.16.90.172 -U root -P 0penBmc sensor get PowerDrop
Locating sensor record...
Sensor ID : PowerDrop (0x28)
Entity ID : 7.1
Sensor Type (Discrete): Power Supply
Unable to read sensor: Device Not Present
I have checked the dbus interface corresponding to PowerDrop, and it can be set and inquired through the busctl command;
Thankyou!
harley.
[-- Attachment #2: Type: text/html, Size: 3413 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* 回复: all discrete sensor shows na
2020-10-31 2:31 all discrete sensor shows na 周 远清
@ 2020-11-02 14:25 ` 周 远清
0 siblings, 0 replies; 2+ messages in thread
From: 周 远清 @ 2020-11-02 14:25 UTC (permalink / raw)
To: openbmc; +Cc: uperic
[-- Attachment #1: Type: text/plain, Size: 2601 bytes --]
Hi,
After I enable the read sensor interface in the code below, the value of the discrete sensor can be read. I think there should be a place in the ipmid code. After a certain condition is detected, the sensor will be enabled. Can someone please help guide the operation of the enable sensor? Where is the code?
ipmiSensorGetSensorReading(uint8_t sensorNum)
{
if (sensorNum == 0xFF)
{
return ipmi::responseInvalidFieldRequest();
}
const auto iter = ipmi::sensor::sensors.find(sensorNum);
if (iter == ipmi::sensor::sensors.end())
{
return ipmi::responseSensorInvalid();
}
if (ipmi::sensor::Mutability::Read !=
(iter->second.mutability & ipmi::sensor::Mutability::Read))
{
return ipmi::responseIllegalCommand();
}
try
{
ipmi::sensor::GetSensorResponse getResponse =
iter->second.getFunc(iter->second);
enableScanning(&response);
return ipmi::responseSuccess(getResponse.reading, uint5_t(0),
getResponse.readingOrStateUnavailable,
getResponse.scanningEnabled,
getResponse.allEventMessagesEnabled,
getResponse.thresholdLevelsStates,
getResponse.discreteReadingSensorStates);
}
harley
________________________________
发件人: openbmc <openbmc-bounces+zhouyuanqing8=outlook.com@lists.ozlabs.org> 代表 周 远清 <zhouyuanqing8@outlook.com>
发送时间: 2020年10月31日 10:31
收件人: openbmc <openbmc@lists.ozlabs.org>
抄送: uperic@163.com <uperic@163.com>
主题: all discrete sensor shows na
Hi,
I added some discrete sensors to openbmc, but I used the ipmitool command to query and found that all discrete sensors displayed na. Please help and guide, thank you. Examples are as follows.
F:\ipmitool v1.8.18>ipmitool.exe -I lanplus -C 17 -H 172.16.90.172 -U root -P 0penBmc sensor list
PowerDrop | na | discrete | na | na | na | na | na | na | na
F:\ipmitool v1.8.18>ipmitool.exe -I lanplus -C 17 -H 172.16.90.172 -U root -P 0penBmc sensor get PowerDrop
Locating sensor record...
Sensor ID : PowerDrop (0x28)
Entity ID : 7.1
Sensor Type (Discrete): Power Supply
Unable to read sensor: Device Not Present
I have checked the dbus interface corresponding to PowerDrop, and it can be set and inquired through the busctl command;
Thankyou!
harley.
[-- Attachment #2: Type: text/html, Size: 7389 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-02 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31 2:31 all discrete sensor shows na 周 远清
2020-11-02 14:25 ` 回复: " 周 远清
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).