Hi!
I'm using Arduino UNO with MCP 2515. I want to display coolant temperature at the GID display in my Opel Astra H. And i already managed to send text to the display. But i've got problem with reading CAN bus messages. I found that sending packet to the 0x248 should return packets from 0x548 with few parameters (including coolant temperature), but data response is different using sniffer app and Arduino IDE (both codes use same libraries).
So, after sending request to 0x248 like this:
248 # 06 AA 01 01 07 10 11 - Ask the A/C controller (0x0248) for measuringblocks 01, 07, 10 and 11
I should get something like this in response:
548 # 01 03 A5 00 00 01 9C 00 - 01: 0x03A5: Solar sensor: 4.665V - 0x019C: Indoor temp sensor: 2.06V
548 # 07 00 90 04 3D FE 70 00 - 07: 0x90: Voltage: 14.4V
548 # 10 00 91 02 B2 03 1E 96 - 10: 0x0091: Out-temp: 14.5°C - 0x02B2: Engine temp: 69.0°C
548 # 11 08 ED 00 30 01 FE 23 - 11: 0x08ED: RPM: 2285 - 0x30: Speed: 48 km/h - 0x23: LED: 35%
Instead in Arduino IDE i get this:
[...]
Received packet with id 0x548 Data:13A5001490
Received packet with id 0x548 Data:707A09FE700
Received packet with id 0x548 Data:13A5001490
[...]
In sniffer app i get nice response from bank 11:
548 # 11 0 00 00 00 00 38 00 - engine is off thats why so many 00's
This is my Arduino code can sniff code - Pastebin.com. I use libraries from here GitHub - sandeepmistry/arduino-CAN: An Arduino library for sending and receiving data using CAN bus.. The fact that sniffer with the same libraries show me good message proves that libraries and Arduino is OK. The problem is with my code, but it is so simple that i don't know where to look for mistake.
Can you please help me ? BTW Can.filter() doesn't work (or probably i don't know how to use it )so im using "if" loop.