Friday, December 1, 2017

linux lsusb

lsusb -vd 2650:1616

echo -n -e '\x66\x6f\x6f' > /dev/hidraw0
echo -n -e \\x66\\x6f\\x6f > /dev/hidraw0


https://www.kernel.org/doc/Documentation/hid/hidraw.txt

libudev to locate hidraw
devices attached to the system.  There is a tutorial on libudev with a
working example at:
 http://www.signal11.us/oss/udev/

write()
--------
The write() function will write a report to the device. For USB devices, if
the device has an INTERRUPT OUT endpoint, the report will be sent on that
endpoint. If it does not, the report will be sent over the control endpoint,
using a SET_REPORT transfer.

The first byte of the buffer passed to write() should be set to the report
number.  If the device does not use numbered reports, the first byte should
be set to 0. The report data itself should begin at the second byte.

http://elixir.free-electrons.com/linux/latest/source/samples/hidraw/hid-example.c


http://www.signal11.us/oss/udev/

$/sys/class/hidraw/hidraw0$ ls
/sys/class/hidraw/hidraw0/device

/sys/bus/usb/devices/2-1.2/

No comments:

Post a Comment