hidapi icon indicating copy to clipboard operation
hidapi copied to clipboard

hid_write waits infinitely often when device gets disconnected under FreeBSD

Open wojtekpdgs opened this issue 8 years ago • 1 comments

Device i work with is presenting itself as hid device with different name when in "firmware flash" mode and normal operating mode. when in "firmware flash" mode it takes new firmware using it's own protocol. Which with my program works fine. Then the last command needs to be sent that ends programming. DEvice then switch to normal mode successfully. but hid_write doesn't return.

Is there any way to add timeout to hid_write or solve this.

Strange - the same works fine in windows.

wojtekpdgs avatar Feb 19 '18 09:02 wojtekpdgs

I believe there was a PR that added a 1 second timeout to hid_write only for Windows. Would also be useful for other platforms. I run into a similar infinite block when switching from normal mode to firmware mode with my device.

hbursk avatar May 12 '19 04:05 hbursk