Simultaneously using ISO-TP and "normal" CAN.

A free API for the transfer of data packages according to ISO-TP (ISO 15765-2)
Post Reply
LudovicC
Posts: 9
Joined: Thu 19. Sep 2024, 16:44

Simultaneously using ISO-TP and "normal" CAN.

Post by LudovicC » Thu 19. Sep 2024, 17:59

I am playing around with a PCAN USB pro device to try to understand what is feasible and what are the limitations.
Basically, when testing DUTs (device under test), I want to be able to (from the Peak device perspective):
  1. Send several cyclic messages
  2. Receive and post-process several cyclic messages data
  3. Send diagnostic commands where a feedback from the DUT is expected on a specific CAN ID
I have already implemented a wrapper for the items 1) to 3) and it seems to be working fine.
I still need to make longer time testing to see how reliable the timing is (especially when sending several cyclic messages).
So the main functions that I am using are:
  • Initialize
  • Uninitialize
  • Reset
  • Write
  • Read
However, sometimes, for the item 3), the diagnostic might go through ISO-TP.
Which means I want to be able to keep my functions for items 1) and 2) with "normal" CAN or CAN-FD messages, and still be able to send ISO-TP frames.
I went through the documentation of the PCAN ISO-TP driver, and I am a bit confused because the api has its own initialize function:
  • Initialize_2016
  • Uninitialize_2016
  • Reset_2016
  • Write_2016
  • Read_2016
Since the PCAN-ISO-TP API has its own initialize_2016 function, I understand that the channel is initialized only for ISO-TP communication. Does it mean that I can't simultaneously send/receive standard CAN frame and ISO-TP CAN frame using both Peak.Can.basic and ISO-TP apis at the same time?
So if i want to perform simultaneously standard CAN and ISO-TP CAN, does it mean that I should implement my own ISO-TP functions on top of the Peak.Can.Basic api?

I am sure I could use two different channels from the PCAN USB pro, but I want to understand the possibilities when using only one channel.

Thank you in advance for the advices!

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

Re: Simultaneously using ISO-TP and "normal" CAN.

Post by K.Wagner » Fri 20. Sep 2024, 09:35

Hello,
LudovicC wrote:
Thu 19. Sep 2024, 17:59
Since the PCAN-ISO-TP API has its own initialize_2016 function, I understand that the channel is initialized only for ISO-TP communication. Does it mean that I can't simultaneously send/receive standard CAN frame and ISO-TP CAN frame using both Peak.Can.basic and ISO-TP apis at the same time?

Correct. PCAN-ISO-TP uses the PCAN-Basic for the transport layer. Since a PCAN-Basic channel can be initialized only once, it will not be avialble for PCAN-ISO-TP as long as it is used by PCAN-Basic.
LudovicC wrote:
Thu 19. Sep 2024, 17:59
So if i want to perform simultaneously standard CAN and ISO-TP CAN, does it mean that I should implement my own ISO-TP functions on top of the Peak.Can.Basic api?
No. PCAN-ISO-TP and PCAN-UDS support the raw CAN communication too. You have to define additional filters for data receiving and use specific frame configurations when sending to be able to send/receive raw CAN/CAN-FD data using a high layer protocol. See the sample project "07_classic_can_read_write" contained in the sample folder of the PCAN-ISO-TP package.
LudovicC wrote:
Thu 19. Sep 2024, 17:59
I am sure I could use two different channels from the PCAN USB pro, but I want to understand the possibilities when using only one channel.
This is of course an additional (maybe more comprehensible) way to do this. For raw CAN you could use the PCANBasic.NET NuGet package, which allows you to send cyclic messages, then PCAN-ISO-TP for doing only ISO-TP specifc taks.

Hope this is more clear now,
Best regards,
Keneth

Post Reply