Quantcast
Channel: Objective Development Forums
Viewing all articles
Browse latest Browse all 4524

Re: v-usb + hidapi

$
0
0
Try to change:
unsigned char buf[9];

to:
unsigned char buf[8];

Editted:

because you " return 8 " in the device side while ' res = hid_read(handle, buf, sizeof(buf))' will return " sizeof(buf) " which is also 8, so the " res " will return negatif value as I knew.

Add your code to show the return value with the printf, so you can be sure what value was returned.

Hope it's right.

Viewing all articles
Browse latest Browse all 4524

Trending Articles