PDA

View Full Version : how to access usb device uisng qt



amit_pansuria
10th April 2007, 12:21
helo i need help regarding USB .
my actuall requirement is
sir there are number of modems and each modem have seperate usb port in it(exacty same as usb port of pc . usb port 2.0).
now i have to develope application on fedora 6 which reads sms and files from usb port of modem and
send it to another modem.
for demo purpose
i want to trasfer data b/w two PCs through usb port.
i mean both pcs are connected via usb-to usb cable(both side of cable is usb male connector)
i want to write application which perform data-trasfer b/w two pcs.
and operating system is fedora 6
but i dont know from where to start writinng application.
my querys are given below
(1) how to use usb port on fedora 6 .i mean whats are the preliminary requiremnts before using usb port on fedora
(2) which cable i have to use to connect both pcs through usb
(3) how to start writing program to send data . i mean is there any hint so that i can explorer my self

i try to search on net but didnot get enough info
bye n good day
amit

jacek
10th April 2007, 12:32
i want to trasfer data b/w two PCs through usb port.
i mean both pcs are connected via usb-to usb cable(both side of cable is usb male connector)
USB 2.0 standard doesn't allow this. There is a "On-The-Go" extension that is meant for mobile devices which introduces mini-AB receptables, but I doubt that a PC will have one.


(1) how to use usb port on fedora 6
Either use libusb or write a kernel module.

http://www.beyondlogic.org/usbnutshell/

amit_pansuria
11th April 2007, 10:20
Sir,
my actually requirement is given below.
there are 30 modems. each has seperate usb 2.0 port
i want to connect 30 usb modems with one server pc through usb port.which is running on fedoara 6 o.s.
my aim is write a application software which reads message from particularusb port of particular modem and send it to anothere modems through usb port of server pc.
now which h/w i have top used to connect usb 2.0 of modem to usb 2.0 of server pc.
and how to write that application . i mean how to configure usb to work under fedora-qt
amit

high_flyer
11th April 2007, 10:36
and how to write that application . i mean how to configure usb to work under fedora-qt
Jacek has answered your question.
You need to read how to program usb devices under linux.
Jacek provided you with good links to start with.
Using it with Qt is not an issue - since Qt will have nothing to do with the hardware.
Or, ask a more specific questions.
"How to write a USB device driver" is a bit out of the scope of this forum, or any forum.
For that there are tutorials, and howto's.
I would start with libusb docs.

jacek
11th April 2007, 12:11
there are 30 modems.
What are these modems exactly? Are these just normal modems you use for dial-up connections? If yes, then actually you don't have to bother with USB --- Linux will handle it for you.