LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Closed Thread
 
LinkBack Search this Thread
Old 01-05-2006, 12:00 AM   #1
wch_zj
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);

}

usleep(50000);
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
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 65
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.

http://www.linuxquestions.org/rules.php

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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 11:39 AM.

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