MachTen Modem Configuration

Correct configuration of a MachTen modem is important. Mis-configuration is not always apparent in a hard failure. Mis-configuration can result in intermittent operation or what appears to be "slow" operation.

This section contains a description of common modem commands that can be issued from a connected MachTen system to view and change a modem configuration.

Most modems are controlled by character-based commands from MachTen that configure and direct a modems operations. These modems are based on a loose industry standard call the Hayes command set. The Hayes command set is named after the Hayes modem, one of the first widely available modems, and the commands that were used to configure the Hayes family of modems. Here we are going to discuss a subset of the Hayes "standard" which is directly applicable to MachTen configuration. Other commands for any specific modem are usually found in a manual that is shipped with the modem and should be consulted to verify the information presented
here before applying a specific set of changes.

In the Hayes standard, all configuration requests start with the string:


which specifies multiple <cmd> strings with no intervening spaces terminated by the <ret> return key.

A modem typically will not echo characters until it "thinks" it is in command mode having seen an "at" string. A modem will respond with "OK" or "ERROR" if it successfully processes a request or finds an error in the request.

Connecting to a Modem with TIP

To issue modem commands you must first establish communications between MachTen and the modem. The simplest MachTen method to do this is to use the "tip" command:

tip ttya


tip ttyb

The ttya parameter is used to contact a modem connected to a Macintosh modem port. The ttyb parameter is used to contact a modem connected to a Macintosh printer port. Baud rates, serial interface device files and other configuration parameters are contained in the ttya and ttyb entries of the /etc/remote file. See the tip reference for more information. If tip is successful in opening and configuring the serial device interface file it prints "connected". At this point any other characters typed on the console are directed to the attached modem. To quit the tip application type:


which should return to the MachTen command prompt.

Viewing Modem Configuration

Once communications between a modem and MachTen have been established, the command:


will cause Hayes type modems to print their existing and stored configurations. Below is a tip session with a SupraFax 28.8 modem and it's configuration information:

root@ppc0# tip ttya
B1 E1 L2 M1 N1 Q0 T V1 W0 X4 Y0 %C3 %E0 %G1 -K0 &C1 &D0 &K3 &Q5 &R1 &S0 &X0 &Y0
S00:000 S01:000 S02:043 S03:013 S04:010 S05:008 S06:002 S07:050 S08:002 S09:012
S10:014 S11:095 S12:050 S18:000 S23:058 S25:005 S26:001 S36:007 S37:000 S38:020
S40:104 S41:131 S44:131 S46:138 S48:007 S91:012 S95:000 S109:062 S110:014

B1 E1 L2 M1 N1 Q0 T V1 W0 X4 Y0 %C3 %E0 %G1 -K0 &C1 &D0 &K3 &Q5 &R1 &S0 &X0
S00:000 S02:043 S06:002 S07:050 S08:002 S09:012 S10:014 S11:095 S12:050 S18:000
S23:062 S25:005 S26:001 S36:007 S37:000 S40:104 S41:131 S46:138 S95:000

B1 E1 L2 M1 N1 Q0 T V1 W0 X4 Y0 %C3 %E0 %G1 -K0 &C1 &D0 &K3 &Q5 &R1 &S0 &X0
S00:000 S02:043 S06:002 S07:050 S08:002 S09:012 S10:014 S11:095 S12:050 S18:000
S23:054 S25:005 S26:001 S36:007 S37:000 S40:104 S41:131 S46:138 S95:000

0= 1=
2= 3=


The command tip ttya was typed, the system responded with connected. The command at&v was typed, the modem responded with lots of PROFILE information. The command string <ret>~.<ret> was typed and the tip command quit returning to the MachTen prompt root@ppc0#.

In Hayes type configurations, there are actually three configurations, the ACTIVE PROFILE, STORED PROFILE 0 and STORED PROFILE 1. The ACTIVE PROFILE is the modem configuration that is currently in use. PROFILE 0 and PROFILE 1 are configurations that are stored in non-volatile modem memory so they are available when a modem is turned on.

Modifying an Active Profile

The command strings of letters and numbers listed in the ACTIVE PROFILE contain modem configuration information. Each string refers to some form of configuration for the modem. The modem reference manual should be consulted for specific meanings for each of the strings. There are two basic classes of modem configuration string, Letter-Number configurations and S-Location:Value configurations. Letter-Number configurations such as B1, Q0, %C3, &D0 or &C0 are most common. To modify a Letter-Number configuration the command:


will change the &C configuration to &C1. Note that the Letter-Number commands are not consistant in structure in that sometime &D0, &D1 and &D2 may all appear in a configuration. Other Letter-Number commands superceed one another (e.g. &C0 or &C1).

To modify an S-Location:Value configuration the command takes the form s<digit>=<value>. This command modifies the s0 location to a value of 1:


Multiple commands may be put together on the same command line:


recalls factory configuration one, then modifies the &d, &c, &k and s2 settings for that configuration.

Remember that all of these changes are only being made to the ACTIVE PROFILE and will be erased when the modem is powered down or when other commands are issued to the modem.

Permanently Modifying a Modem Profile

A modem configuration can be permanently modified by writing the active configuration to to one or the other of the stored profiles with the at&w0 or at&w1 commands. This should be done carefully in that it will overwrite the existing STORED CONFIGURATION.

Loading Active Profile

The ACTIVE PROFILE can be loaded from either of the STORED CONFIGURATIONS during modem power up with the at&y0 and at&y1 commands. The command at&y0 loads STORED CONFIGURATION 0 and at&y1 loads STORED CONFIGURATION 1.

