Multiple applications using same PCAN USB device

Pass-Thru API and connection of Pass-Thru software to PEAK CAN interfaces.
Post Reply
dmedore
Posts: 5
Joined: Wed 9. Jun 2021, 05:27

Multiple applications using same PCAN USB device

Post by dmedore » Wed 23. Jun 2021, 22:27

Is it possible to have 2 applications that use PCAN-PassThru to simultaneously use the same PCAN USB device?

I know this would be possible with PCAN-Developer 4...just curious about PassThru

Thanks

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

Re: Multiple applications using same PCAN USB device

Post by K.Wagner » Thu 24. Jun 2021, 08:08

Hello,

no, this is not possible. Because PCAN-PassThru uses PCAN-Basic for the transport layer, the same restrictions apply, meaning, it doesn't support connecting the same device twice.
Best regards,
Keneth

projix
Posts: 10
Joined: Mon 18. Jan 2021, 00:19

Re: Multiple applications using same PCAN USB device

Post by projix » Sun 22. Aug 2021, 21:27

This is a general J2534 issue because J2534 DLL's are not meant to be accessed by more than one process. The API spec says so.
The only workaround is to have one process as the gateway and then have other processes communicate with this process to send the packets.
Most likely you will have to implement your own ISO15765-2 layer as well, if you need it, because most devices do not support simultaneous ISO15765-2 between two or more different nodes, if you need to communicate with multiple nodes of course.

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

Re: Multiple applications using same PCAN USB device

Post by K.Wagner » Mon 23. Aug 2021, 11:07

projix wrote:
Sun 22. Aug 2021, 21:27
This is a general J2534 issue because J2534 DLL's are not meant to be accessed by more than one process. The API spec says so.
Yes, this is true. Note nevertheless that the question was more related to the underlying API used for transport communication, CanApi4 that is part of PCAN-Developer 4 (professional API), vs. PCAN-Basic which is used for PCAN-PassThru. So the answer I gave is still correct.

But this is good to mention this restriction in the specifications since not all users are aware of this. Thank you for pointing this out.
Best regards,
Keneth

Post Reply