1
\$\begingroup\$

I'm working on the J1939 PGB protocol.
In this protocol I didn't understand the word "parse PGN"
If any one can know about It then It will be very much helpfull for me.
Thanks In Advance.

\$\endgroup\$
5
  • \$\begingroup\$ Not a real question about electronics. It will be closed. \$\endgroup\$ Commented Oct 24, 2011 at 12:08
  • 3
    \$\begingroup\$ Are communications protocols off topic here too? \$\endgroup\$
    – Oli Glaser
    Commented Oct 24, 2011 at 19:37
  • \$\begingroup\$ They are if they are nothing to do with electronic design. \$\endgroup\$ Commented Oct 24, 2011 at 19:46
  • 4
    \$\begingroup\$ This looks to me like an electronic communications protocol. In the FAQ it mentions "a communications scheme" as being suitable question material. If certain protocols are not on topic, which ones are they - for instance is I2C allowed? USB? RC-5? TCP/IP? \$\endgroup\$
    – Oli Glaser
    Commented Oct 24, 2011 at 20:06
  • \$\begingroup\$ I think we have some disagreement here. I believe working with communications protocols is on topic. The question could be of higher quality but that is a side note. This might be due to English issues, it also might just be someone not dedicating enough time. When you are designing electronics you often use protocols, sometimes you understand how to do the electronics but cannot get the protocol to work, why would this not be something we can help with? @LeonHeller \$\endgroup\$
    – Kortuk
    Commented Oct 30, 2011 at 11:10

2 Answers 2

4
\$\begingroup\$

The J1939 protocol, typically carried over a 2-wire CAN bus inside a vehicle.

All J1939 packets, except for the request packet, contain an index called PGN (Parameter Group Number), part of the message's 29-bit identifier in the message header.

When your software reads a J1939 packet, you need to extract that number from the rest of the packet (in other words, "parse that number") to decide what the rest of the packet means.

Most software that receives J1939 packets has a list of PGN numbers that it understands, and ignores any packet with a PGN number not on its internal list. There's a few example PGNs mentioned online; my understanding is that you have to buy the spec from SAE to get the complete list of PGNs and the format and meaning of packets with that PGN.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for your answer.Its really very clear n helpfull document for me and thanks for your advice \$\endgroup\$ Commented Oct 25, 2011 at 5:53
2
\$\begingroup\$

Based on page 13 of: http://www.esd-electronics-usa.com/Shared/Library/J1939/SAE%20J1939%20Extended.pdf

The 29-bit message id of a J1939 message is broken into three parts:

  1. The source address (8 least significant bits)
  2. The PGN (next 18 least significant bits)
  3. The Priority (remaining 3 bits)

So, a message with id 0x12345678 has:

  1. A source address of 0x78
  2. A PGN of 0x23456
  3. A priority of 0b100, or 4.
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.