AIX Tip of the Week

AIX Tip of the Week: Customizing Modems in AIX with Hayes Commands

Audience: AIX Administrators

Date: June 11, 1999

Modem settings often need to be customized using Hayes commands. The following tip demonstrates one method of sending Hayes commands to a modem in AIX. In this example, we assume we want to enable a dial-in line on tty0.

Step 1: Configure tty0 via "smit mktty". Set "Enable Login" to "enable". Set the remaining parameters as appropriate.

Step 2: Define tty0 to UUCP by adding the following line to the /etc/uucp/Devices file. UUCP is part of the base AIX operating system, which may or may not be installed by default depending on AIX level. Note the characters are case sensitive.

	Direct tty0 - 9600 direct	

Step 3: Disable the port to allow Hayes commands to be sent to the modem: pdisable tty0.

Step 4: Send Hayes commands using the "cu" command. The "cu" command starts an interactive session with the modem. In this case, the Hayes command tells the modem to autoanswer after one ring. The session is terminated with a "tilde" followed by a "period".

	cu -ml tty0

Step 5: Enable the tty0 port: penable tty0