Results 1 to 7 of 7
Hi
I am trying to write a file to a USB device using C program..
When i try to open the USB port, i find the foll error
"open_port: unable ...
- 09-06-2007 #1Just Joined!
- Join Date
- Sep 2007
- Posts
- 3
Need help with USB programming
Hi
I am trying to write a file to a USB device using C program..
When i try to open the USB port, i find the foll error
"open_port: unable to open usbdev2.1_ep81: No such file or directory"
The command to open the USB port:
sprintf(portfile,"/dev/usbdev2.1_ep81");
if((fd=open(portfile, O_RDWR | O_NOCTTY | O_NDELAY))==-1)
perror("open_port: unable to open usbdev2.1_ep81");
Please provide some inputs/help
Thanks,
Priya
- 09-07-2007 #2Linux User
- Join Date
- Jul 2004
- Location
- Poland
- Posts
- 368
This might sound silly, but is the file really sitting on the file system, i.e. did you check that there's really a file called /dev/usbdev2.1_ep81 ?
"I don't know what I'm running from
And I don't know where I'm running to
There's something deep and strange inside of me I see"
- 09-07-2007 #3Just Joined!
- Join Date
- Sep 2007
- Posts
- 3
Hi
Ya actually i wanna access any of the USB ports available in /dev/
and write file to it.
Please help me out with this..
Thanks in advance
- 09-07-2007 #4Linux User
- Join Date
- Jul 2004
- Location
- Poland
- Posts
- 368
What do you want do do with this ports? Generally, you need a driver to access a device.
"I don't know what I'm running from
And I don't know where I'm running to
There's something deep and strange inside of me I see"
- 09-07-2007 #5Just Joined!
- Join Date
- Sep 2007
- Posts
- 3
- 09-07-2007 #6Just Joined!
- Join Date
- Aug 2007
- Posts
- 9
It might present it self as a tty port.
ttyUSB0 or something
- 09-07-2007 #7Linux User
- Join Date
- Jul 2004
- Location
- Poland
- Posts
- 368


Reply With Quote
