Hi,
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.
Cheers,
ValeV
Python example?
Re: Python example?
Hello,
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.
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.
Best regards,
Keneth
Keneth
Re: Python example?
I see, thank you for replying. Would you be willing ti assist me with starting writing a wrapper? Or maybe it's unrelated to PEAK systems.
First I try to load DLL:
which gives me error "OSError: [WinError 126] The specified module could not be found". Are you familiar with this problem? I googled it, but didn't find any simple solution.
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")
Re: Python example?
Hello,
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.
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.
Best regards,
Keneth
Keneth
Re: Python example?
Sorry I didn't write back. Ofcourse I fixed the problem, as you described, I should have used windll.