LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-14-2004, 05:44 AM   #1
stpg
LQ Newbie
 
Registered: Jun 2004
Distribution: Fedora Core 2
Posts: 11

Rep: Reputation: 0
Angry Writing to /dev/usb/hiddevX and to /proc/bus/usb/00B/00S throw an arror EINVAL


Ok. I want READ/WRITE to my PIC16 (usb hid )and can't do this. maybe ill must use ioctl but cant find any examples. Here the my suxx code

unsigned char outbuff[USB_BUFFSIZE]; //USB output buffer. 1 byte for report, 8 bytes for the PIC

//char * dev = "/dev/usb/hiddev0"; <--- this is real my device
char * dev = "/proc/bus/usb/003/001"; <-- too


if ((fd = open(dev, O_RDWR|O_NONBLOCK|O_SYNC)) < 0) {
////
}
int bytes = write(dev,outbuff,USB_BUFFSIZE);
//------------------------------------/
executing
bytes == -1; )
errno == EINVAL;

BTW i have a root permissions.

Last edited by stpg; 07-14-2004 at 07:46 AM.
 
  


Reply


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
lilo says, "L 01 01 01" and fdisk says, "Unable to seek on /dev/hda1" clausawits Linux - General 3 12-31-2007 09:33 PM
lost writing ability on usb-stick / not possible with protocol "drives" - how to fix? ungua Suse/Novell 3 11-24-2004 08:11 PM
"Unable to open USB device "usb://hp/LaserJet%201000": No such device" lordshipmayhem Mandriva 2 08-08-2004 04:56 PM
cupsd, many "modprobe: can't locate device /dev/usb.." at boot bit7 Linux - Software 1 01-16-2004 08:42 PM
How to get Linux to "ignore" one USB bus but not another? bennyt321 Linux - Hardware 1 11-01-2003 12:39 PM


All times are GMT -5. The time now is 08:29 PM.

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