I have an Audi A5 2.0 TDI 2012. I want to connect to the CAN BUS in my car, I have a Leonardo Can Bus module and a SparkFun ODBII to 9pin D-Type cable.
I have connected my macBook to the Leonardo via USB and the Leonardo to my car via the ODBII port, but I am not getting any data from the car. The connection speed set-up in the Leonardo application is CAN_500KBPS, is this correct?
You need to connect to somewhere other than the OBD port. The OBD port goes directly to the CAN gateway so only responds to requests.
if you remove the kicker plate behind the bonnet release handle there are plenty of plugs where you can tap in.
Yes, you are correct with 500k.
The CAN messages are pretty complex, I have a full car setup on my bench in the garage, I tried doing some logging to work out how it all works. The real complexity is for the sending, most of the IDs use the first byte as a checksum of the contained data, I’m still trying to reverse engineer it.
Does the ODBII port in the Audi behave differently from ODBII ports in other cars? Because on YouTube I've seen videos that show connecting exactly the application and Leonardo to the dash board ODBII port in exactly the way I am doing and able to sniff data on the bus.
I am looking to sniff specific packets which include left / right indicators, brakes, reverse and lights.
Please see my you tube videos to get an idea of what I'm intending to add:
From VAG cars I've worked on in the past, the CAN does not broadcast over the OBDII Port, the best place to splice in would be on the ECU harness powertrain CAN, then feed the wires into the cabin and solder a d-sub on the end.
The signals you're looking for are simple and won't take to long to find.
One thing you have to be careful of is sometimes the ECU may get upset if you try and broadcast signals, so you will need to clear faults if this causes an issue.
@The_jargen, Just finding the wires, I purchased a CAN Crocodile quite a white ago which allows me to connect to the wires without cutting or soldering. Just need to identify where to find them.
That one is in the Engine bay (The ECU Harness wiring), you will need to strip back the insulation tape to find it.
I've also attached an image for the convenience CAN if you don't want to touch the power train CAN, these are in the passenger and driver door control units, so they are easy enough to get to, the messages will just be broadcast at a lower rate. If you're not interested in the power train stuff start here.
Looking at the 2nd diagram (Front passenger door control unit), I can see B398 and B407 notes for CAN bus, high and CAN bus low, I don't see either of these in the diagram ?
I will be attempting to connect this with a laptop to the CAN Bus in my car today, if I can figure out how to get at the CANH and CANL wires located here:
Any help or advice on how to get at the wires, very much appreciated.
There are many CAN networks in the car. If you go in via the rear you may only find the infotainment CAN bus on the Radio. CAN wires are usually orange with a thin stripe. For example:
Powertrain CAN
Orange/Black CAN H
Orange/Brown CAN L
Convenience CAN
Orange/Green CAN H
Orange/Brown CAN L
If you want a wider choice, go for the CAN gateway behind the glovebox.
Thank you, I've narrowed it down to this location in the car as my first attempt was to use the ODBII port, however it turns out that Audi doesn't broadcast the CAN bus data to this port, so this is the location of where the relevant CAN H and CAN L signals are available. It's just getting to them.