Sensor Customization and Development
更新时间: 2025/03/15
在Gitcode上查看源码

This section describes how to configure a sensor on openUBMC. A sensor is a type of hardware and belongs to the southbound management module. Its configurations comply with the CSR framework and syntax rules.

The sensor customization process includes configuring sensor entities, objects (threshold sensors and discrete sensors), sensor events, event filter, and event description. The following table describes their functions and configuration requirements.

ItemMandatory or NotConfiguration Description
EntityYesHardware entity corresponding to the sensor
Sensor object: threshold or discreteYesSensor object of the resource collaboration interface
Sensor eventYesConfigured only for discrete events
Event filterNoEvent filter method
Event descriptionNoLevel and description of the event reported by the sensor

Sensor Entity Configuration

The sensor entity is the basis of subsequent configurations, so you need to define entity objects first.

Configuring Properties

PropertyTypeDescription
Iduint8Entity ID corresponding to the sensor.
For details, see Table 43, Entity ID Codes (P550).
Instanceuint8Entity instance ID corresponding to the sensor, which usually starts with 0x60.
For details, see section 39.1 System- and Device-relative Entity Instance Values (P492)*.
Slotuint8Entity slot. The default value is 0xFF. If the slot is not the default one, a unique instance is generated based on the slot.
NamestringName of the entity.
Presenceuint8The presence status of the entity, associated with the corresponding presence signal source.
If no component requires dynamically removed or inserted, set this parameter to 1.
PowerStateuint8Power-on/off status of the entity, associated with the corresponding power-on/off signal source.
If the power-on/off status is irrelevant, set this parameter to 1.

Key Configuration Points

  1. You are advised to configure the Entity Id according to the table in the IPMI specifications.
  2. The Entity Instance must be unique with the same Entity Id. In other words, the combination of ID and instance must uniquely identify a single entity.

Configuration Example

The following uses the fan as an example to describe how to add a sensor entity. In the southbound management framework, entity objects interact with hardware through the Accessor/Scanner objects. Entity_Fan1 obtains the presence status and power-on/off status of the fan by synchronizing the values of Scanner_Fan1_Presence and Scanner_PowerGood. The following sensors are configured in the CSR file of the fan board. The following uses TaiShan 2280 as an example. The CSR file of the fan board is manifest/temp/build_openUBMC_debug_dev/conan_install/vpd/opt/bmc/sr/14100363_00000001050302035475.sr.

json
"Entity_FanBoard": {
    "Id": 11,
    "Instance": 117,    //Unique ID + instance
    "Name": "FanBoard${Slot}",
    "PowerState": 1,    // Power-on or power-off status
    "Presence": 1       // Presence status
},
"Entity_Fan1": {
    "Id": 30,
    "Instance": 96,
    "Name": "Fan1",
    "Presence": "<=/Scanner_Fan1_Presence.Value",
    "PowerState": "<=/Scanner_PowerGood.Value"
},
"Scanner_Fan1_Presence": { // For details about the scanner configuration, see Board Adaptation.
    "Chip": "#/Smc_FanBoardSMC",
    "Offset": 402656001,
    "Size": 1,
    "Mask": 1,
    "Type": 0,
    "Period": 2000,     // Scanning period
    "Debounce": "None", // Anti-jitter configuration
    "ScanEnabled": "<=/Scanner_PowerGood.Value",
    "NominalValue": 1,
    "@Default": {
        "ScanEnabled": 0
    },
    "Value": 0
},
"Scanner_PowerGood": {
    "Chip": "#/Smc_ExpBoardSMC",
    "Offset": 469765888,
    "Size": 1,
    "Mask": 255,
    "Type": 0,
    "Period": 100,
    "Debounce": "None",
    "Value": 0
},
"Smc_FanBoardSMC": {    // Defined according to the SMC specifications
    "Address": 96,
    "AddrWidth": 1,
    "OffsetWidth": 1,
    "WriteTmout": 0,
    "ReadTmout": 0
},

