Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to get VIN no via J1939 protocol??

Status
Not open for further replies.

jtronix

Member level 3
Joined
Dec 4, 2012
Messages
67
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,860
Hello,

How to get VIN no via J1939 CAN protocol??

I need Frame format for send the request so that in reply i 'll get VIN no.

Is there any document available for all command so that i can get other detail also??

Thanks in advance
 

Could anyone please suggest below packet format for request VIN no?

Source address is 0x27.

CAN Message:
id =
length =
type = (available options are data or remote)
data[0] =
data[1] =
data[2] =
data[3] =
data[4] =
data[5] =
data[6] =
data[7] =

what will be the expected response ??


I had tried the following packet but didn't get any response

id = 0x7DF
length = 8
type = data
data[0] = 0x02
data[1] =0x09
data[2] =0x02
data[3] =0x00
data[4] =0x00
data[5] =0x00
data[6] =0x00
data[7] =0x00
 

I had sent request for
ID = 0x18EAFFF9,
Data = 0xEC, 0xFE,0x00
length = 3

but didn't get any response.

1) I have not sent address claim, but in system fixed addressing scheme is there so do i have to sent address claim message before start communication???
2) Can anyone suggest what will be the expected reply for this request??
 

Check about 1/2 way through this presentation, is a little information on the VIN PGN an dhow it could be retrieved - as it is 17 bytes/characters+asterisk it cannot be fit into a single frame and must be transferred using the datagram transport scheme for J1939
https://www.simmasoftware.com/j1939-presentation.pdf
 

I have tried few command buf After searching on google i found that address claim is must before initiate communication with control unit.

assume that my device is off board diagnostic so how to claim address on CAN J1939 network??

Msg.id.pdu_bit.edp = 0;
Msg.id.pdu_bit.dp = 0;
Msg.id.pdu_bit.pf = 234;
Msg.id.pdu_bit.ps = 255;
Msg.id.pdu_bit.sa = 249;
Msg.id.pdu_bit.pri = 6;

Msg.buf[0] = 0x00; //LSB First
Msg.buf[1] = 0xEE;
Msg.buf[2] = 0x00;

Msg.len = 3;

i have send this command to controller but controller doesn't respond anything
 

You must read the J1939 specification more carefully. PGN field is comprised of the PF and PS datafields, which you are setting to 0xEAFF, not 0xEE00.
To my understanding, the message length of the data must be 8 bytes for this message, ane must contain the NAME field content. You must specify the appropriate values for these 8 bytes.

As with all things CANbus, your device must monitor it as it transmits its message - if there is a conflict with another device it will cause one or more of the recessive bits in your message to be "stepped on" by a dominant bit (low bit) which could be another ECU which already has your requested address but which obviously has different name field contents. The message/name field allows for one or the other to "battle" to decide who gets the address - lowest message content (first dominant bit difference) generally wins. You must allow all 8 bytes of the msg/NAME field to be sent to give opportunity for another ECU to contest the address claim.

Look further in the link I posted for some of this information, though the specific contents of the NAME field are not provided there - you will have to find that elsewhere.

I've developed various protocols running on CANBus hardware, including CANOpen, DeviceNet, etc, but haven't personally used J1939, so some of these details you must research.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top