@@ -23,10 +23,9 @@ Should apply to similar Watchman, Beckett, and Apollo devices too.
23
23
There is a preamble plus de-sync of 555558, then MC coded an inner preamble of 5558 (raw 9999996a).
24
24
End of frame is the last half-bit repeated additional 2 times, then 4 times mark.
25
25
26
- FIXME: confirm this
27
- The sensor sends a single packet once every hour or twice a second
28
- for 11 minutes when in pairing/test mode (pairing needs 35 sec).
29
- depth reading is in cm, lowest reading is ~3, highest is ~305, 0 is invalid
26
+ The sensor sends a single packet once every half hour or twice a second
27
+ for 5 minutes when in pairing/test mode.
28
+ Depth reading is in cm, lowest reading is ~3, highest is ~305, 0 is invalid
30
29
31
30
Data Format:
32
31
@@ -45,8 +44,9 @@ Data Layout:
45
44
46
45
example packets are:
47
46
48
- raw: {158}555558 9999 996a 6559aaa99996a55696a9a5963c
49
- aligned: {134}9999996a 6559aaa999969aa6aa9a6995fc
47
+ - raw: {158}555558 9999 996a 6559aaa99996a55696a9a5963c
48
+ - aligned: {134}9999996a 6559aaa999969aa6aa9a6995 fc
49
+ - decoded: 5558 bd01 5642 0497
50
50
51
51
FIXME: this is not confirmed
52
52
Start of frame full preamble is depending on first data bit either
@@ -89,25 +89,28 @@ static int oil_smart_decode(r_device *decoder, bitbuffer_t *bitbuffer, unsigned
89
89
// 0x20: (unknown toggle)
90
90
// 0x40: (unknown toggle)
91
91
// 0x80: (always zero?)
92
+
93
+ // idle flags are : 0x17
94
+ // counter value appears to change variously to: 0c 0e 10 12
92
95
uint8_t flags = b [4 ];
93
96
uint8_t alarm = b [5 ];
94
97
95
98
// FIXME: confirm there is a binding counter
96
99
uint16_t depth = 0 ;
97
100
uint16_t binding_countdown = 0 ;
98
- if (flags & 1 ) {
101
+ // if (flags & 1) {
99
102
// When binding, the countdown counts up from 0x40 to 0x4a
100
103
// (as long as you hold the magnet to it for long enough)
101
104
// before the device ID changes. The receiver unit needs
102
105
// to receive this *strongly* in order to change its
103
106
// allegiance.
104
- binding_countdown = b [6 ];
105
- }
106
- else {
107
+ // binding_countdown = b[6];
108
+ // }
109
+ // else {
107
110
// A depth reading of zero indicates no reading.
108
111
//depth = ((b[5] & 0x02) << 7) | b[6];
109
112
depth = b [6 ];
110
- }
113
+ // }
111
114
112
115
/* clang-format off */
113
116
data_t * data = data_make (
0 commit comments