louking / tm-csv-connector

Time Machine - CSV Connector - creates CSV file from time machine input, for scoring software to read
Apache License 2.0
1 stars 0 forks source link

barcode scanner exception: A device attached to the system is not functioning. #74

Open louking opened 1 month ago

louking commented 1 month ago

Exception connecting to barcode scanner

2024-05-22 15:46:42,356 barcode-scanner INFO: barcode scanner async reader started with port COM6
Exception in thread Thread-4 (reader_thread):
Traceback (most recent call last):
  File "threading.py", line 1016, in _bootstrap_inner
  File "threading.py", line 953, in run
  File "app.py", line 187, in reader_thread
  File "asyncio\runners.py", line 44, in run
  File "asyncio\base_events.py", line 649, in run_until_complete
  File "app.py", line 157, in reader
  File "serial_asyncio\__init__.py", line 449, in create_serial_connection
  File "serial_asyncio\__init__.py", line 477, in connection_for_serial
  File "serial_asyncio\__init__.py", line 65, in __init__
  File "serial\serialutil.py", line 372, in timeout
  File "serial\serialwin32.py", line 222, in _reconfigure_port
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)
louking commented 1 month ago

Response from Tera support (barcode scanner vender). Seems like restart was required after installing this. Note this driver had to be reinstalled after a while.

Thank you for reaching out to us. We recommend updating the serial port driver. Here is a link to the specific driver. https://www.dropbox.com/scl/fi/0qxwdaxucqwic6mk3qov2/Serial-Port-Driver_20220302-1.EXE?rlkey=i1sb66825uqdxyo3bqkk3dt6o&dl=0

Also available from https://oemdrivers.com/usb-ch340 (use version 3.7.2022.01)

louking commented 1 month ago

consider newer driver mentioned in https://github.com/dzhu/myo-raw/issues/31#issuecomment-1715926272

Also see https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all

louking commented 1 month ago

May need to prevent driver updates -- see

shanholtzerk commented 3 weeks ago

I tried determining whether the device ID remains the same with a Sandisk USB drive and the device ID remained the same after moving it to a different USB port and rebooting the PC.

louking commented 3 weeks ago

I think the "device" is the chip which runs the USB port. When I have the barcode reader connected it's USB-CH340. Not sure about hard drive if the same chip would be used, but I'm guessing so. I'm deep into https://github.com/louking/tm-csv-connector/issues/75 now but will try this when I get a chance.