pylessard / python-udsoncan

Python implementation of UDS (ISO-14229) standard.
MIT License
586 stars 201 forks source link

J2534Connection: [WinError 193] #92

Closed MasterCodeIT closed 3 years ago

MasterCodeIT commented 3 years ago

Working with Windows 10

Trying to get the J2534 cable recv and send using your J2534Connection:


from udsoncan.connections import J2534Connection
conn = J2435Connection('./op20pt32.dll', rxid=0x123, txid=0x456)

**File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64qbz5n2kfra8p0\lib\ctypes\init__.py", line 452, in LoadLibrary return self._dlltype(name)

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64qbz5n2kfra8p0\lib\ctypes\init.py", line 374, in init__ self._handle = _dlopen(self._name, mode)

OSError: [WinError 193] %1 is not a valid Win32 application**

mertdemirer commented 2 years ago

May I ask how you resolved this error? I have the same problem however I am trying to connect to an ETAS hardware (es582 to be specific) and therefore they provide a different dll for j2534 connections. I am not entirely sure whether I can connect to it using a different dll but I think it should be possible since from my understanding, hardware providers should comply with the rules of j2534 while handing out these dlls.

I am using a 64 bit windows, and the dll that I am using is supposedly supported on 64 bit windows however I have suspicions that it actually runs on 32 bit since the dll was installed to C:\Program Files (x86). Perhaps this was the issue you faced and you fixed it with finding the 64 bit version of the dll?