3
#include <fcntl.h>
#include <linux/hiddev.h>
#include <sys/ioctl.h>

My HID device shows up as dev/usb/hiddev0.

I can successfully open() the device with

fd = open("/dev/usb/hiddev0", O_RDWR);

And generate correct device reports by printing the values in my HIDIOCGDEVINFO struct.

Now I need to send 64 byte packets to the device. (msp430F5510 BSL). Can I write to the device using ioctl or write()? Are there any examples around?

Shafik Yaghmour
  • 154,301
  • 39
  • 440
  • 740
Fritz Huie
  • 41
  • 1
  • 5
  • Perhaps this could help: http://stackoverflow.com/questions/6846341/write-something-to-linux-hid-device – Cyclonecode Jul 23 '13 at 02:14
  • Here's another potentially helpful post. http://stackoverflow.com/questions/17679480/details-on-usb-no-luck-so-far/17679571#17679571 – eatonphil Jul 24 '13 at 14:02

0 Answers0