Porting the TPMS to Linux. Please help!
This is what we have discoverer so far:
Raw Data Buffer
Byte 0: Pressure Byte (Bar)
Scaling = 0.025 Bar/LSB
Zero Point = 0x28
P = (PB - 40)*0.025
0x26 = -0.05 Bar
0x27 = -0.025 = -0.03 Bar
0x28 = 0.00 Bar
0x6D = 1.725 = 1.73 Bar
0x7B = 2.075 = 2.08 Bar
Byte 1: Temperature Byte (Celsius)
Scaling = 1 C/LSB
Zero Point = 0x28
T = TB -40
0x2D = 5 C
0x2E = 6 C
0x3E = 22 C
0x40 = 24 C
Byte 2: Battery Level Byte
Relative level of battery. I think the range is from 0x00… 0xFE.
For the manipulation of this byte to actual “V” I need to know lowest battery voltage on which the sensor could work and type of the battery.
Byte 3: Sensor Mode Byte
It sounds like this byte represents status of the sensors, as per below table (Sensor Modes).
NormalMode = 0x01
If the pressure is below 1.5 bar, pressure is measured every 60 seconds but no data is sent. If the pressure increases above 1.5 bars, the sensor shifts into the Initial mode.
Initial Mode This mode occurs if the pressure increases above 1.5 bar from Storage mode. In this mode, pressure is measured every 0.85 seconds and data is sent every 0.85 seconds. This sequence is repeated 256 times. After the sequence is repeated 256 times, the sensor shifts into the Normal mode only if pressure is above 1.5 bar. If the pressure is below 1.5 bar, the sensor will shift into the Storage mode.
Pressure is measured every 3.4 seconds and data is transmitted every 60 seconds. If the measured pressure differs by more than 200 mbar from the reference taken every 60 seconds, the sensor enters a Pressure Alert mode.
It is the same measurement and transmitting pattern as the Initial mode.
High Temp Alert
If the temperature exceeds 120°C, the sensor device enters into the same measurement and transmitting pattern as the Initial mode.
To poll a sensor data:
1. Host writes one byte to device with required sensor number coded as 0x20 + SensorIndex. First Sensor index equals to 1.
2. Host reads the four bytes buffer from device. Structure of buffer is explained above.
Please help me to fill the gaps and misunderstandings.