0

My main goal is to to get VIN no of my control unit but for that i need to send command to controller and before sending any command to controller i must have to claim address.

I have send below command on my network but didn't got any response from it.

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; // pgn for claim address
Msg.buf[2] = 0x00;

Msg.len = 3;

Is this is right way to claim address or do i have send different command??

jtro
  • 121
  • 1
  • 2
  • 5

1 Answers1

3

It looks like you have some confusion between PGN 60928 (address claim) and PGN 59904 (request PGN)

Msg.id.pdu_bit.pf = 234;

Needs to be

Msg.id.pdu_bit.pf = 238;

The PGN for address claim is 60928 so your PF field in your J1939 header needs to be 238 (0xEE). Your data is going to be application specific although it's data length should be 8. See J1939 Spec slide 41 for more information on this data format.

Alternatively if you use PGN 59904, THAT is when your data length is 3 (unless you have more application specific information) and your data is the PGN that you want to request.

You do not have to request an address claim PGN, you just simply send out the address claim with your source address set to the address you want to claim.

LaneL
  • 737
  • 1
  • 6
  • 25