After the configuration is complete, verify whether Entity_FanBoard and Entity_Fan1 are successfully mounted to the resource collaboration interface.

bash
> busctl --user tree bmc.kepler.sensor
...
├─/bmc/kepler/Systems
 └─/bmc/kepler/Systems/1
    ...
    ├─/bmc/kepler/Systems/1/Entities
 └─/bmc/kepler/Systems/1/Entities/Entity_FanBoard_0101
 └─/bmc/kepler/Systems/1/Entities/Entity_Fan1_0101
    ...

Threshold Sensor Configuration

Configuring Properties

PropertyTypeDescription
OwnerIduint8Owner ID of the sensor.
BMC - 0x20
OwnerLunuint8Owner LUN of the sensor.
The owner is the system software - 0x00.
EntityIduint8The entity ID of to the sensor, which is associated with the Entity.Id of the sensor.
EntityInstanceuint8The entity instance of to the sensor, which is associated with the Entity.Instance of the sensor.
Initializationuint8Sensor initialization (threshold sensor - 0x7F)
Capabilitiesuint8Sensor capabilities, which is used to configure features such as automatic adjustment mode, hysteresis, threshold access, and event control.
For details, see Table 43, Full Sensor Record -SDR Type 01h (P521).
SensorTypeuint8Sensor type.
For details, see Table 42, Sensor Type Codes (P505).
ReadingTypeuint8Sensor read value type (threshold sensor - 0x01).
For details, see Table 42, Event/Reading Type Code Ranges (P503).
SensorNamestringSensor name. If the value of this field contains more than 16 characters, the excess characters are truncated.
AssertMaskuint16Sensor event generation mask, which determines whether an event can be generated. The mask must match the threshold configured for the sensor.
DeassertMaskuint16Sensor event recovery mask, which determines whether an event can be recovered. The mask must match the threshold configured for the sensor.
ReadingMaskuint16Sensor read value mask, which determines whether the threshold can be displayed externally. The mask must match the threshold configured for the sensor.
Unituint8Sensor unit.
For details, see Table 43, Sensor Unit Type Codes (P554).
BaseUnituint8Sensor base unit.
For details, see Table 43, Sensor Unit Type Codes (P554).
ModifierUnituint8Unit descriptor.
For details, see Table 43, Sensor Unit Type Codes (P554).
Linearizationuint8Linear calculation equation. For details about the calculation method, see Conversion from the Raw Value to the Read Value for Threshold Sensors.
Analoguint8Analog feature flag of the sensor. Generally, this parameter is set to 1.
NominalReadinguint8Nominal read value of the sensor, which is derived from the IPMI specifications and follows the data format range.
MaximumReadinguint8The maximum read value of the sensor, which is related to the data format.
If the number is unsigned, set this parameter to 255. If the number is signed, set this parameter to 127.
MinimumReadinguint8The minimum read value of the sensor, which is related to the data format.
If the number is unsigned, set this parameter to 0. If the number is signed, set this parameter to 128.
Readinguint8Raw read value of the sensor, which is synchronized with the sensor data source (such as Scanner).
If the data source is too long, the lower eight bits are read, which causes a read value error. For details about the solution, see the third key configuration point.
ReadingStatusuint8Reading status, which is synchronized with the sensor data source (such as Scanner).
If the value is configured using an expression, configure the value by strictly referring to Definition and Conversion of Reading Status for Threshold Sensors.

If necessary, you can select the following fields.

