I have been trying to actually test out my HW with this and I am running in to an issue that I did not notice before since I was not testing for it.
In my system I have an CAN device which will loop back the data received by the device back to the sender(PC-USB1 Peak), EXCEPT that it will increment each character by 1. So if I send out "Peak", I would expect,"Qfbl" to come back. This is a simple way to modify the data and to make sure I am reading the correct data when doing loopback. My device is also sending data with msg_id "0xA1" and flow control with "0xA2". This can be seen in the lower right hand corner of the attached picture.
When I use the file that was attached to the thread(Sending Basic Packet with Flow Control), "client_ISO15765-2_normal_addressing.cpp", attached as well, the data in the rx_msg contains the original data in tx_msg ("PEAK-System - PCAN-ISO-TP Sample") and not the data that is on the bus. I ran into this issue when trying to use example "isotp_segmented_read_write.cpp", after I converted it to use my simple loopback device. In debugging, I re-ran the same test with the simple project that was posted in the previous thread ("client_ISO15765-2_normal_addressing.cpp") which has the exact same failure mode. In the attached image I tried to include all of the key data structures and the values.
In the attached picture, you can see the data being sent back to the Peak from the device has been modified by incrementing each character by 1.
The console log is
Code: Select all
PCAN-ISO-TP API Version: 22.214.171.124 Initialize: OK Set STMIN = 600us: OK Allocate tx message: OK Add a simple mapping: OK Add a simple mapping: OK Initialize tx message: OK Write "PEAK" message: OK CANTP_Read_2016 (indication): OK, netstatus=00 CANTP_Read_2016 (complete): OK, netstatus=00
I have spent over a day on this and I don't know how to proceed. Do you have any suggestions?