Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset every 16th read #2

Open
giddie opened this issue May 30, 2013 · 0 comments
Open

Reset every 16th read #2

giddie opened this issue May 30, 2013 · 0 comments

Comments

@giddie
Copy link

giddie commented May 30, 2013

Hi there,

This is a really useful bit of code; thank you for your contribution to it. I'm running into some odd behaviour: although I can read temperature measurements fine, the device resets every 16th read, with the following debug output:

lvr_winusb with Vendor Id: c45 and Product Id: 7401 found.
Detach failed: No such file or directory[2]
Continuing anyway
Detach failed: No such file or directory[2]
Continuing anyway
01 01 28 01 00 00 00 00 
01 80 33 01 00 00 00 00 
USB interrupt readUSB control writeUSB interrupt readUSB control writeUSB interrupt readUSB interrupt readdevice_type=1
USB control writeUSB interrupt readlvr_winusb with Vendor Id: c45 and Product Id: 7401 found.
libusbx: error [op_open] libusbx couldn't open USB device /dev/bus/usb/002/032: No such file or directory.
libusb-compat error: usb_open: could not open device, error -4
Could not open USB device
Couldn't find the USB device, Exiting
lvr_winusb with Vendor Id: c45 and Product Id: 7401 found.
detach successful
detach successful
01 01 28 01 00 00 00 00 
01 80 33 01 00 00 00 00 
80 02 22 00 65 72 31 46 
01 82 77 01 00 00 00 00 
82 01 00 00 65 72 31 46 
01 86 ff 01 00 00 00 00 
54 45 4d 50 65 72 31 46 
31 2e 34 50 65 72 31 46 
device_type=1
01 80 33 01 00 00 00 00 
80 02 22 00 65 72 31 46 
30-May-2013 11:52,34.125801

This is what a normal read looks like:

lvr_winusb with Vendor Id: c45 and Product Id: 7401 found.
Detach failed: No such file or directory[2]
Continuing anyway
Detach failed: No such file or directory[2]
Continuing anyway
01 01 f0 00 00 00 00 00 
01 80 33 01 00 00 00 00 
80 02 22 00 65 72 31 46 
01 82 77 01 00 00 00 00 
82 01 00 00 65 72 31 46 
01 86 ff 01 00 00 00 00 
54 45 4d 50 65 72 31 46 
31 2e 34 50 65 72 31 46 
device_type=1
01 80 33 01 00 00 00 00 
80 02 22 00 65 72 31 46 
30-May-2013 11:52,34.125801

The pattern is: 15 successful reads (the first says "detach successful"), followed by 1 failed read, during which the linux kernel reports a disconnect, and then rediscovers the device. It then gets a new device node, and the tool then tries again and succeeds before ending. It would be nice if this didn't happen. I'm particularly wondering what might happen when the device node maxes out at /dev/usb/002/999. Will it wrap back round? I'd like to do more diagnostics, but unfortunately I can't afford the time :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant