Display Rx Messages in Hexadecimal

A free API for the communication with control devices according to UDS (ISO 14229-1)
Post Reply
K1890350
Posts: 20
Joined: Mon 7. Mar 2022, 13:13

Display Rx Messages in Hexadecimal

Post by K1890350 » Mon 20. Jun 2022, 10:44

Hello,

I'm looking into how I can display the raw hex message received from the ECU.

I understand that using Read_2013 would return a status code for the receive queue. But, is there any way I can read and display the raw hexadecimal message from the ECU onto a GUI (and not a status code message?).

NOTE: Communication has been established between transmitter and receiver via mapping.

Best,
K1890350

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: Display Rx Messages in Hexadecimal

Post by K.Wagner » Mon 20. Jun 2022, 11:40

Hello,
K1890350 wrote:
Mon 20. Jun 2022, 10:44
I understand that using Read_2013 would return a status code for the receive queue.
when the function returns PUDS_STATUS_OK, then you got a message. This is placed in the out_msg_buffer parameter.
K1890350 wrote:
Mon 20. Jun 2022, 10:44
I'm looking into how I can display the raw hex message received from the ECU.
When you read a message, this is retrieved in form of a uds_msg structure. This structure hast a field "msg" of type cantp_msg which has a property itself called "msgdata". This gives you access to the generic data bytes of the received message (check the sample project 01_server_response_ecu_reset_USDT):
.
rcvMsg.PNG
rcvMsg.PNG (1.72 KiB) Viewed 1707 times

If you rather want to have the segmented frames that are part of an ISO-TP multiframe communication in your output, then you will need to use the ISO-TP parameter PCANTP_PARAMETER_FRAME_FILTERING, using the value "PCANTP_FRAME_FILTERING_VERBOSE". More informaiton can be read in the PCAN-ISO-TP documentation, chapter 3.5.14
Best regards,
Keneth

Post Reply