I’m trying to decode packets from hobo mx802 (conductivity/temperature/depth), sensor, but it sends 2 separate manufacturerdata packets, what does that mean? OMQ only sees one? IS it possible to get two manufacturerdata packets in OMG?
I caught some packets:
c5000d248655010028800012d9002241a5c4d2002ebb34
c5000d248655010028820012d9002241a57592002e3a23
c5000d248655010028820012d9002241a587e2002ebb0b
c5000d24865501002882 0012d9002241a5ac72002eb99f
c5000d248655010028800012d9002241a59402002ebaed
c5000d248655010028820012d9002241a601e2002eba82
c5000d248655010028800012d9002241a60e12002e3964
N: [ OMG->MQTT ] topic: home/OMG_s3_ant/BTtoMQTT/DF812076BF45 msg: {“id”:“DF:81:20:76:BF:45”,“mac_type”:1,“adv_type”:0,“manufacturerdata”:“c5000d248655010028820012d9002241a5d112002ebb40”,“rssi”:-75,“txpower”:0}
c5000d248655010028800012e2002241a62062002e3812
i took a screenshot of the hobo app and nrf connect
same packet with app screenshot
c5000d248655010028800012e2002241a62062002e3812
c5000d248655010028800012d9002241a68822002eb9b9
same time from pc app
N: [ OMG->MQTT ] topic: home/OMG_s3_ant/BTtoMQTT/DF812076BF45 msg: {“id”:“DF:81:20:76:BF:45”,“mac_type”:1,“adv_type”:0,“manufacturerdata”:“c5000d248655010028820012d9002241a68822002eb9b9”,“rssi”:-88,“txpower”:0}
previously there was a hobo water level sensor whose packages were a bit shorter ( Feature request: HOBO bluetooth sensors - #23 by mortenx ) maybe it is possible to use the same decoder?
https://www.onsetcomp.com/products/data-loggers/mx80x?srsltid=AfmBOorx7FCxtHixmch68jNUMT0o3kFGfSf4z8kl5ZEiLdyF2BNFoVuu
Did some research and found some links
the packages are sent in two parts manufacturedata 1 and 2
no. 2 starts with 0D24 and contains temperature and water level and the 1 package contains conductivity
Step 1: Identify Packet Types
There are two main packet types:
-
Main Packet (SpC + Salinity)
-
0x0D24 Packet (Temperature + Water Level)
Decoding Specific Conductivity (SpC) and Salinity
-
Packet: Main packet (not starting with 0x0D24)
-
Bytes Used:
-
range = byte[10]
-
raw24 = 3-byte big-endian from bytes [11], [12], [13]:
C++
raw24 = (d[11] << 16) | (d[12] << 8) | d[13];
Kuva rohkem ridu
-
Formula: Coefficients depend on range:
-
0x3C: SpC = 0.0000025129 * raw24 - 0.06659
-
0x3D: SpC = 0.00000875 * raw24 + 56.05
-
0x3E: SpC = 0.0000432974 * raw24 + 220.83
-
0x3F: SpC = 0.00014254 * raw24 + 948.09
-
Salinity (PSU):
C++
sal = 0.0005112271 * SpC - 0.020634286;
Decoding Water Level (WL)
-
Packet: 0x0D24 packet
-
Find last occurrence of 0x2E marker:
C++
for (int i = d.size() - 3; i >= 0; --i) {
if (d[i] == 0x2E) { idx_2e = i; break; }
}
Bytes Used:
-
hi = d[idx_2e + 1]
-
lo = d[idx_2e + 2]
-
Formula (piecewise by HI byte):
-
Positive WL:
-
HI=0x3C: WL = 0.00008303 * lo + 0.00696416
-
HI=0x3D: WL = 0.00034656 * lo + 0.02532572
-
HI=0x3E: WL = 0.00126269 * lo + 0.10841701
-
Negative WL:
-
HI=0xBA: WL = -0.00000664 * lo - 0.00022680
-
HI=0xBB: WL = -0.00001773 * lo - 0.00186963
-
HI=0xBD: WL = -0.00029950 * lo - 0.04077561
-
HI=0xBE: WL = -0.00123225 * lo - 0.11652788
Decoding Temperature