Programming the USB Port
I am interested in learning how to read and write to the USB port on my computer. Specifically, I want to read in some position info from a GPS. I can already do this using a serial port, however my application will required that I use the USB port. If anyone could offer me some sample code or direct me to a "useful site" I would certainly appreciate it.
Also has some USB stuff as well.
:( Every USB device & driver are different...
As far as I know there is no standard way to communicate with a GPS device.
In general, the USB device manufacturer writes both the device firmware and the driver. Only these two "programs" know what to do with the data that travels over the bus. (i.e. You can't use an HP printer with an Epson printer... In fact, the programmers at HP don't know how to write a driver for an Epson printer.)
If the USB device is a common device (like a printer) then Microsoft specifies a standardized way for Windows to communicate with the driver. You can write a word processing program without worrying about the driver or hardware... In fact, the word processing program doesn't care if you use a parallel, USB, or Network printer. The driver (written by the hardware manufacturer) translates between the Windows standard requirements and the proprietary hardware requirements.
If it's a specialty USB device, then there are two choices. The hardware manufacturer can write the application, or he can provide a SDK (Software Development Kit). That's what we do where I work... But, we dont' make GPS devices. If you can get an SDK and/or library from the manufacturer, then you're cool! :) If the manufacturer doesn't provide any information on how to communicate with the device, you are probably out of luck. :(