From: TomChapman on 31 Mar 2010 11:10 Many of my programs communicate with equipment using serial COM port interfaces or network TCP interfaces. In the near future I will need to communicate with a new piece of equipment that uses a USB interface. I don't know any specifics yet. I don't know if there is a SDK for this piece of equipment. How do I communicate with USB? Is there a library or a book anyone can recommend? Any comments would be appreciated.
From: David Ching on 31 Mar 2010 11:50 "TomChapman" <TomChapman12(a)gmail.com> wrote in message news:#pO7cUO0KHA.3708(a)TK2MSFTNGP02.phx.gbl... > Many of my programs communicate with equipment using serial COM port > interfaces or network TCP interfaces. > > In the near future I will need to communicate with a new piece of > equipment that uses a USB interface. I don't know any specifics yet. I > don't know if there is a SDK for this piece of equipment. > > How do I communicate with USB? Is there a library or a book anyone can > recommend? Any comments would be appreciated. USB is quite complex compared to serial port and TCP due to the many transfer modes (synchronous, asynchronous, isochronous) and Human Interface Device (HID) profiles which vary according to the type of device you are communicating with. I believe the programming interface is through HID, so you may want to start there. That's all I know about it. -- David
From: RFOG on 31 Mar 2010 14:32 Sometimes those devices use a virtual COM, that is, a driver that converts a USB port to a RS232 port and then it is used as one normal serial port. Others that uses direct USB stuff, as David has said, normally offers a DLL or a more easy way to work with. However each mfr. uses his own approach. Some offers a DLL, some patches normal windows CreateFile/ReadFile/WriteFile. But most common is use a DLL or a USB-to-Serial driver. On Wed, 31 Mar 2010 18:10:01 +0300, TomChapman <TomChapman12(a)gmail.com> wrote: > Many of my programs communicate with equipment using serial COM port > interfaces or network TCP interfaces. > > In the near future I will need to communicate with a new piece of > equipment that uses a USB interface. I don't know any specifics yet. I > don't know if there is a SDK for this piece of equipment. > > How do I communicate with USB? Is there a library or a book anyone can > recommend? Any comments would be appreciated. -- Microsoft Visual C++ MVP => http://geeks.ms/blogs/rfog ======================================== No hay nada como la libertad, excepto una ca�a de cerveza un d�a de calor. -- Groucho Marx --
From: Joseph M. Newcomer on 2 Apr 2010 13:43 You have not actually said what you mean by "USB interface". For example, if the device comes with a USB cable to connected it, it MUST have a WIndows driver that connects to that device. In which case, you will know the device name to open and you will open that device and use ReadFile and WriteFile to talk to it, in accordance with the interface specs. If you are working for the company that produces the equipment, be aware that they will have to write a Device Driver tha communicates to this device. This can be done as a kernel-mode driver using KMDF, or a user-mode driver using UMDF, but the important part here is that it must be design and written, which means if they have not already started this, it ain't gonna happen in the "near future" for any conventional interpretation of "near". Otherwise, the device will come with a programming manual that describes how to talk to it. The fact that the communication to the device takes place over USB is completely irrelevant to you, the application programmer. And if it doesn't come with a device driver, they have not delivered a "product", but what we traditionally call a "paperweight". I know a few device driver programmers who are USB experts (I don't count myself among them) if you need assistance. joe On Wed, 31 Mar 2010 10:10:01 -0500, TomChapman <TomChapman12(a)gmail.com> wrote: >Many of my programs communicate with equipment using serial COM port >interfaces or network TCP interfaces. > >In the near future I will need to communicate with a new piece of >equipment that uses a USB interface. I don't know any specifics yet. I >don't know if there is a SDK for this piece of equipment. > >How do I communicate with USB? Is there a library or a book anyone can >recommend? Any comments would be appreciated. Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Joseph M. Newcomer on 2 Apr 2010 13:47 It is a common misconcpetion that a simple DLL will supply the necessary connectivity to a USB device. This is not true. Only a device driver (kernel or user mode) will work, and these are complex beasts that require extremely careful design and implementation. No "patches" to Windows are required. and "a DLL" won't do the job! joe On Wed, 31 Mar 2010 21:32:30 +0300, RFOG <no(a)mail.com> wrote: >Sometimes those devices use a virtual COM, that is, a driver that converts >a USB port to a RS232 port and then it is used as one normal serial port. >Others that uses direct USB stuff, as David has said, normally offers a >DLL or a more easy way to work with. However each mfr. uses his own >approach. Some offers a DLL, some patches normal windows >CreateFile/ReadFile/WriteFile. But most common is use a DLL or a >USB-to-Serial driver. > >On Wed, 31 Mar 2010 18:10:01 +0300, TomChapman <TomChapman12(a)gmail.com> >wrote: > >> Many of my programs communicate with equipment using serial COM port >> interfaces or network TCP interfaces. >> >> In the near future I will need to communicate with a new piece of >> equipment that uses a USB interface. I don't know any specifics yet. I >> don't know if there is a SDK for this piece of equipment. >> >> How do I communicate with USB? Is there a library or a book anyone can >> recommend? Any comments would be appreciated. Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
|
Next
|
Last
Pages: 1 2 3 Prev: How To: CStatubar panel Right-align text Next: MFC app - add multithreading? |