PropertyTypeDescription
Linearizationuint8Linear calculation equation. For details about the calculation method, see Conversion from the Raw Value to the Read Value for Threshold Sensors.
Muint8One of the linearization parameters. The default value is 1, corresponding to the lower eight bits of the sensor M computation expression.
MTuint8One of the linearization parameters, corresponding to the upper two bits of the sensor M computation expression and the tolerance.
Buint8One of the linearization parameters, corresponding to the lower eight bits of the sensor B computation expression.
BAuint8One of the linearization parameters, corresponding to the upper two bits of the sensor B computation expression and the lower six bits of the accuracy.
Accuracyuint8One of the linearization parameters, corresponding to the upper six bits of the sensor accuracy and the sensor direction.
RBExpuint8One of the linearization parameters, corresponding to the four bits of the sensor R/B calculation expression.
NormalMaximumuint8The maximum read value of the sensor. The default value is 0.
NormalMinimumuint8The minimum read value of the sensor. The default value is 0.
UpperNonrecoverableuint8Upper limit of sensor emergency events, which is configured on demand.
UpperCriticaluint8Upper limit of sensor critical events, which is configured on demand.
UpperNoncriticaluint8Upper limit of sensor minor events, which is configured on demand.
LowerNonrecoverableuint8Lower limit of sensor emergency events, which is configured on demand.
LowerCriticaluint8Lower limit of sensor critical events, which is configured on demand.
LowerNonCriticaluint8Lower limit of sensor minor events, which is configured on demand.
PositiveHysteresisuint8Sensor rising event recovery hysteresis, which is configured on demand.
NegativeHysteresisuint8Sensor decrease event recovery hysteresis, which is configured on demand.
SensorNumberuint16(Optional) Sensor number. The default value is 255, which is specified by the IPMI and generated by the BMC. If a special number is required, customize the number on the sensor customization page. (Sensors for components that are hot-inserted while the BMC is running cannot be customized.)

Key Configuration Points

  1. You are advised to set SensorType according to Table 42- SensorType Codes (P505) in the IPMI specifications.
  2. The three Mask properties must match the configured thresholds. If a threshold is configured, the corresponding bit of Mask must be set.
  3. Note that the current Reading (that is, the raw value) cannot exceed 255. If it does, the Reading must be scaled down using an expression, and then restored using the sensor expression formula. Generally, the actual values of data sources of sensors such as power and voltage sensors are likely to exceed the upper limit. The values must be converted to the int8 range. If the data range is not constrained and converted, the Reading value may not behave as expected.

Configuration Example

The following uses the temperature sensor as an example to describe how to configure a common threshold sensor, and uses the fan power as an example to describe how to configure a threshold sensor that needs to be scaled down. The Reading value is usually scaled down using the pipeline syntax. For details, see Expression syntax.

  1. Non-scaling sensor

    json
    //Fan temperature sensor
    "ThresholdSensor_FanBoardTemp": {
        "OwnerId": 32,
        "OwnerLun": 0,
        "EntityId": "<=/Entity_FanBoard.Id",
        "EntityInstance": "<=/Entity_FanBoard.Instance",
        "Initialization": 127, // Fixed value
        "Capabilities": 104,
        "SensorType": 1,
        "ReadingType": 1,
        "SensorName": "CLU${Slot} Temp",
        "AssertMask": 0, // Event generation mask
        "DeassertMask": 0, // Event recovery mask
        "ReadingMask": 0, // Reading value mask
        "Unit": 128, //Unit
        "BaseUnit": 1,
        "ModifierUnit": 0,
        "Linearization": 0, // Linear calculation equation parameter
        "M": 100, // Linear calculation equation parameter
        "RBExp": 224, // Linear calculation equation parameter
        "Analog": 1, // Linear calculation equation parameter
        "NominalReading": 0, // Nominal reading value of the sensor
        "NormalMaximum": 0,
        "NormalMinimum": 0,
        "MaximumReading": 127,
        "MinimumReading": 128,
        "Reading": "<=/Scanner_FanBrdTemp.Value",       // Raw read value
        "ReadingStatus": "≤/Scanner_FanBrdTemp.Status" // Read value status, which is configurable with expressions.
    },
    "Scanner_FanBrdTemp": {
        "Chip": "#/Smc_FanBoardSMC",
        "Size": 2,
        "Offset": 4865,
        "Mask": 65280,
        "Period": 2000,
        "Debounce": "None",
        "Value": 0,
        "Status": 0
    }

    Value range of the related properties:

    • AssertMask: ! [image.png] (../../images/sensor_event/ThresholdSensor_AssertMask.png)
    • DeassertMask: ! [image.png] (../../images/sensor_event/ThresholdSensor_DeassertMask.png)
    • ReadingMask: ! [image.png] (../../images/sensor_event/ThresholdSensor_ReadingMask.png)
    • Unit: ![image.png] (../../images/sensor_event/ThresholdSensor_Unit.png)
    • Capabilities:
  2. Scaling sensor

    json
    //Fan power sensor
    "ThresholdSensor_FanBoardPower": {
        "OwnerId": 32,
        "OwnerLun": 0,
        "EntityId": "<=/Entity_FanBoard.Id",
        "EntityInstance": "<=/Entity_FanBoard.Instance",
        "Initialization": 127,
        "Capabilities": 104,
        "SensorType": 11,
        "ReadingType": 1,
        "SensorName": "FanBoard${Slot} Power",
        "AssertMask": 0,
        "DeassertMask": 0,
        "ReadingMask": 0,
        "Unit": 0,
        "BaseUnit": 6,
        "ModifierUnit": 0,
        "Linearization": 0,
        "M": 5,
        "Analog": 1,
        "NominalReading": 0,
        "NormalMaximum": 0,
        "NormalMinimum": 0,
        "MaximumReading": 255,
        "MinimumReading": 0,
        "Reading": "≤/Scanner_Fan1_Pwr.Value |> expr($1 * 0.0002 / 5)", // The raw read value can be scaled to the uint8 range using an expression.
        "ReadingStatus": "<=/Scanner_Fan1_Pwr.Status"
    },
    "Scanner_Fan1_Pwr": {
        "Chip": "#/Smc_FanBoardSMC",
        "Offset": 4864,
        "Size": 3,
        "Mask": 0,
        "Type": 1,
        "Value": 0,
        "Status": 0,
        "Period": 1000,
        "Debounce": "None"
    }

    The expr syntax scales the sensor's Reading value so that it falls within the expected range. The service determines the specific scaling rules.

