rnsft,
I have the same setup as you and have had a few issues with sparse documentation. Here's what I have learned through trial and error as well as cobbling together what I can find online.
Parts I am using:
- 2014 Audi A4
- Arduino UNO R3
- SeeedStudios CAN-bus Shield v1.0
- OBD-II to D9 cable
- ELM327 bluetooth dongle for troubleshooting
-
Initially I could get no values from plugging everything together. While several other people online seem to have been having no trouble getting a flood of data from their CAN-bus, I literally would get the "CAN BUS Shield init ok!" message followed by absolutely no data.
-
The R3 resistor! A fellow in South Africa helped remind me that the R3 resistor might need to be removed from the CAN-bus shield in order to allow it to properly terminate or something like that... I removed it and still nothing happened.
-
Another friend noticed the contact you have been mentioning in your posts between the usb port on the Arduino and the metal pins protruding from the bottom of the CAN-bus shield. We simply added some electrical tape to both sides and this contact is now insulated. This didn't change anything.
-
I then used the ELM327 to check and see if the OBD-II diagnostic port was available to anything other than an Audi diagnostic computer and of course, it worked perfectly and there was a ton of data available. Hope was restored but obviously the process is fairly frustrating to someone that is, as ChilliTronix pointed out, crawling. (I am new to all of this!)
*5. So the realization for me at this point in the project is that the OBD-II diagnostic port is behind something called the Gateway Control Unit. It cuts off access to the data completely, but with the correct initialization/handshake it will respond to queries for specific values (which is all I'm trying to do). This is why the ELM327 works... it knows how to communicate with the GCU so the goal became to listen in on the communication between the ELM327 and the car.
-
I bought an extra OBD-II to D9 cable and cut it apart, connecting the ELM327 pins that are important to this effort to the cable and allowing the ELM327 to talk to the car while running the example sketch from SeedStudios called "receive_check". This simply listens for anything on the CAN-bus lines and reports it to the serial monitor. As a side note... this worked amazingly well.
-
Here's where I'm at now as step 6 occurred last night.
- I am getting a flood of data, and rnsft, it's gibberish in the same sense as wheat you are seeing, although I am not getting the hex values, I am getting a string of numeric values in sets of 8 numbers. But I also know that this is exactly what we are supposed to be seeing... it's now down to us to decipher what each string of values means, as I have seen plenty of this kind of information online. It's not well documented as it varies from manufacturer to manufacturer and even model to model, but you'll be able to use a variety of means to figure out what your signals mean (I'm being optimistic that this is the case as I see others doing the same).
I'll post more as I sort out what the signals mean... here is an example of the code the Arduino/CAN-bus is gathering... (this is just a snippet and the difference in layout is due to my code using a tab to deliniate where you have a ":" separating values...
2 1 16 0 0 0 0 0
4 65 16 1 55 0 0 0
2 1 12 0 0 0 0 0
4 65 12 12 122 0 0 0
2 1 0 0 0 0 0 0
6 65 0 190 31 168 19 0
2 1 1 0 0 0 0 0
6 65 1 0 7 229 0 0
2 1 3 0 0 0 0 0
4 65 3 2 0 0 0 0
2 1 4 0 0 0 0 0
3 65 4 26 0 0 0 0
2 1 5 0 0 0 0 0
3 65 5 127 0 0 0 0
2 1 6 0 0 0 0 0
3 65 6 130 0 0 0 0
2 1 7 0 0 0 0 0
3 65 7 142 0 0 0 0
2 1 12 0 0 0 0 0
4 65 12 12 122 0 0 0
2 1 13 0 0 0 0 0
3 65 13 0 0 0 0 0
2 1 14 0 0 0 0 0
3 65 14 135 0 0 0 0
2 1 15 0 0 0 0 0
3 65 15 88 0 0 0 0
2 1 16 0 0 0 0 0
4 65 16 1 49 0 0 0
2 1 17 0 0 0 0 0
3 65 17 30 0 0 0 0
2 1 19 0 0 0 0 0
3 65 19 3 0 0 0 0
2 1 21 0 0 0 0 0
4 65 21 134 255 0 0 0
2 1 28 0 0 0 0 0
3 65 28 3 0 0 0 0
2 1 31 0 0 0 0 0
The application I am using to instigate the communications is Movi... which is very awesome as I can run it on my laptop and connect to the ELM327 via bluetooth from my laptop. It has a potentially VERY helpful feature in that you can output a log file from Movi and it shows every step it's taking in full detail which is more descriptive than the data I've shown above. Here is an example...
Ignoring Line:SEARCHING...
lines[0]:01 57 41 55
lines[1]:4D 46 43 46 4C 38 45
lines[2]:4E 30 32 34 38 38 31
VIN:WAUMFCFL8EN024881
OBD Connection:Disconnecting serial port...
Serial Connection:Disconnecting...
Resetting serial port:...
Flushing serial port:...
Closing serial port:...
Serial Connection:Disconnected
Check connection:...
Serial Connection:Listing serial ports...
Serial Port 0:Bluetooth-Incoming-Port
Serial Port 1:Tilston6-WirelessiAP
Serial Port 2:OBDII-SPPDev
Connection preferences:
Serial Port: OBDII-SPPDev
Port Speed: 38400
Parity: No Parity
Timeout: 10
OBD Protocol: 0 - Automatic
Headers On: On
OBD Connection:Trying port: OBDII-SPPDev
Serial Connection:Opening: /dev/cu.OBDII-SPPDev
Serial Connection:Device Found
Serial Send:ATZ
Serial Read:ATZ
ELM327 v1.5
OBD Init:ELM327 v1.5 chip found.
OBD Init:Setting protocol on ELM chip...
Serial Send:AT SP 0
Serial Read:AT SP 0
OK
OBD Init:Setting headers...
Serial Send:AT H1
Serial Read:AT H1
OK
OBD Init:Turning on echo...
Serial Send:AT E1
Serial Read:AT E1
OK
OBD Init:Turning off line feeds...
Serial Send:ATL0
Serial Read:ATL0
OK
OBD Init:Turning on wakeup...
Serial Send:ATSW99
Serial Read:ATSW99
OK
OBD Connection:Done
Serial Send:03
Serial Read:03
SEARCHING...
7E8 02 43 00
Ignoring Line:SEARCHING...
Serial Send:ATDP
Serial Read:ATDP
AUTO, ISO 15765-4 (CAN 11/500)
Last Port:OBDII-SPPDev
Serial Send:ATRV
Serial Read:ATRV
11.6V
Getting VIN:...
Serial Send:09 02
Serial Read:09 02
7E8 10 14 49 02 01 57 41 55
7E8 21 4D 46 43 46 4C 38 45
7E8 22 4E 3X 3X 3X 3X 3X 3X
lines[0]:01 57 41 55
lines[1]:4D 46 43 46 4C 38 45
lines[2]:4E 3X 3X 3X 3X 3X 3X
VIN:WAUMFCFL8ENXXXXXX
Serial Send:01 00
Serial Read:01 00
7E8 06 41 00 BE 1F A8 13
Serial Send:01 20
Serial Read:01 20
7E8 06 41 20 A0 07 B0 11
Serial Send:01 40
Serial Read:01 40
7E8 06 41 40 FE D0 84 00
Serial Send:01 00
Serial Read:01 00
7E8 06 41 00 BE 1F A8 13
Serial Send:01 01
Serial Read:01 01
7E8 06 41 01 00 07 E5 00
Serial Send:01 03
Serial Read:01 03
7E8 04 41 03 02 00
Serial Send:01 04
Serial Read:01 04
7E8 03 41 04 25
Serial Send:01 05
Serial Read:01 05
7E8 03 41 05 82
Serial Send:01 06
Serial Read:01 06
7E8 03 41 06 7A
So I would recommend maybe using this app in conjunction with your setup so that you can get more insight into what is being dumped to your Arduino.
Good luck and have patience rnsft... this isn't plug and play (as I was hoping it would be) but it's obviously doable given a deeper understanding of what is happening and what the messages structure is. I just need to do more reading, and I will post more as I discover it.