Hello,
I'm using RP1210 API in C++ for a custom application.
When I send a message using RP1210_SendMessage with PGN 59904, I'm expecting to have a DLC of 3, but with a CAN analyser, I have à DLC of 8 with bitstufing by 0x00.
In the API, I can't find anywhere a way to tune the DLC.
As I can read in the standard J1939-21 regarding the PGN 59904 : "Data length: 3 bytes (The CAN frame for this PG shall set the DLC to 3.)"
Can you give me an explanation?
Thanks
J1939 and DLC
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: J1939 and DLC
Hello,
Thank you for your request.
Please note that the Frame-Size is determined by th buffer size for a given message:
Seems like your buffer size is the cause for the DLC of your sent frame, check your buffer
size and see if that resolves your issue.
Address claiming could alternatively also be done via the RP1210_SendCommand function ("Protect J1939 Address").
Please let us know if this helped you solve the issue.
Best Regards
Marvin
Thank you for your request.
Please note that the Frame-Size is determined by th buffer size for a given message:
Seems like your buffer size is the cause for the DLC of your sent frame, check your buffer
size and see if that resolves your issue.
Address claiming could alternatively also be done via the RP1210_SendCommand function ("Protect J1939 Address").
Please let us know if this helped you solve the issue.
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
Re: J1939 and DLC
Thanks for your quick response.
I checked the size of the data put into the fpchClientMessage parameter, it is 9 bytes long, according to what is specified in documentation.
This parameter is a scruture composed of :
unsigned char PGN[3]; //3 bytes
unsigned char priority; //1 byte
unsigned char SA; //1 byte
unsigned char DA; //1 byte
unsigned char pgn_data[3]; //3 bytes
Parameter nMessageSize = sizeof(struct) = 9, so I expect to have a DLC of 3 (9 - 6).
I use PCan Net Configuration tool to tune my network, is there any specific configuration to do at this level?
Thanks for your help.
I checked the size of the data put into the fpchClientMessage parameter, it is 9 bytes long, according to what is specified in documentation.
This parameter is a scruture composed of :
unsigned char PGN[3]; //3 bytes
unsigned char priority; //1 byte
unsigned char SA; //1 byte
unsigned char DA; //1 byte
unsigned char pgn_data[3]; //3 bytes
Parameter nMessageSize = sizeof(struct) = 9, so I expect to have a DLC of 3 (9 - 6).
I use PCan Net Configuration tool to tune my network, is there any specific configuration to do at this level?
Thanks for your help.
Re: J1939 and DLC
I have just find the issue : you were rigth, this is an issue on the message size, a regression has been recently introduced by another member of the team.
Thanks for tour help.
Thanks for tour help.