Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
util:svdm [2022/05/28 14:02] – [Configure] Initial AT command set reference digital manutil:svdm [2024/03/25 16:34] (current) – [Configure] Add new options MainLoopDelay and SocketSelectTimeout digital man
Line 1: Line 1:
 ====== Synchronet Virtual DOS Modem ====== ====== Synchronet Virtual DOS Modem ======
-SVDM is a modem emulator for Windows which utilizes the Synchronet Virtual UART/FOSSIL Driver (''DOSXTRN.EXE/SBBSEXEC.DLL'') to enable support for DOS communications programs on Windows NT-based operating systems. 64-bit Windows support is enabled by also installing [[http://www.columbia.edu/~em36/ntvdmx64.html|NTVDMx64]].+SVDM is a MODEM emulator for Windows which utilizes the Synchronet Virtual UART/FOSSIL Driver (''DOSXTRN.EXE/SBBSEXEC.DLL'') to enable support for DOS communications programs on Windows NT-based operating systems. 64-bit Windows support is enabled by also installing [[https://mendelson.org/ntvdmx64.html|NTVDMx64]].
  
 SVDM should run on 32-bit and 64-bit editions of Windows XP and later. SVDM should run on 32-bit and 64-bit editions of Windows XP and later.
Line 6: Line 6:
 Although SVDM reuses components of the Synchronet BBS Software and shares some of its source code and libraries, it is is not technically "part of" Synchronet BBS nor is it required for the normal use or operation of a Synchronet BBS. Although SVDM reuses components of the Synchronet BBS Software and shares some of its source code and libraries, it is is not technically "part of" Synchronet BBS nor is it required for the normal use or operation of a Synchronet BBS.
  
 +You can find the latest "release" of SVDM available for download (as ''svdm??.zip'') at [[http://synchro.net/Synchronet/]].
 ===== Uses ===== ===== Uses =====
   * Use 16-bit DOS terminal programs (e.g. Telix, ProComm, Qmodem, Telemate, etc.) to connect to Internet-connected BBSes   * Use 16-bit DOS terminal programs (e.g. Telix, ProComm, Qmodem, Telemate, etc.) to connect to Internet-connected BBSes
Line 14: Line 15:
 ===== Features =====  ===== Features ===== 
   * Open source (Microsoft Visual C)   * Open source (Microsoft Visual C)
-  * IPv4 and IPv6 support+  * Emulates an NS16550 UART 
 +  * Provides a FOSSIL/PC-BIOS (int14h) software interface 
 +  * IPv4 and IPv6 support (for inbound and outbound connections) 
 +  * Inbound connection filtering based on IP address/range
   * Telnet client and server support   * Telnet client and server support
   * Raw TCP client and server support   * Raw TCP client and server support
 +  * Play optional sound (wave) files upon "ring", connection, and disconnection
   * Accurate Hayes Smartmodem / USRobotics Sportster Modem "AT Command Set" emulation   * Accurate Hayes Smartmodem / USRobotics Sportster Modem "AT Command Set" emulation
      * Complete with virtual NVRAM settings/number storage (i.e. AT&W, AT&Zn=S)      * Complete with virtual NVRAM settings/number storage (i.e. AT&W, AT&Zn=S)
      * Optional auto-answer (ATS0=1)      * Optional auto-answer (ATS0=1)
-     * RING result upon incoming connection attempts+     * RING result upon incoming connections
      * Verbal and numeric result modes      * Verbal and numeric result modes
 +     * Caller ID support (enabled with AT+VCID=1 or AT#CID=1)
      * "Dial" IP addresses or hostnames with optionally-specified TCP port and/or protocol      * "Dial" IP addresses or hostnames with optionally-specified TCP port and/or protocol
  
Line 46: Line 52:
                   [on optionally-specified network interface]                   [on optionally-specified network interface]
         -p<port>  Specify default TCP port number (decimal)         -p<port>  Specify default TCP port number (decimal)
 +        -n<node>  Specify node number
         -d        Enable debug output         -d        Enable debug output
         -h<sock>  Specify socket descriptor/handle to use (decimal)         -h<sock>  Specify socket descriptor/handle to use (decimal)
Line 52: Line 59:
         -V        Display detailed version information and exit         -V        Display detailed version information and exit
 </file> </file>
 +
 +==== Flow Control ====
 +When utilizing UART (COM Port) virtualization (e.g. with most DOS terminal programs and some DOS door programs), be sure to enable RTS/CTS hardware flow control in the DOS program and do **not** enable DTR/DSR or XON/XOFF (software) flow control.
 +
 +==== Ports ====
 +
 +For DOS programs using UART/COM Port I/O, the COM port number (or I/O port and IRQ) must match what SVDM is virtualizing. By default, SVDM virtualizes COM 1 (I/O Port 3F8, IRQ 4), but this can be changed globally or per program via the ''svdm.ini'' file.
 +
 +For DOS programs using the PC-BIOS/FOSSIL int14h interface, all COM ports are supported and treated identically (i.e. the ''DX'' register value is ignored).
 +
 +==== Baud Rates ====
 +
 +The DTE baud rate set by the DOS program is not used by SVDM (i.e. the transmit and receive data rates are only limited by the TCP/IP network). If you wish to artificially limit the receive data rate for some reason (not normally necessary), you can use the ''-r'' command-line option or the "Rate" key in the root section of ''svdm.ini'' to set the maximum receive rate, in characters per second.
 +
 +A DTE rate of 38400 bps is reflected by virtual device driver and if the DOS program attempts to change this value, there is no effect.
 +
 +==== Connect Rates ====
 +
 +For incoming TCP connections, SVDM will report either "CONNECT 9600" or just "CONNECT" (assumed 300 bps) depending on the modem's extended response (''ATX'') setting.
 +
 +==== Bits o' Parity ====
 +
 +The communication data (word) bit width, stop bits, and parity settings used by the DOS program are not used by SVDM. The equivalent of 8 data bits, no parity, and one stop bit, is assumed.
 +
 +==== Disconnect ==== 
 +If the DOS program de-asserts ("drops") DTR, the TCP connection will be terminated (by default). Alternatively, the DOS program can send the escape sequence (by default, "+++", surrounded by a one second guard time of inactivity) to enter command mode and then send "ATH" or "ATH0" to disconnect.
  
 ===== Examples ===== ===== Examples =====
  
-Run Telix:+Run Telix (popular comm program for MS-DOS from the 1980s):
   svdm telix   svdm telix
  
-Run Renegade BBS Software (in WFC mode), listening on all IPv4 network interfaces for incoming TCP connections: +Run Renegade BBS Software (in WFC mode), listening on all network interfaces for incoming TCP connections: 
-  svdm -l -4 renegade+  svdm -l renegade
      
 ===== Dialing ===== ===== Dialing =====
Line 95: Line 128:
   AT&ZL?   AT&ZL?
  
-Save dial strings (numbers) can be dialed by using the ''ATDSn'' command:+Saved dial strings (numbers) can be dialed by using the ''ATDSn'' command:
   ATDS0   ATDS0
  
 If your DOS terminal program of choice has trouble dialing long dial strings (e.g. accommodating long DNS hostnames or IPv6 addresses), try using the saved number storage feature to resolve that limitation. After enter the following command, dialing "S0" as a "phone number" would actually connect to "telnet:vert.synchro.net:23". If your DOS terminal program of choice has trouble dialing long dial strings (e.g. accommodating long DNS hostnames or IPv6 addresses), try using the saved number storage feature to resolve that limitation. After enter the following command, dialing "S0" as a "phone number" would actually connect to "telnet:vert.synchro.net:23".
   AT&Z0=telnet:vert.synchro.net:23   AT&Z0=telnet:vert.synchro.net:23
 +  
 +Another option for dialing longer dial strings is to specify "aliases" in the ''[alias]'' section of your ''svdm.ini'' file. Any combination of printable ASCII characters may be used for a dial string alias, except for the colon ('':'') and equals (''='') characters.
 +<code ini>
 +[alias]
 +vertrauen=telnet:vert.synchro.net:23
 +</code>
 +  ATDvertrauen
  
 ===== Configure ===== ===== Configure =====
Line 108: Line 148:
  
 ^ Section      ^ Key       ^ Default       ^ Description ^ ^ Section      ^ Key       ^ Default       ^ Description ^
-| //Root//     | ''Mode''  | ''Raw''       | Specify the TCP protocol: ''Telnet'' or ''Raw'' |+| //Root//     | ''Mode''  | ''Telnet''    | Specify the TCP protocol: ''Telnet'' or ''Raw'' |
 | //Root//     | ''Port''  | ''23''        | Specify the TCP port number | | //Root//     | ''Port''  | ''23''        | Specify the TCP port number |
 | //Root//     | ''Node''  | ''0''         | Specify the BBS node number | | //Root//     | ''Node''  | ''0''         | Specify the BBS node number |
Line 118: Line 158:
 | //Root//     | ''ServerEcho'' | ''true'' | The server (e.g. BBS) is expected to echo input back to the client (for Telnet option negotiation) | | //Root//     | ''ServerEcho'' | ''true'' | The server (e.g. BBS) is expected to echo input back to the client (for Telnet option negotiation) |
 | //Root//     | ''Rate''  | ''0''         | Limit receive rate to a specific number of //characters-per-second// | | //Root//     | ''Rate''  | ''0''         | Limit receive rate to a specific number of //characters-per-second// |
-| //Root//     | ''AddressFamily'' | ''IPv4'' | Default IP address family: "unspec", "ipv4", or "ipv6" |+| //Root//     | ''AddressFamily'' | ''unspec'' | Default IP address family: "unspec", "ipv4", or "ipv6" |
 | //Root//     | ''BusyNotice''    | hard-coded | Message to send before disconnecting remote connections when already-servicing a remote client/user connection |  | //Root//     | ''BusyNotice''    | hard-coded | Message to send before disconnecting remote connections when already-servicing a remote client/user connection | 
 +| //Root//     | ''AnswerBanner''  | hard-coded | Message to display upon incoming connections, blank to disable |
 +| //Root//     | ''RingSound''     | //blank//  | Wave file to play upon incoming "ring" |
 +| //Root//     | ''ConnectSound''  | //blank//  | Wave file to play upon connection |
 +| //Root//     | ''DisconnectSound'' | //blank//  | Wave file to play upon disconnection |
 +| //Root//     | ''IpFilterFile''  | //blank//  | Path/filename of file containing lists of IP addresses/patterns/ranges to reject incoming connections from |
 +| //Root//     | ''clientFile''    | ''client.ini'' | File to write incoming connected client information (e.g. IP address), blank to disable |
 +| //Root//     | ''MainLoopDelay''       | ''0'' | Milliseconds to yield CPU in application main loop |
 +| //Root//     | ''SocketSelectTimeout'' | ''0'' | Milliseconds to wait for receive data on TCP socket |
 | ''Modem''    | ''AutoAnswer''    | ''false''  | Automatically answer/accept incoming TCP-connection attempts (''ATS0'') | | ''Modem''    | ''AutoAnswer''    | ''false''  | Automatically answer/accept incoming TCP-connection attempts (''ATS0'') |
 +| ''Modem''    | ''CallerID''      | ''false''  | Incoming/client IP address reporting between RING results (''AT+VCID'' or ''AT#CID'') |
 | ''Modem''    | ''Echo''          | ''true''   | Send AT command characters back to terminal (''ATE'') | | ''Modem''    | ''Echo''          | ''true''   | Send AT command characters back to terminal (''ATE'') |
 | ''Modem''    | ''Quiet''         | ''false''  | Respond to AT commands (''ATQ'') | | ''Modem''    | ''Quiet''         | ''false''  | Respond to AT commands (''ATQ'') |
Line 135: Line 184:
 | ''UART''     | ''IRQ''           | //depends// | Hardware interrupt request (IRQ) line to virtualize, e.g. 4 | | ''UART''     | ''IRQ''           | //depends// | Hardware interrupt request (IRQ) line to virtualize, e.g. 4 |
 | ''UART''     | ''Address''       | //depends// | Hardware I/O port base address (use ''0x'' prefix for hexadecimal notation, e.g. ''0x3f8'') | | ''UART''     | ''Address''       | //depends// | Hardware I/O port base address (use ''0x'' prefix for hexadecimal notation, e.g. ''0x3f8'') |
 +| ''alias''    | various                      | Each key is a unique dial string alias (e.g. ''mybbs = protocol:address:port'') |
 | ''sockopts'' | various                      | See ''[[config:sockopts.ini]]'' | | ''sockopts'' | various                      | See ''[[config:sockopts.ini]]'' |
  
-Settings changed via modem AT command take precedence over command-line options which take precedence over .ini file settings.+Settings changed via modem AT command take precedence over command-line options which take precedence over ''.ini'' file settings.
  
 Settings in the //Root// section may also be specified in a program-specific section (named after the program itself), to create program-specific settings. Settings in the //Root// section may also be specified in a program-specific section (named after the program itself), to create program-specific settings.
Line 151: Line 201:
  
 SVDM will recognize and respond to modem commands only when in "command mode". SVDM will recognize and respond to modem commands only when in "command mode".
 +
 +When there is no active connection, "command mode" is the current mode. When there is an active connection, the terminal can force the modem into command mode by sending the Hayes-302 escape sequence (by default, "+++") with the minimum guard time of inactivity before and after the escape sequence. The duration of the guard time (default of one second) and the character repeated 3 times for the escape sequence are configurable via modem S-registers.
  
 Modem commands are prefixed by "AT" (case-insensitively), which stands for "attention", hence the name "AT Command". Modem commands are prefixed by "AT" (case-insensitively), which stands for "attention", hence the name "AT Command".
  
-After the initial "AT" is sent to the modem, zero or more commands may be specified, followed by a final carriage-return (CR) character.+After the initial "AT" is sent to the modem, zero or more commands may be specified, followed by a final carriage-return (CR) character. The ASCII values of the carriage-return and line-feed characters are configurable via modem S-registers. The backspace character (configurable via S-register) is recognized as a destructive edit command to modify a command sequence before the command is submitted (usually with the ENTER key).
  
 If all of the commands are valid, then the modem will respond with the "OK" response (or ''0'' in numeric response mode). There are exceptions (e.g. ''D'' command). If all of the commands are valid, then the modem will respond with the "OK" response (or ''0'' in numeric response mode). There are exceptions (e.g. ''D'' command).
Line 166: Line 218:
 ^ Command ^ Description ^ ^ Command ^ Description ^
 | ''A''   | Answer an incoming call (accept an incoming TCP connection) | | ''A''   | Answer an incoming call (accept an incoming TCP connection) |
-| ''Ds''  | Dial a number string (connect to TCP host) |+| ''D[T|P]s'' | Dial a number string (connect to the specified TCP host) |
 | ''En''  | Set command echo (e.g. ''ATE0'' to disable command echo) | | ''En''  | Set command echo (e.g. ''ATE0'' to disable command echo) |
 | ''Hn''  | Control ON/OFF hook (e.g. ''ATH0'' to hang-up) | | ''Hn''  | Control ON/OFF hook (e.g. ''ATH0'' to hang-up) |
 | ''In''  | Display modem information | | ''In''  | Display modem information |
-| ''O''   Returns online (from command mode) | +| ''Ln''  | Control speaker volume (ignored) | 
-| ''Qn''  | Display/suppress result code (e.g. ''ATQ1'' enables //quiet mode//) | +| ''Mn''  | Enable speaker (e.g. ''ATM1'' enables wave file playback) | 
-| ''Sr=n''Sets register //r// to //n//. |+| ''O''   Return online (from command mode) | 
 +| ''Qn''  | Display/suppress result codes (e.g. ''ATQ1'' enables //quiet mode//) | 
 +| ''P''   | Pulse mode dialing (ignored) | 
 +| ''Sr=n''Set register //r// to //n//. |
 | ''Sr?'' | Display value of S-Register //r//. | | ''Sr?'' | Display value of S-Register //r//. |
 +| ''T''   | Tone mode dialing (ignored) |
 | ''Vn''  | Control verbal result codes (e.g. ''ATV0'' enables //numeric// result mode) | | ''Vn''  | Control verbal result codes (e.g. ''ATV0'' enables //numeric// result mode) |
 | ''Xn''  | Control extended result codes (e.g. ''ATX0'' disables extended result codes) | | ''Xn''  | Control extended result codes (e.g. ''ATX0'' disables extended result codes) |
 +| ''Z''   | Initialize/re-initialize modem (e.g. re-read ''.ini'' file) |
 +| ''&W''  | Write modem settings to ''.ini'' file |
 +| ''&Zn=s'' | Store a dial string //s// into slot //n// (0-19) |
 +| ''&Zn=L'' | Store last-dialed string into slot //n// (0-19) |
 +| ''&Zn?''  | Display saved dial string from slot //n// |
 +| ''&ZL?''  | Display last dialed string |
 +| ''+VCID=n'' | Control Caller ID reporting (alias: ''#CID='') |
 +| ''+VCID?'' | Query Caller ID enabled status (alias: ''#CID?'') |
  
 +S-Registers store additional/advanced modem settings as decimal-numeric values:
  
 +^ S-Register ^ Default ^ Description ^
 +| 0          | 0       | Auto-answer after this number of rings |
 +| 1          | 0       | Counts number of phone rings |
 +| 2          | 43      | ASCII value of escape code character (128-255 to disable) |
 +| 3          | 13      | ASCII value of carriage-return character |
 +| 4          | 10      | ASCII value of line-feed character |
 +| 5          | 8       | ASCII value of backspace character |
 +| 7          | 60      | Number of seconds to wait for carrier (TCP connection success) |
 +| 12         | 50      | Guard time duration (in 20 millisecond units) |
 + 
 ===== See Also ===== ===== See Also =====
   * [[:util:|Utility index]]   * [[:util:|Utility index]]