CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Library J1939 CCS v5

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
fernandokestering



Joined: 03 Sep 2018
Posts: 21

View user's profile Send private message MSN Messenger

Library J1939 CCS v5
PostPosted: Mon Sep 10, 2018 11:58 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Sep 10, 2018 1:11 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Sep 10, 2018 1:15 pm     Reply with quote

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

View user's profile Send private message MSN Messenger

PostPosted: Mon Sep 10, 2018 4:03 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group