Originally Posted by
steveo
... it shouldn't wake up again
Wake up, or start broadcasting?
No biggie, I'll try to figure it out on my own. I'm interested in if it will process response data it hasn't asked for. If I can make the fuel consumption and aldl derived "gauges" work while logging I'll be one extremely happy camper.
NomakeWan, try this out:
Sketch:
Code:
byte M1Cmd[5] = {0xF1,0x57,0x01,0x00,0xB7};
void setup() {
Serial.begin(9600);
Serial1.begin(8192);
}
void loop() {
if (Serial1.available()) {
while (Serial1.available()) {
byte read = Serial1.read();
Serial.println(read, HEX);
}
}
if (Serial.available()) {
for (uint8_t i = 0; i < 5; i++) {
Serial1.write(M1Cmd[i]);
}
Serial.read();
}
}
Serial output is one byte per line without being padded with a leading 0 i.e. 00 in a bin = 0, 01 in a bin = 1 here. You'll have to group the ask / answers appropriately, but I've commented my 01 00 request and response from the CCM
Code:
41
40
57
FF
FF
6B
41
67
2
EC
0
4C
4C
1
0
E
90
F6
E3
0
3F
FF
FF
0
FF
FF
1F
F0
56
F1
C9
F1 < start looking here
57
1
0
B7
F1 < response here ???
7A
1
8
8
20
3
14
0
10
DF
B3
0
D3
F1
0
77
71
0
3B
59
42
2C
A9
BF
0
0
80
0
0
0
0
0
0
0
0
0
0
0
15
10
59
8
4C
2
0
41
40
57
FF
FF
6B
Have you gotten this far, am I just pounding sand?
Bookmarks