Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 07-14-2004, 06:44 AM   #1
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);
bytes == -1; )
errno == EINVAL;

BTW i have a root permissions.

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


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

All times are GMT -5. The time now is 08:10 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration