Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


Closed Thread
  Search this Thread
Old 01-05-2006, 12:00 AM   #1
LQ Newbie
Registered: Jan 2006
Posts: 2

Rep: Reputation: 0
Unhappy how to send datas to HID device?why I can only send two bytes data to HID device?

please help me!I am hanging at the HIDIOCSUSAGE stage for severial days! these are my source,please point errs!
struct hiddev_report_info rinfo;

rinfo.report_type = HID_REPORT_TYPE_OUTPUT;
rinfo.report_id = HID_REPORT_ID_FIRST;
ioctl (fd, HIDIOCGREPORTINFO, &rinfo);

uref.report_type = HID_REPORT_TYPE_OUTPUT;
uref.report_id = rinfo.report_id ;
uref.field_index = 0;
uref.usage_index = 0;
ioctl (fd, HIDIOCGUCODE, &uref)

ioctl (fd, HIDIOCGUSAGE, &uref);

for(i=0;i<idatalen;i++) {
uref.report_type = HID_REPORT_TYPE_OUTPUT;
uref.report_id = 0x00;
uref.field_index = 0;
uref.usage_index = i;
uref.value = pucdata;
ioctl(fd, HIDIOCSUSAGE, &uref);


struct hiddev_report_info rinfo;

rinfo.report_type = HID_REPORT_TYPE_OUTPUT;
rinfo.report_id = 0x00;
rinfo.num_fields = 1;
ioctl(fd, HIDIOCSREPORT, &rinfo);
I can send two bytes data to My HID device,but I need to send 8 bytes to it,how should I do?please help me !
Old 01-05-2006, 07:14 AM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

Continue here.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
HID ( Human Interface Device ) USB saeed371 Debian 1 10-16-2005 05:47 PM
Programming on a hid Nightbird Programming 1 08-17-2004 03:26 AM
Problem with usb hid device on nforce 2 gak330 Linux - Hardware 0 06-06-2004 12:44 AM
HID Device wont work c0rderr0y Linux - Hardware 0 02-29-2004 07:00 PM
"permission denied" when I try to send raw data to the sound device. Travis86 Linux - Hardware 2 10-29-2003 09:08 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration