python-can icon indicating copy to clipboard operation
python-can copied to clipboard

usb2can device

Open superlogan72 opened this issue 3 years ago • 6 comments

Hello i have buy a usb2can by inno-maker but I'm not able get it work I'm under windows 10 and the device is well recognized by the system as per attached picture

sistema but I'm not able to configure it with python-can Can you give me some idea or just suggest me a working usb2can device with this library Thanks

superlogan72 avatar Apr 07 '22 08:04 superlogan72

Hi there, I have (I assume, since it is recognized by Windows in the same way) the same Device.

I got it to work with python-can using the "gs_usb" interface Module. Follow the explanations in the docs.

I had to manually download libusb-1.0.x for Windows and move the .dll to \Windows\System32 and then change the driver with Zadig to libusb-win32. It will say the driver is libusb0 after that, but down worry about it.

Have fun!

Muteskinto avatar Apr 08 '22 14:04 Muteskinto

i have done it but i get the error: Exception "unhandled usb.core.USBError" [Errno 13] Access denied (insufficient permissions) File: C:\Users\Luca\AppData\Local\Programs\Python\Python38\lib\site-packages\usb\backend\libusb1.py, Line: 604 I'm using win10 64bit

superlogan72 avatar Apr 08 '22 14:04 superlogan72

sadly I did not get that Error. But it could be that you don't have a libusb-xx.dll in C:\Windows\System32 folder or that the pyusb backend can't access the folder. Maybe check that and also try looking up threads of pyusb for your error since its usb and not python-can related

Muteskinto avatar Apr 08 '22 16:04 Muteskinto

I have redo all and now it works. Many thanks

superlogan72 avatar Apr 08 '22 16:04 superlogan72

Sorry again i try a simple program but i get this error Can you suggest something?

nodo_luca = BaseNode402(1, 'EBS.eds') network = canopen.Network() network.add_node(nodo_luca) network.connect(bustype="gs_usb", channel=dev.product, bus=dev.bus, address=dev.address, bitrate=500000) network.scanner.search() time.sleep(0.05) for node_id in network.scanner.nodes: print("Found node %d!" % node_id) #here i get Found node 1! node.setup_402_state_machine() #i get: Exception "unhandled AssertionError" OPERATIONAL File: C:\Users\Luca\AppData\Local\Programs\Python\Python38\lib\site-packages\canopen\profiles\p402.py, Line: 239

superlogan72 avatar Apr 11 '22 15:04 superlogan72

Maybe you can try to replace the driver to "libusbK" instead of "libusb-win32" and then have a try. I got issues with libusb-win32, but works well if using the libusbK.

gerryqd avatar Mar 23 '23 02:03 gerryqd