|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Programming for USB ModemDevice manager reports that my USB Modem is using COM 6. For what it is worth the manufacturer has failed over a period of two years to supply example code or methods. The example program "VB.NET How-To: Using the Comm Port" does not dectect COM 6. The Active X control MSComm32.ocx also fails to detect COM 6 with the open=true method. The C++ program from http://www.naughter.com/enumser.html DOES detect the port using three of six methods tried: CreateFile method QueryDosDevice method GetDefaultCommConfig method HOWEVER, I am not familiar enough with C++ to translate the methods used to VB. Can I get a Visual Basic example using showing similar methods to detect and open the port the USB modem is using and allow me to send a series of AT commands to it? -- Don Ford Hi Don,
Download DesktopSerialIO from my homepage and see if it works (it uses CreateFile, etc.). BTW, it is free. The problem with MSComm may be a function of the device driver that was written for the virtual serial port in use. MSComm uses a "fast-open" method that can fail under certain circumstances -- though I wouln't have thought that this was one of them. I've never seen the sort of thing that you are seeing, so I cannot be sure exactly what may be happening. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. See www.hardandsoftware.net for details and contact information. --
Show quote
Hide quote
Don Ford "Dick Grier" wrote:
> Hi Don, > > Download DesktopSerialIO from my homepage and see if it works (it uses > CreateFile, etc.). BTW, it is free. > > The problem with MSComm may be a function of the device driver that was > written for the virtual serial port in use. MSComm uses a "fast-open" > method that can fail under certain circumstances -- though I wouln't have > thought that this was one of them. > > I've never seen the sort of thing that you are seeing, so I cannot be sure > exactly what may be happening. > > Dick > > -- > Richard Grier, MVP > Hard & Software > Author of Visual Basic Programmer's Guide to Serial Communications, Fourth > Edition, > ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. > See www.hardandsoftware.net for details and contact information. > > > Looks like my first reply got trashed!
The DesktopSerialIO program gets an exception at .CommPort = 6 For what it is worth, Phone Dialer and Microsoft Outlook access the modem very nicely. -- Don Ford Hi,
>> For what it is worth, Phone Dialer and Microsoft Outlook access the modemvery nicely << These are TAPI applications (different APIs). You might try downloading the demo version of the new Sax Serial .NET control (www.sax.net). It is TAPI compliant. Let me know what it does. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. See www.hardandsoftware.net for details and contact information. Hi again Dick,
I installed a demo version of Sax CommStudio Fall 2005. The .NET programs in that package (both VB and C#) find Com 1 only; not even as many ports as the other programs find. So... I also upgraded the VS6 modem example to VS2003 and ran that. It finds the modem and retieves the manufacturer name and model correctly. I'll try to trace what it does - but if this information helps to set me straight please feel free to tell me where to start! ;) If nothing else, if we generate material here for Edition 5 I'll gladly buy it! :) Don Ford Show quoteHide quote "Dick Grier" wrote: > These are TAPI applications (different APIs). You might try downloading the > demo version of the new Sax Serial .NET control (www.sax.net). It is TAPI > compliant. Let me know what it does. > > Dick Hi,
>> So... I also upgraded the VS6 modem example to VS2003 and ran that. It findsthe modem and retieves the manufacturer name and model correctly. << Is there anything special (different) about the way the port is specified in the call to CreateFile? That is the only thing that I can think of. If you can post the syntax that is used, it may help. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. See www.hardandsoftware.net for details and contact information. I'll have to work on this on weekends, now that my vacation is over. :(
I'm trying to find a chunk of code in DesktopSerialIO that will let me communicate with the smart modem. I'm also trying to find example code showing TAPI in VB - I found a DLL that will work with VB, tapi3.dll, but the initialize function causes an exception. Either I'm using it incorreclty, or TAPI is simply not going to work with this modem. I also have a third help request in with the manufacturer. Nothing from them yet. -- Show quoteHide quoteDon Ford "Dick Grier" wrote: > Hi Don, > > Download DesktopSerialIO from my homepage and see if it works (it uses > CreateFile, etc.). BTW, it is free. > > The problem with MSComm may be a function of the device driver that was > written for the virtual serial port in use. MSComm uses a "fast-open" > method that can fail under certain circumstances -- though I wouln't have > thought that this was one of them. > > I've never seen the sort of thing that you are seeing, so I cannot be sure > exactly what may be happening. > > Dick > > -- > Richard Grier, MVP > Hard & Software > Author of Visual Basic Programmer's Guide to Serial Communications, Fourth > Edition, > ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. > See www.hardandsoftware.net for details and contact information. > > > Don,
I don't normally suggest this, but if you find out anything, let us know via a new thread. This one is now old enough that I have to search for it. Good luck, Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. See www.hardandsoftware.net for details and contact information.
Check if an object is a type object
Menory compaction Please help with an 'impossible' error! navigation? datagrid and vertical gridline color FTP with SSH Eventhandler Web service - business objects don't show up FS: Visual Basic.NET VB.NET books for sale - CHEAP!!!!!! OnRenderMenuItemBackground question |
|||||||||||||||||||||||