Conversion from the Raw Value to the Read Value for Threshold Sensors

The raw value of a threshold sensor is converted to the read value using the following calculation formula. For details, see section 36.3 "Sensor Reading Conversion Formula" (P483) in the IPMI standard.

1. Properties involved in the conversion formula

PropertyTypeDescription
Linearizationuint8Sensor calculation expression
[7] - Reserved field
[6:0] - Formula
00h-0bh: enum (linear, ln, log10, log2, ...)
70h: non-linear
The most commonly used linear expression. Set this parameter to 0x00.
Muint8[7:0] - Least significant 8 bits of M (signed, two's complement, 10-bit total)
MTuint8[7:6] - Most significant 2 bits of M (signed, two's complement, 10-bit total)
[5:0] - Tolerance (unsigned, 6-bit)
Buint8[7:0] - Least significant 8 bits of B (signed, two's complement, 10-bit total)
BAuint8[7:6] - Most significant 2 bits of B (signed, two's complement, 10-bit total)
[5:0] - Least significant 6 bits of precision (unsigned, 10-bit total)
Accuracyuint8[7:4] - Most significant 4 bits of precision (unsigned, 10-bit total)
[3:2] - Precision (unsigned, 2-bit total)
[1:0] - Sensor direction
RBExpuint8[7:4] - RExp (K2, signed, two's complement, 4-bit total)
[3:0] - BExp (K1, signed, two's complement, 4-bit total)
Readinguint8Raw sensor value

2. Formula

  • Two's complement: The property value needs to be converted to a signed number.

  • The raw value is converted into a read value according to the following formula:

    temp = (M * x + B * 10K1) * 10K2
    y = L(temp)

Example: M = 100, B = 3, K1 = 2, K2 = -2, ori_v = 200, L = 0x00 (linear expression, the calculated value is the actual value) Calculation result: y = (100 x ori_v + 3 x 100) x 0.01 = ori_v + 3 = 203

Definition and Conversion of Reading Status for Threshold Sensors

1. The reading status corresponds to the value of the Status property of the scanner.

Reading StatusValueStatus Description
SCAN_NORMAL0Normal scanning
SCAN_FAILURE1The scanning fails for N (configurable) consecutive anti-jitter periods.
After the failure, the sensor is disabled and an SEL is reported.
SCAN_PRE_FAILURE2The scanning fails for one anti-jitter period. If all scanning pre-failures occur, the scanning fails.
After the failure, the sensor is disabled.
SCAN_NOT_ACCESSIBLE3The scanning is not available. The scanned component object does not support scanning.
For example, the power is off, the status is being updated, or the read value is NA.
SCAN_NOT_SCANNED4Initial unscanned status

2. Conversion between the read value status and conversion conditions

Current StatusChanged StatusConversion Condition
02One-time read failure
03ScanEnable value changed from 1 to 0
10Read success for M consecutive times
13ScanEnable value changed from 1 to 0
20One-time read success
21Read failure for N consecutive times
23ScanEnable value changed from 1 to 0
30The ScanEnable value is changed from 0 to 1, and the next read is successful.
32The ScanEnable value is changed from 0 to 1, and the next read fails.

Discrete Sensor Configuration

Configuring Properties

PropertyTypeDescription
OwnerIduint8Same as ThresholdSensor.
OwnerLunuint8Same as ThresholdSensor.
EntityIduint8Same as ThresholdSensor.
EntityInstanceuint8Same as ThresholdSensor.
Initializationuint8Sensor initialization option. The value is 0x63 for discrete sensors.
Capabilitiesuint8Sensor capabilities, which is used to configure features such as automatic adjustment mode, hysteresis, threshold access, and event control.
For details, see Table 43, Full Sensor Record -SDR Type 01h (P521).
SensorTypeuint8Sensor type
For details, see Table 42, Sensor Type Codes (P505).
ReadingTypeuint8Sensor read value type
For details, see Table 42, Event/Reading Type Code Ranges (P503).
SensorNamestringSensor name
AssertMaskuint16Sensor event generation mask, which determines whether an event can be generated. Bit definitions:
[15]: Reserved (0b)
[14:0]: 15 discrete events. The configuration must match the discrete events of the associated sensor.
  Example: If the current configuration involves discrete events with EventData1 values of 1 and 3, then bit 1 and bit 3 of the assert mask must be set.
DeassertMaskuint16Sensor event recovery mask, which determines whether an event can be recovered. Bit definitions:
[15]: Reserved (0b)
[14:0]: 15 discrete events. The configuration must match the discrete events of the associated sensor.
  Example: If the discrete events EventData1 are 1 and 3 and the recovery event needs to be reported, bit 1 and bit 3 of the deassert mask must be set.
DiscreteMaskuint16Sensor discrete value mask Bit definitions:
[15]: Reserved (0b)
[14:0]: Indicates whether a discrete state can be reported by the sensor, corresponding to 15 discrete events. The configuration must match the discrete events of the associated sensor.
  Example: If the current configuration involves discrete events with EventData1 values of 1 and 3, then bit 1 and bit 3 of the discrete value mask must be set .
Unituint8Sensor unit. The value is 0xC0 for discrete sensors.
BaseUnituint8Sensor base unit. The value is 0 for discrete sensors.
ModifierUnituint8Sensor unit descriptor. The value is 0 for discrete sensors.
DiscreteTypeuint8Sensor discrete type. For details, see Table 42, Sensor Type Codes (P505).
0: common discrete; 1: digital discrete
RecordSharinguint16Sensor record sharing and discrete reference direction. Set this parameter to 1.
SensorNumberuint16(Optional) Sensor number. The default value is 255, which is specified by the IPMI and generated by the BMC. If a special number is required, customize the number on the sensor customization page. (Sensors for components that are hot-inserted while the BMC is running cannot be customized.)

Key Configuration Points

  1. You are advised to set SensorType according to the table in the IPMI specifications.
  2. The ReadingType of a discrete sensor is 02h to 0Ch or 6Fh. You need to set this property according to the configuration scenario of the discrete event.
  3. The configuration of the discrete sensor is related to the mounted discrete event. The two parameters must match each other. The three masks must match the discrete event configuration.

Configuration Example

json
"DiscreteSensor_FAN1FPresence": {
    "OwnerId": 32,
    "OwnerLun": 0,
    "EntityId": "<=/Entity_Fan1.Id",
    "EntityInstance": "<=/Entity_Fan1.Instance",
    "Initialization": 99, // Fixed value
    "Capabilities": 64,
    "SensorType": 10,
    "ReadingType": 8,
    "SensorName": "FAN1 Presence",
    "DiscreteType": 0, // Discrete value mask
    "Unit": 192,
    "BaseUnit": 0,
    "ModifierUnit": 0,
    "RecordSharing": 1, // Sensor record sharing and discrete reference direction
    "Reading": 0, // This parameter is meaningless for discrete sensors and does not need to be set.
    "SensorNumber": 255
}

Value range of the related properties:

  • Capabilities:

Discrete Event Configuration

If no discrete event is configured for a discrete sensor, the sensor cannot be managed by the BMC. Discrete events are usually configured in the software CSR.

Configuring Properties

PropertyTypeDescription
ListenTypeuint8Discrete event listening methods:
0: Combined listening. All three data points and the direction for SEL are derived from the Property.
1: Independent listening. The three data points and the direction for SEL are derived from the current object property.
Propertyuint32Property of discrete event listening method, which is used for combined listening.
The value is 4 bytes. The four bytes from high to low indicate event_dir, event_data3, event_data2, and event_data1. For details about the data, see the description of the corresponding property of the current object.
Conversionuint8Discrete event flip flag. The upper four bits are used as the mask of event_data1 during combined listening, and the lower four bits indicate whether to flip the event direction.
1: flip
Non-1: no flip
EventDiruint8Property of discrete event listening method, which is used for independent listening.
Directions of discrete event:
0: recovery
Non-0: generation
EventData1uint8The property is used for independent listening.
This is the primary data field generated upon a discrete event. For the data meaning, see 29.7 Event Data Field Formats. Specifically, the lower 4 bits represent the event offset. When configuring this field, refer to the Offset column in the Table 42-, Generic Event/Reading Type Codes or Table 42-, Sensor Type Codes.
EventData2uint8The property is used for independent listening.
This is the secondary data field generated upon a discrete event. For the data meaning, see 29.7 Event Data Field Formats. For the application requirements, see Table 42-, Generic Event/Reading Type Codes or Table 42-, Sensor Type Codes. If no application requirement is required, set this field to the default value 255.
EventData3uint8The property is used for independent listening.
This is the third data field generated upon a discrete event. For the data meaning, see 29.7 Event Data Field Formats. For the application requirements, see Table 42-, Generic Event/Reading Type Codes or Table 42-, Sensor Type Codes. If no application requirement is required, set this field to the default value 255.
SensorObjectstringDiscrete sensor associated with the discrete event. When the IPMI SEL is generated or cleared, the health status and SEL of the current sensor are displayed.

Key Configuration Points

  1. There is no requirement on the listening mode. You can select the listening mode as needed. If the combined listening is selected, ensure that the Property property is set as required and the data of each byte is correctly configured according to the meaning. If the independent listening is selected, ensure that the three pieces of EventData data and EventDir properties are correctly configured according to the meaning.
  2. Discrete events are defined by the IPMI specifications. You are advised to configure discrete events according to the descriptions and definitions in the IPMI specifications.

Configuration Example

The following uses the fan presence sensor as an example to describe how to configure a fan presence event.

json
"DiscreteEvent_FAN1FPresence": {
    "Property": "<=/Scanner_Fan1_Presence.Value",
    "ListenType": 1, //Independent listening
    "EventData1": 0,
    "EventData2": 255,
    "EventData3": 255,
    "EventDir": "<=/Scanner_Fan1_Presence.Value",
    "Conversion": 1, //Event flip
    "SensorObject": "#/DiscreteSensor_FAN1FPresence" //Associate with the discrete sensor in the previous section.
}

After the preceding configurations are complete, the BMC can manage the FAN1 presence status, temperature, and power status. You can then proceed with the commissioning.

IpmiSelFilter Event Filter Configuration

IpmiSelFilter and IpmiSelDesc are used as common mechanisms. For details about the design and implementation, see sensor.

A sensor can report events only if they pass the event filtering criteria. Events that fail the filter are ignored and not reported. Currently, openUBMC has developed 60 general IpmiSelFilters, which are stored in the proto/datas.yaml directory of the sensor repository. You can use the filters as required. If the existing filters do not meet the requirements, you need to add new filters.

Configuring Properties

PropertyTypeDescription
SensorTypeuint8Event sensor type, which must be the same as the SensorType of the sensor.
ReadingTypeuint8Event reading value type, which must be the same as the ReadingType of the sensor.
FilterMask1uint16Filter mask 1, which must be the same as the AssertMask of the sensor.
FilterMask2uint16Filter mask 2. The default value is 0xFFFF.
FilterMask3uint16Filter mask 3. The default value is 0xFFFF.

Configuration Example

yaml
t_ipmi_sel_filters: //The specific configuration is determined by the actual service.
  - FilterMask1: 0x0a94
    FilterMask2: 0xffff
    FilterMask3: 0xffff
    ReadingType: 0x01
    SensorType: 0x01

IpmiSelDesc Event Description Configuration

IpmiSelDesc refers to the level and description of the event reported by the sensor. The object definition is the same as that of IpmiSelFilter. IpmiSelDesc is stored in the proto/datas.yaml in the sensor repository, and the model definition is stored in the mds/model.json file in the sensor repository. For details, see the source code.

Configuring Properties

PropertyTypeDescription
SensorTypeuint8Event sensor type, which must be the same as the SensorType of the sensor.
ReadingTypeuint8Event reading value type, which must be the same as the ReadingType of the sensor.
SelData1uint8Parameter 1. The default value is 0xFFFF.
SelData2uint8Parameter 2. The default value is 0xFFFF.
SelData3uint8Parameter 3. The default value is 0xFFFF.
SelDescstringEvent description.
AlarmLeveluint8Level of the corresponding event.
ShieldFlaguint8Whether the event is masked. The default value is 0.

Configuration Example

yaml
t_ipmi_sel_descs:       //The specific configuration is determined by the actual service.
  - SensorType: 0xff
    ReadingType: 0x01
    SelData1: 0x00
    SelData2: 0xff
    SelData3: 0xff
    SelDesc: "Lower Non-critical going low"
    AlarmLevel: 1
    ShieldFlag: 0

Commissioning Methods

You can check whether the sensor configuration is successful through package generation and board commissioning. After building components, building the entire package, and upgrading the entire package by referring to integrate_a_device, you can query the sensor in any of the following four ways:

  • Web

    The openUBMC WebUI provides threshold sensor query. Log in to the openUBMC WebUI, choose System > System Info > Sensor Info, and query the current threshold sensor.

  • IPMI

    The openUBMC WebUI supports IPMI commands to query all sensors. You can run the sensor list command to query the information in in-band or out-of-band mode.

    • In-band query: ipmitool sensor list
    • Out-of-band query: ipmitool -I lanplus -H <host> -p 623 -U <username> -P <password> -C 17 sensor list

  • CLI

    The openUBMC supports CLI commands to query all sensors. Log in to the openUBMC using SSH and run the ipmcget -t sensor -d list command.

    ![image.png] (../../images/sensor_event/Sensor_CLI.png)

  • Redfish

    The openUBMC supports Redfish interfaces for query. You can query the threshold sensor and discrete sensor using the GET request. Use the Postman tool to send the following requests to the test environment:

    • Threshold sensor URI: redfish/v1/Chassis/:chassisid/ThresholdSensors ![image.png] (../../images/sensor_event/Sensor_Redfish1.png)
    • Discrete sensor URI: redfish/v1/Chassis/:chassisid/DiscreteSensors ![image.png] (../../images/sensor_event//Sensor_Redfish2.png)