Important MachTen Hayes Commands

There are three configuration settings that are important to set properly for MachTen operation: the &D0, &C0 and &K3. It is important to reiterate that these configuration settings are based on the Hayes command set. There is a wide variance in modems and the configuration commands necessary to set a modem into a particular configuration. These commands should be checked with every modem purchased by examining the modem reference manual and verifying that the configuration commands presented here actually do perform the kind of configuration that is described below.

The &D0 setting, ignore DTR, is essential for correct MachTen operantion. If this command is mis-configured, a modem will appear to operate correctly but during heavy data transfer may reset or go into command mode. The &D0 command superceeds the &D1, &D2 and &D3 commands. The &D1 configuration is uses DTR on-off: enter command mode. The &D2 configuration disconnects, enters command mode and disables Auto answer when DTR is off. The &D3 configuration performs a modem soft reset during ON-to-OFF DTR transition.

The &C0 setting, DCD on, is not essential but recommended for MachTen. In most cases the DCD output is not connected to MachTen due to a missing signal in the Macintosh-to-modem cable. However, the alternative configurations &C1 and &C2 cause MachTen to reset its side of the connection if the modem is mis-configured. The &C1 configuration command has DCD follow the remote carrier. In some modems in the &C1 configuration, DCD is actually "flashed" on and off during a process called retraining. This means that if the line quality diminishes both modems involved in a connection will go into "retrain" mode changing the parameters of their analog to digital signalling for better opreation. MachTen simply expects DCD to be on while the modem is connected to a remote modem and then off when the connection is terminated. Flashing transitions on DCD will cause MachTen treat the connection as if the phone connection has been broken. The &C2 configuration is acceptable for MachTen operation. It is defined as: DCD ON except during disconnect. As long as there is a signal in the cable carrying DCD to Macintosh CGi input (pin 7) this should work with MachTen systems.

The &K3 configuration setting is used to turn on modem-originated, hardware (RTS/CTS) flow control. This means that the modem will use the RTS and CTS modem signals to enable and disable the reception and transmission of data from MachTen. Other configuration settings disable flow control completely or use special characters (XON and XOFF characters) to stop and start data flow. This setting is very important to verify for modems that operate at 14.4K bits-per-second or faster. This setting is also one that varies widely from modem to modem. The command &K3 is used from SupraFax and Practical Peripheral modems. The &K3 command produces and error with some Motorola modems. Motorola modems require the use of the \Q3 - enable bi-lateral RTS/CTS Flow Control command to enable hardware flow control.

To set these commands properly with a modem the Hayes command string:


should cause the correct modem reconfiguration.

The S2 command contains the escape character used to interrupt a modem data transfer and return a modem to command mode. In practice, it is very diffcult to send an escape sequence to a modem with the proper timing and sequence of three escape characters in a row to inappropriately turn on a modem command mode. However, Tenon recommends disabling the modem escape sequence with the following S2 command:


Setting the S2 value to 128 disables the escape sequence monitoring and offers no opportunity for accidental modem return to command mode.

Modem Configuration for a PPP Client

Using an MachTen modem combination for PPP client operations requires that a modem be configured with at least two of the four modem configuration settings:


The &K3 configuration should be confirmed by reviewing the reference manual that is available with the attached modem. If &K3 is a valid option to support RTS/CTS hardware flow control, it should be added to the command above:


Finally, with experimentation is may be possible to add the S2 command to the command sequence above:


is as complete a change to the modem that should be necessary for MachTen PPP client operations. Once a successful string has been applied to the modem with tip, the string may be incorporated into normal PPP operations by replacing the string:


in the /etc/pppclient script with the new extended string. Subsequent execution of /etc/pppclient will cause the new configuration string to be applied to the modem at every execution.

Modem Configuration for a PPP Server

The three or four commands are necessary using a modem as PPP client and a PPP server. To use MachTen and a modem for PPP server operations, the modem must be configured for dial-in access. To do this three commands are added to the command string above: the Q2, E0 and S0 commands.

The Q2 command is sets result code reporting configuration within the modem. Q2 specifies that result codes will be given by a modem when it is originating a connection, but will be disabled when answering a phone call.

The E0 configuration command specifies that echoing of input from MachTen in command mode will be disabled. In this mode, even if a modem is in command mode and interpreting character requests, it will not echo those characters to the MachTen system.

The S0=1 configuration command is used to enable Auto Answer mode to answer a ringing phone line after the first ring.

The combination of the above three commands and the previous commands provide for a string that will support MachTen PPP server dial-in operations:


After issueing this command string a modem will be prepared to receive phone calls, echo and hardware flow control correctly for MachTen PPP server oprations.

Unlike the /etc/pppclient script the /etc/pppserver script does not have an opportunity to set modem configuration as a part of it's opeation. Instead the modem must be configured as part of it's default power up configuration to power up in this mode. The string:


write the modified factory configuration 1 to STORED CONFIGURATION 0. The second &Y0 command specifies that STORED CONFIGURATION 0 be used as the default during modem power up. After writing this string to a modem, the modem should power up with an ACTIVE CONFIGURATION that is ready for MachTen PPP server operations.

| Tenon Home | Products | Order | Contact Us | About Tenon | Register | Tech Support | Resources | Press Room | Mailing Lists |

Powered By iTools

Copyright©2009 Tenon Intersystems, 232 Anacapa Street, Santa Barbara, CA 93101. All rights reserved.
Questions about our website - Contact: