is there any example of using ISO-TP API in Python? I am not familiar with C#, C++ and VB.
For PCAN-BASIC there is Python example, so I'd expect there is one for ISO-TP as well.
I am looking for a simple sample to show how to initiate(), send() and receive() messages, just to get me started.
no, sorry, there is no example on python for this since there is no any PCAN-ISO-TP python unit. If you want to use PCAN-ISO-TP API with python you will need to start first by writing a wrapper to import and use all ISO-TP functions.
First I try to load DLL:
Code: Select all
from ctypes import * mydll = cdll.loadLibrary("C:\\Users\\M0097932\\Desktop\\python app\\PCAN-ISO-TP.dll")
yes, this problem is not related to PEAK-System. Check the PCANBasic.py, it can be used as sample for your own wrapper. Otherwise, look in internet for "Using DLL from Python"; there are plenty of samples for it.
you are using cdll. This is needed for importing functions with cdecl calling convention. Since all our APIs use the stdcall convention, you have to import the library with WinDLL. (see Loading dynamic link libraries)ValeV wrote:Are you familiar with this problem? I googled it, but didn't find any simple solution.