jxltom / gs_usb

Python Windows/Linux CAN driver based on WCID for Geschwister Schneider USB/CAN devices and candleLight USB CAN interfaces
21 stars 12 forks source link

Timeout error when sending single frame #14

Open Oliver98t opened 9 months ago

Oliver98t commented 9 months ago

I have noticed that the following timeout error ocurrs only when transmitting a frame without constantly reading frames?

idual Project\RDSMSN_module\test.py", line 95, in main if dev.send(frames[0]): File "C:\Python\Python38\lib\site-packages\gs_usb\gs_usb.py", line 160, in send self.gs_usb.write(0x02, frame.pack(hw_timestamps)) File "C:\Python\Python38\lib\site-packages\usb\core.py", line 989, in write return fn( File "C:\Python\Python38\lib\site-packages\usb\backend\libusb1.py", line 837, in bulk_write return self.write(self.lib.libusb_bulk_transfer, File "C:\Python\Python38\lib\site-packages\usb\backend\libusb1.py", line 938, in write _check(retval) File "C:\Python\Python38\lib\site-packages\usb\backend\libusb1.py", line 602, in _check raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBTimeoutError: [Errno 10060] Operation timed out

Is this by design of the gs-usb module?

Thanks,

Oliver

ChAoTiCM1Nd commented 4 months ago

Not sure if you've figured it out, but i've noticed timeout errors are always raised if the CAN connection is not complete. FOr instance, I use usb2can devices. If, let's say, Busmaster is connected BUT not transmitting anything - all is well. If it's transmitting stuff - all is also well. However, if I disconnect it, I instantly get timeouts.