I am trying to write to a certain CANID value when it sends the UDS packets
I already saw some samples that talk about using custom CANID, but from the documentation it seems I don't need it because its says that I should use (page 340):
CAN ID 0x14CEXXYY/0x14CDXXYY (data link layer priority 5)
However, I cannot see in the sample what value defines this, I understand that XX is Target Address and YY Source address, but how does 0x14CE / 0x14CD gets selected?
None of the samples I found seem to define it
The UDS packet response should be received from: 0x14DAF181
And UDS packet request should be sent to: 0x14DA81F1
BTW: I believe that TA should be F1 and the SA should be 81 from what I understand
Thank you for your request.
Regarding your issues:
Have you seen this post regarding adding mapping for using different CAN-IDs?
Furthermore this thread contains a detailed explanation of both TA and SA by my colleague Mr.Vergnaud:
Were you able to resolve your issues with the answer provided in the forum-threads?
I am not quite following how these two answers relate to my issue, I want to call:
I do not want to call UDS_Write
Also, AddMapping appears to be missing from the headers of PCAN-UDS, where are they being provided (for C++)?
Maybe it has transitioned to some new function name like: CANTP_AddMapping_2016 ?
The mapping does not differ from functon to function, the mapping is used for all functions universally.
In the PCAN-UDS API the mapping can be set using the paramter "PUDS_PARAM_MAPPING_ADD" , this is mentioned on page 341 of the PCAN-UDS documentation:
Alternatively the mapping can be changed using the underlying PCAN-ISO TP API, like mentioned
in the first post referenced.
Eventhough your request could be answered by defining a NORMAL mapping (instead of using FIXED_NORMAL addressing) as the user did in the mentioned thread by Marvin.
I'd suggested to simply change the J1939 priority configuration on your UDS channel:
- Include PCAN-ISO-TP header
- Call CANTP_SetValue (or UDS_SetValue) with the parameter PCANTP_PARAM_J1939_PRIORITY on your UDS channel
Code: Select all
TPUDSCANHandle Channel; // initialization [...] // change J1939 priority uint8_t param = 0x05; Status = CANTP_SetValue(Channel, PCANTP_PARAM_J1939_PRIORITY, ¶m, sizeof(param)); printf("Set PCANTP_PARAM_J1939_PRIORITY: %i\n", (int)Status); [...]
The generated CAN ID will be 0x14DAXXYY for FIXED_NORMAL addressing as stated in page 340.
CANTP_SetValue is defined in "PCAN-ISO-TP_2004.h", you can safely use the 2016 version.
Thank you for that answer
Can you explain a bit how can I instruct my developer based on a provided CANID value, lets say 0x18DAxxyy
What values / code he should run?
Our software doesn't know what CANID the user will be needing, so we need to be flexible.
Please note we can only give support on how to use our API. Information about the protocols and consulting on them is not part of our support offer. You know now that you need to create a mapping for that values, and you also know how to create a mapping. To know how to handle cases where you need to use different IDs or when to configure one or another, is your job.
If you have any other question regarding our API please feel free to open a new topic. This will be closed.
Thanks for your understanding.