View previous topic :: View next topic |
Author |
Message |
fernandokestering
Joined: 03 Sep 2018 Posts: 21
|
Library J1939 CCS v5 |
Posted: Mon Sep 10, 2018 11:58 am |
|
|
Has anyone used the J1939 library provided with the version 5 compiler successfully?
I am trying to request address data 65,217, but it does not return data.
I can only capture the data of this PGN if it is sweeping the CAN network through the routine (J1939ReceiveTask () -> can_getd (ReceivedPDU, Data, length, Status)) until some ECU triggers this information in the network |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1911
|
|
Posted: Mon Sep 10, 2018 1:11 pm |
|
|
I've not developed code for J1939 proper, but I have developed code for NMEA 2000, which is a superset of J1939. I've been using CAN in commercial systems for about 15 years now. I just wrote the NMEA code last fall. It took over 4 months. It was the most demanding/involved coding I've ever done. I had to read thousands of pages of documentation to pull it off. To be blunt, it was very difficult. Exceedingly difficult.
With this in mind, any compiler-supplied driver for J1939 - in my mind at least - is suspect in terms of its capabilities. Count yourself lucky that it is capable of receiving and decoding J1939 frames. Creating J1939 is an entirely different animal.
You'll have to figure out which node (the source address of the node) that is creating the message you want. There should be a generic request PGN and its payload will be (or will contain, among other things) the PGN that you are requesting. The node you're interested in should answer that request. Furthermore, you'll have to write code to properly attach to the bus and properly claim a source address (SA) AND you'll have to properly relinquish or defend that SA should something else on the bus decide to claim it. Fail to properly do this and you can lock up the bus. |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1911
|
|
Posted: Mon Sep 10, 2018 1:15 pm |
|
|
Edit: from your other post the message ID of the frame you're interested in is: 18FEC1EE. The FEC1 is the PGN, 65217. The SA of the message originator is probably 0xEE, but the spec might make an exception. It's up to you to find and read the J1939 spec. |
|
|
fernandokestering
Joined: 03 Sep 2018 Posts: 21
|
|
Posted: Mon Sep 10, 2018 4:03 pm |
|
|
Exactly this ID (18FEC1EE) that I am.
I'm simply checking when this ID and others that interest me appear on the network, there I read the data. |
|
|
|