In order to get the remaining data you need to follow the OBD II spec and send a "ready to accept more data" message.
Has anyone had any success reading the VIN number off a Ford CANBus? I can only get the first line of the multi-line response. I'm using the request (hex)
02 09 02 00 00 00 00 00 and get back the line (hex) 10 14 49 02 01 31 46 4d.
The last three data bytes map to ASCII 1FM, which is the first three characters of the vehicle's VIN. I have tried this on two Ford Escape Hybrids, a Ford Explorer, and a Ford Mustang with the same result (except the data returned is the first three characters of each vehicle's respective VIN).
To read and write to the bus I am using both a Vector CANalyzer and a PC/104 CANBus module. They both produce the same one-line result.
For references I am primarily using the wikipedia article http://en.wikipedia.org/wiki/OBD-II_PIDs
michbound is correct.
You must then send a Flow Control Frame. The message format is:
ID B1 B2 B3 B4 B5 B6 B7 B8
??? 30 00 00 na na na na na
Important though this message must be around 100 ms after you receive the 10 14 49 02 31 46 4D
When i tried it with the vector it didn't work until I realized I should have read "this message must be around 100 ms" as the flow control message needs to be sent within 100ms. I coded it up and it worked. I also found a reference to the control frame message at http%3A%2F%2Fwww.autotap.com%2Ffiles%2Fmanuals%2FL DV6x-3505__CommunicationSpec.pdf&ei=kbyUR7iDHpWGzQTWnui fDg&usg=AFQjCNGwTImgDXSwpixo3-mUycSb0pCqtg&sig2=Zp3L_b3DeSDOp0gyPNV-FQ (pdf)
Thanks for the help!
I have a Ford control unit on the can bus, have a ValueCAN from intrepidcs, its connected up, when started it has lots of traffic
but am new to this, trying to learn CAN is very interesting. what Im trying to do is read the VIN number. once that works? hopefully the rest will make sense
no matter what I send out in the 'edit Tx messages' nothing seems to get returned
in the last post in the thread? the link doesnt work, my browser just stalls then does nothing. I tried to parse the link into the right text, doesnt work. have been looking at various CAN bus websites, trying lots of stuff; also have a USB flasher J2534 that runs the Drew Tech tools? Vetronix ES6510, but I cannot get that to be setup right or? either
am I supposed to calculate the checksum manually? is the arbID supposed to be 7e0?
thanks in advance
- Download, install, and run the j2534-1 tool demo software from the downloads section of the drewtech website.
- On the connect tab choose your Mongoose tool and click open. If you only have one tool installed, it's already open by default. Choose protocol ISO15765, click connect.
- On the filters tab enter a row with mask FFFFFFFF, pattern 000007E8, flow control 000007E0, flags 0x40, and filter type FLOW_CONTROL. Click apply. Normally we'd continue and setup 7 more filters in case your car has multiple ECUs.
- On the messages tab click start to start reading. In this example the normal CAN traffic is being filtered out so you won't see anything until you make an OBD request.
- The scratchpad box lets you send a single message. This includes the header (always expressed as 4 bytes) plus the request. Type 0x40 in the flags box and 00 00 07 DF 01 0C in the scratchpad. Click send. You should see a response in the top section.
- Now try 0x40 in flags and 00 00 07 DF 09 02 in the scratchpad. This is a VIN request; most newer ECUs will respond, but it's not required. Give it a try.
Notice that we connect as ISO15765 -- that way the tool handles all flow control and reconstructs the CAN frames into 4k messages automatically. I described the process for 11-bit CAN, but some european vehicles use 29-bit CAN and the process would be slightly different. You can use another tool vehicle check on that downloads page to determine the protocol and test that the vehicle is alive and responding.
Also notice that the complete VB sourcecode is included with that j2534-1 demo program. If you're programming in VB it might help get you started.
Joey, youre AWESOME! that worked perfectly I cant believe it. tried this for days but was trying 7e800000 instead of 000007e8 and did not use flow control nor flags before
I have been using the v1.05 API you pointed to. didnt see the source code, will check that out. c# is preferred but VB is good also.
so, its 4 bytes, 00 00 07 FD
and then the mode, then the data? wow.
the J2534 Ive got looks like the carDAQ. again thanks SO MUCH!
was going to try labview? but the eval version Ive got had expired, looks like its written in 7.1 and I have older 6.0 and 7.0 evals sitting around. doesnt work because of the 0.1. then couldnt find the upgrade from 7 to 7.1 labview would be the easiest to setup and run, is there any chance you have this in a format compatible with 7.0?? (I dont recall the issue with 7.0 v 7.1)