Home |
Last modified: 16-06-2020 |
Note: The help file is C:\WINNT\Help\SaxComm8.chm
Here's how to open a COM port, send an AT command, and wait for an answer:
Note: Once the modem is installed in Windows (ie. it shows in the Modem section of Control Panel), you can use the following command to have Sax use the default modem through TAPI, so you don't have to specify settings, including the COM port:
An alternative way to send a command and wait for an answer that ends with a carriage return, ie. if the modem returns several strings each ending with CRLF, only the first string will be returned:
Here's how to send a command, and wait until a given string is returned or a time-out occurs:
Sax can be either added to a form, or created as an early- or late-binding object. Here's the early binding way:
Add "Dim WithEvents" if you want to catch events.
Here's the late-binding way:
Here's how to catch the characters in the input buffer, one by one:
Here's how to feed the list of modems to a combo:
Here's how to connect out using the default modem installed in Windows, navigate through the menus of a ProWin BBS, and download a file in Zmodem (the form has two pushbuttons, one to connect, one to close the port and close the application, and two textboxes, one for the phone number of the BBS, and one for the file(s) to download):
Determining if more characters are coming
Doesn't work through HyperTerminal either. Looks like you can't access a modem in non-TAPI mode once it's installed in Device Manager.
The following table shows the version of TAPI shipped with each Windows operating system. (Recent releases, service packs, or updates may not appear on this table.)
Windows OS | Installation Default | Maximum Version Upgrade |
Windows 95 | 1.4 | 2.2 |
Windows 98 | 2.0 | 2.2 |
Windows ME | 2.2 | 2.2 |
Windows NT 4 | 2.2 *SP5 | 2.2 |
Windows 2000 | 3.0 | 3.3 |
Windows XP | 3.3 | 3.3 |
The major TAPI function additions are:
TAPI Version | Additional Features |
1.4 | Base version for 32 bit Windows |
2.0 | Full 32 bit support, support for Unicode - Little effect on TAPI applications |
2.1 | Major addition of Client/Server functionality |
2.2 | Specialized call center management added |
3.0 | COM based API, Media Stream Providers added. 2.1 TSP's can still be used |
Microsoft Telephony Programming Model
TAPI telephony services are divided into Assisted Telephony services and the services provided by the full Telephony API. In general, the full Telephony API is used to implement powerful telephonic applications, and Assisted Telephony is used to add minimal but useful telephonic functionality to non-telephony applications.
TAPI and telephony (article on Allen-Martin site)
Here are some tools you can use to access the modem instead of using either the bare-bone MSComm ActiveX control that ships with VB, or the Win32 API:
Tapi & Zmodem/Ymodem/Xmodem etc Protocols
TAPI itself only deals with placing/answering and otherwise manipulating a call (putting it on hold, transferring, conferencing, etc). TAPI itself does not provide any file transfer or other capabilities. To deal with a voice call you use the wave API, and for a data call like what you need you use the ReadFile/WriteFile to transfer data over the data connection.
Modems can used to make two different kinds of connections. The first is a raw data connection. This raw data connection can then be used for the ZModem protocol. The second type is that Dial-Up Networking (DUN) can use a modem to connect to a TCP/IP Network. This network it connects to could be the Internet, or it could be a computer running Dial-Up Server. You can use TAPI to make a raw data connection, so you can use ZModem. You can use the RAS (Remote Access Services) API to make a DUN connection, so you can use FTP.
I'd suggest browsing through http://www.phonezone.com and looking at the various custom controls that are available. There are plenty of development tools available, including Visual Voice, Visual Fax, VBVoice, Fax Plus, to name a few.
Are you running on NT 2000 beta? If not then you are out of luck, TAPI 3.0 is only supported on that platform. You could of course use TAPI 2.1 but there is no COM interface available, only a traditional API.
There are two ways to make calls with TAPI, the assisted TAPI and full TAPI.
Assisted TAPI is a simple option where your application uses a single function (tapiRequestMakeCall) which uses the defined Windows Dialer (typically the MS Phone dialer.)
Full TAPI is a whole lot more complicated and requires your application to initialize TAPI, select one or more TAPI lines, open those lines, make call on the line(s) and monitor and control the calls.
There are two versions of the TAPI interface. A C function interface (version 2.x) and a COM interface (version 3.x.) Using the C interface from VB is challenging due to various aspects like variable length data and asynchronous events. Therefore, you may want to look at the COM interface. In addition, you may want to look at third party interfaces which use the 2.x interface but are easier to use from VB. If you wish to use the COM (ActiveX) component object model programming interface then you will need to use Windows XP and TAPI 3.1 It not only allows capturing digits, but allows many other features that aren't present with 3.0.
Get the TAPI Browser test application provided by MS (one for TAPI 3.x and one for 2.x.)
TAPI 3.0 is available on W2k, XP and WS2k3 out of the box. TAPI 3.1 is available on XP and WS2k3 out of the box.
TSP : The term "service provider" is nothing more than a fancy name for a driver. A TAPI service provider (TSP) is a driver that allows TAPI applications to communicate with different types of TAPI hardware.
UnimodemV : Windows 95 and NT come with a built in TSP called Unimodem. Unimodem is a "universal" modem service provider that supports a wide range of commonly used modems. When using telephony hardware other than modems, such as PBX's, voice processing cards, etc. you will typically use a TSP provided by the hardware vendor.
The universal modem driver (Unimodem) provides services for data, fax, and voice modems so that users and program developers will not have to learn or maintain modem AT commands to dial, answer, and configure modems. Unimodem performs these tasks by using files that specify the AT command sets and expected responses for modems. These files usually have an .inf extension. Modem support is provided by the TAPI Unimodem 5 Service Provider in Windows 2000. It enables you to install and use almost any modem available today.
Voice modems are not supported under Windows NT4. Windows NT 4.0 does not support generic UniModem/V voice drivers.
The Unimodem, or Universal Modem Driver, TSP (Unimdm.tsp) provides access to nearly all standard modems. It supports voice modems that allow half-duplex streaming. They are supported by the Wave MSP and stream control is possible. (Note that Unimodem on Windows NT 4.0 or earlier does not support voice modems, so direct stream control is not possible.)
Microsoft wrote a TSP called unimodem (a universal modem driver) and later a voice capable version unimodemV. Unimodem and UnimodemV are configurable with an inf file during modem installation but because Unimodem was designed to work with any modem it has severe limitations.
Because Microsoft wrote this universal modem driver most manufacturers take the easy way out and use it, configure it with an inf file and suffer the inherent limitations of Unimodem rather than writing their own TSP that would be able to use all of the capabilities of their hardware.
A further problem is that Microsoft did not supply a voice enabled version of unimodem for Win NT, meaning that voice modems will not support TAPI under NT4. Most modem manufacturers supply voice software with the modem that does not use TAPI and has been configured specifically for their modems command set and capabilities. So you will find voice capable applications using voice modems, running under NT4, but not via TAPI. Fortunately Microsoft have provided a voice enabled TSP for Windows 2000 called unimodem 5.
MS's Telephony control, the ones that come with the speech sdk.
In addition, you will need hardware that can do what you want. Most hardware can't detect distinctive rings, at least not inexpensive hardware. :) Probably your best bet is the Way2Call Hi-Phone, it supports distinctive ring and is under $350.
example from microsoft (vboutgoingcall)
http://www.microsoft.com/whdc/hwdev/tech/network/modem/default.mspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/tapitspimspi.asp
Some DOS TCP/IP stacks that seem popular:
* Crynwr Software (only for Ethernet connections, not dial-up?)
* LSPPP and DOS PPP (both ported from the Linux PPPD driver)
* WATTCP and Watt32 (unofficial page)
* KLOS PPP (shareware; very robust)
* "Net-Tamer is a DOS PPP dial up access program, which requires no TSR packet driver. [..] Can be used to
replace the complete suite. Has an excellent Web browser. Includes its own TCP/IP stack"
* Device Logics' TCP/IP Stack ($20 Single User)
PC/TCP Packet Driver Specification
DOS Networking HOWTO
Communications Programs For DOS
HTGET
DOS TCP/IP connectivity from scratch
How do I run DOS TCP/IP or packet-driver apps in DOS sessions?
http://users.pandora.be/mydotcom/download/dostcpip/
http://www.fdisk.com/doslynx/bobcat.htm
http://www.qsl.net/ve3lgs/index.html#b386
http://www.ncf.ca/~ag221/dosppp.html
http://www.ncf.ca/~ag221/resource.html
http://www.ncf.ca/ip/freeplace/ppp/dos/pktdrvr.txt
http://www.sewelld.com/FastLynx.asp
http://www.simtel.net/category.php?id=223
http://www.simtel.net/product.php?id=47331&cid=223&SiteID=simtel.net
http://www.simtel.net/product.php?id=55044&cid=223&SiteID=simtel.net
http://www.simtel.net/product.php?id=48897&cid=223&SiteID=simtel.net
http://www.simtel.net/product.php?id=48886&cid=223&SiteID=simtel.net
http://www.simtel.net/product.php?id=25392
http://www.crynwr.com/drivers/
http://www.tropinet.com/ppp.html
DOS APPLICATIONS FOR INTERNET USE Compiled by Michael Bernardi
NET: Phil Karn's KA9Q for Demon Internet
http://www.powerbasic.com/files/pub/pbdos/telecom/
http://www.aspectscripting.com/
http://groups.google.com/groups?q=windows+registry+modem+com+port&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=384C72E5.75F5DC29%40rivernet.com.au&rnum=9
http://groups.google.com/groups?q=windows+registry+modem+com+port&start=20&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=T3lV6.12165%24m17.260294%40news2.nokia.com&rnum=29
http://groups.google.com/groups?q=windows+registry+modem+com+port&start=90&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=734d0acf.0209140859.4a2689fc%40posting.google.com&rnum=94
http://groups.google.com/groups?q=windows+registry+modem+com+port&start=100&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=35147FA5.FE4137C8%40NOSPAM.mosquitonet.com&rnum=108