================ = INTRODUCTION = ================ The Commodore 1670 Modem is a compact, powerful computer device that lets you communicate instantly with other computers over ordinary telephone lines. Your Commodore 1670 Modem gives you direct access to the wide range of information available on many information services, both national and local. You can play games against distant opponents, obtain the latest stock quotes and news, check airline schedules, send and receive mail electronically -- and much, much more. With appropriate software, you can also take advantage of the auto-answer feature of the 1670 Modem and turn your Commodore computer into an electronic "bulletin board" system. WHAT A MODEM DOES ================= Telecommunication consists of electrical signals sent from your computer to another computer via the phone lines. The type of electrical signal your computer generates cannot be sent directly over phone lines. Your 1670 Modem acts as a translating device. It translates (modulates) outgoing computer signals into signals the phone lines can transmit. The receiving modem retranslates (demodulates) the incoming signal into a signal your computer can use. The term modem was created by combining the first parts of the words MOdulator/DEModulator. Your 1670 Modem is an "intelligent modem". This means it contains its own microprocessor to oversee the telecommunications process. The 1670 Modem can be instructed to dial a specified phone number, detect a remote computer's signals and establish a connection to your computer with a single command, or to answer incoming calls from other computers. It can adjust itself to match the speed of incoming or outgoing transmissions (auto-baud), and will automatically hang up the phone when the connection is broken. In addition, it uses its built-in sound system to let you listen in on a connection in progress, so you will know if you reach a busy or incorrect number. There are several terminal programs which may be used with your 1670 Modem. Your Commodore computer requires a terminal program in order to control your 1670 Modem and to communicate with other computers. ABOUT THIS TEXT FILE ==================== If you have little or no previous experience with modems and computers, you should read this file completely. If you have had previous experience with modems, the section "headers" should allow you to locate any specific information you may need. Note: All users, regardless of previous experience, should read the section detailing command syntax. There are many terminal programs available that will function with your 1670 Modem. You need to be familiar with the dialing commands described in this file in order to use any software, whether provided with your modem or purchased separately. =============================== = 1670 MODEM COMMAND PROTOCOL = =============================== UNDERSTANDING TERMINAL MODE =========================== Terminal mode is the mode of operation in which communication takes place. The many terminal software programs available for use with your 1670 Modem each provide various functions that can be performed while in terminal mode, such as downloading a file from an information service or controlling the memory buffer. The specific commands that execute these functions vary from program to program. The 1670 Modem responds to commands that remain constant regardless of the terminal program in use. These commands, which are either typed by the user directly on the keyboard or, in some cases, sent to the modem by the terminal software, are often referred to as Hayes commands. They instruct the modem to dial or answer the telephone, determine what kinds of messages the modem will provide about the status of the communications session, and tell the modem when to disconnect from the remote computer. Most of the commands are used before actual communications are established with a remote computer. Most 1670 Modem commands have several possible values. If you don't specify a value, the pre-set (default) value will be used. Table 2-1 lists the commands and shows their default values. The remainder of this section gives examples of 1670 Modem command usage. ========================= TABLE 2-1 1670 MODEM COMMAND SYNTAX ========================= All commands are sent to the modem as ASCII characters. All letters in command sequences MUST be capitalized to be recognized by the 1670 Modem. Except where noted, all commands are preceded by the characters "AT", and followed by an ASCII carriage return. A Answer Mode. The modem will go into answer mode without having received a ring. A/ Re-execute the last command entered. Every command is stored until the next one is entered; the modem will re-execute a command entered previously. "A/" does not require "AT" or a carriage return. Useful when the phone is busy. D Dial a number and go into originate mode. The D command may be followed by a number to dial, or by one of the following characters. P Dial using pulse (rotary) dialing. T Dial using touch-tone (DTMF) dialing (default). , Pause for two seconds. A comma may be inserted anywhere in the number to introduce a delay, such as that required by some long- distance services. E0 Do not echo back command characters to the screen (default). E1 Echo command characters to the screen. F0 Half duplex operation. F1 Full duplex operation (default). M0 Internal speaker is OFF at all times. M1 Activate speaker during dialing and silence when carrier is detected (default). M2 Internal speaker is ON for entire communications session. Q0 Send response codes to screen (default). Q1 Do not send response codes to the screen. Useful when modem messages would interfere with data stream. S Set register commands. These commands are of the form "Sx=n" where x is the S-register and n is a number between 0 and 255. S0=n Answer calls on the nth ring. The special case "S0=0" may be used to disable auto answer operation. Default is 1. S2=n Set the character to be used in the escape code sequence to the ASCII character represented by n. (See +++ below.) Default is S2=43, the decimal equivalent of "+". S7=n Set the length of time (in seconds) the modem will wait for detection of carrier when originating a call. (Default is 30.) This value should be increased when calling internationally or through long distance services which introduce additional delays. V0 Make the modem messages appear in Terse (i.e. numeric) form. Terse messages are followed only by a carriage return. V1 Make the modem messages appear in Verbose form (default). Verbose messages are followed by a carriage return/linefeed. RESPONSE CODES -------------- Verbose Terse ------- ----- OK 0 CONNECT 1 RING 2 NO CARRIER 3 ERROR 4 CONNECT 1200 5 X0 Use the Standard Response Code Set; responses 0-4 above (default). X1 Use the Extended Response Code Set: responses 0-5 above. When ATX1 is issued, modem will respond "CONNECT" for 300 baud calls, and "CONNECT 1200" for 1200 baud calls. Z Reset modem. This will reset the modem as if it had just been turned on, restoring all modem controls to their default values. +++ Escape code sequence. Once connection has been established, this is the only command that the modem will respond to. "+++" preceded and followed by at least one second of no data will cause the modem to disconnect and return to the command st ate. The escape guard-time of one second protects against being accidentally cut off by a "+++" in the transmit data stream. In addition, the escape code may be changed from "+" to another ASCII character by changing the value of the S2 register. USING 1670 MODEM COMMANDS ========================= ATTENTION ========= All Hayes commands provided in your 1670 Modem, except the A/ and +++ commands, must start with AT, which is short for ATtention. The AT is a signal that the characters to follow are a modem command. The 1670 Modem only responds to capital letters in modem commands. PRELIMINARY COMMANDS ==================== ECHOING COMMAND CHARACTERS -- AT E1 -- AT E0 -------------------------------------------- The E command is the echo command. E1 means that when you type commands they will appear on your screen. E0 (the default) means commands you type don't appear on your screen. It is difficult to be sure your commands have been typed correctly unless you begin your telecommunication session with the command ATE1. NOTE: you won't be able to see the ATE1, but the computer will respond OK and all further command will be visible. CONTROLLING AUTO-ANSWER: AT S0=n -------------------------------- If you will be leaving your 1670 Modem connected to the telephone when not in active use, and do not want the modem to answer incoming calls immediately or at all, you may want to alter the value of the S0 register. The command AT S0=n, where n is the number of rings (between 1, the default, and 255), will determine on what ring the modem will answer. The command AT S0=0 will instruct the 1670 Modem not to answer incoming calls. The E and S0 commands may be combined, as shown in the following example: AT E1 S0=0 will instruct the modem to echo commands to the screen and to ignore incoming calls. MODEM MESSAGES -- AT V1 -- AT V0 -------------------------------- During telecommunication certain messages, known as Response Codes, will appear on your screen. The messages are produced by the 1670 Modem to advise you that a connection has been established with a remote computer, that an error has been made , that a command has been successfully executed, or that the phone is ringing. The messages can appear as words (verbose form) or as numbers (terse form). The verbose form is the default. To receive terse messages, type: ATV0 To switch back to verbose messages use ATV1 . There is a list of response codes in Table 2-1. RESPONSE CODE SETS -- AT X0 AND AT X1 ------------------------------------- You can choose whether the 1670 Modem advises you simply when a connection has been established, or also includes information about the current speed of transmission of an incoming or outgoing call. To request the Extended Response Code Set, which provides this additional information, type AT X1. To use the Standard Response Code Set, the default, type AT X0. ESCAPE CODE =========== Another important command for controlling your 1670 Modem is the Escape Code Sequence, +++. You use this command to instruct the 1670 Modem to terminate the telecommunications session and "hang up" the phone. (If the remote computer disconnects fir st, your 1670 Modem will automatically hang up.) This command, which is only active when a connection has been established with a remote computer, must be preceded and followed by a one second pause in transmission in order to prevent transmitted text from inadvertently causing disconnection. The response code NO CARRIER (or 3 in terse mode) will be displayed to indicate that you have been disconnected from the remote computer. DIALING COMMANDS ================ Your 1670 Modem can be instructed to dial a telephone number and establish a connection with a remote computer using a single command. There are several forms of this command. If your telephone service includes the ability to dial using "touch- tone" equipment, use the following command to dial: AT DT nnnnnnnnnnn where nnnnnnnnnnn is the telephone number you wish to dial. If your telephone service allows pulse (also known as rotary) dialing only, use: AT DP nnnnnnnnnnnn In either case, you may include a comma (,) as part of the telephone number to dial to introduce a delay of two seconds. This may be used, for example, within a business, when a code must first be dialed for an outside line: AT DT 9,5551234 Hyphens (-) included in a telephone number have no effect on dialing. The star (*) and pound sign (#) used by some long distance services may be included in the dialing sequence. You may use the A/ (re-execute) command to redial a busy number, provided that the dialing sequence was the last AT command issued. OTHER 1670 MODEM COMMANDS ========================= The other commands recognized by your 1670 Modem are described in Table 2-1; these additional commands are generally not required in normal applications. If you intend to use or design special applications using your 1670 Modem, such as a bulletin board system (BBS) or automated terminal, carefully study these commands and the Technical Information presented in the next section. ========================= = TECHNICAL INFORMATION = ========================= The following information is provided for programmers and advanced users who require more specific information about the 1670 Modem. TECHNICAL SPECIFICATIONS ======================== DATA FORMAT: binary, serial, asynchronous, 10 bits OPERATIONAL MODES: auto answer, auto dial, auto baud, auto parity DATA RATE (computer to modem): 0 to 300 bps, or 1182 to 1230 bps DATA RATE (modem to computer): 0 to 300 bps, or 1219 bps COMPATIBILITY: Hayes command protocol, (300 and 1200) Bell 212A 1200 bps 4 level DPSK Bell 103 300 bps FSK LINE INTERFACE: Direct Connect, two RJ11C modular telephone jacks FCC part 68 approved (USA), DOC approved (Canada) CARRIER INDICATOR: Carrier tone from built-in piezo electric speaker DIALING METHOD: Touch Tone (DTMF) or Rotary (pulse) ANSWER TONE DETECTOR: 2125 to 2350 Hz ANSWER TONE: 2225 Hz for 17 seconds FAILED CALL TIMER: Programmable 2-255 seconds, 30 seconds default CARRIER DETECT THRESHOLD: Off to On: -43 dBm On to Off: -48 dBm BILLING DELAY: 2.1 seconds ABORT TIMER: 17 seconds after billing delay LOSS OF CARRIER DISCONNECT: 250 ms TRANSMIT LEVEL: Carrier less than -9 dBm Tone Pair less than 1 dBm CARRIER FREQUENCIES: TRANSMIT/ORIGINATE RECEIVE/ORIGINATE RECEIVE/ANSWER TRANSMIT/ANSWER 212A Mode: 1200 Hz +-.001% 2400 HZ +-.001% 103 Mode: Mark: 1270 Hz +-.5% Mark: 2225 Hz +-.5% Space: 1070 Hz +-.5% Space: 2025 Hz +-.5% USER PORT PIN CONNECTIONS: PIN FUNCTION SOURCE 1, 12, A, N Ground from computer 2 Vcc (+5 VDC) from computer 3 /Reset from computer 10, 11 9 VAC from computer B, C RxD from modem M TxD from computer J - not used F /RI from modem H, K DCD, CTS from modem L DSR ground E DTR not connected SUPPLY VOLTAGE: (Vcc): 4.5 to 5.5 VDC @ 50 mA SUPPLY VOLTAGE: (9 VAC): 12 Vpp on 6 VDC +-30% @ 50 mA HIGH SPEED/LOW SPEED PROTOCOL ============================= In the Originate Mode (that is, dialing out), the modem will automatically sense the baud and parity of the letters "A" and "T" of the command that you send to the modem. No switches or special commands are necessary to change baud rate, as this is all done automatically. If the extended response codes are in effect (AT X1) the modem will respond with "CONNECT" for 300 baud, "CONNECT 1200" for 1200 baud, or "NO CARRIER" if the modem does not receive a carrier. It is necessary, however, to adjust your terminal software to the correct baud rate, because it does not auto baud. If you know that you are calling a 1200 baud modem, you must first set your terminal software to 1200 baud before dialing. Otherwise, you will get a screen full of garbled characters. In the Auto Answer Mode (that is, during an incoming call) the modem will indicate what baud rate the incoming caller is using. It does this by responding with either "CONNECT" for a 300 baud call, or "CONNECT 1200" for a 1200 baud call. The modem sends the connect message at the last baud rate in use, not at the new baud rate. For example: ACTION MODEM RESPONDS AT THIS BAUD Power on. Low speed call RING 1200 comes in. CONNECT 1200 Data link is established. Data transmission is at 300 baud. End of session. NO CARRIER 300 Call is ended. High speed call RING 300 comes in. CONNECT 1200 300 Data link is established. Data transmission is at 1200 baud. End of session. NO CARRIER 1200 Call is ended. When attempting to sense the speed of a call by looking for "CONNECT" or "CONNECT 1200" in a program, the signal may not be very clean at the beginning of a call. Depending on the situation, there may be a garbled character in the beginning, or the upper/lower case of the prompt may be switched randomly. It is best to have the program "filter" the input at this point, to convert all of the characters to lower case and cut out any prefix or suffix garbage characters. Programmers should also remember that the BASIC OPEN statement will overwrite any BASIC variables when it allocates an RS232 buffer area at the top of memory. Therefore, all variables must be reinitialized after changing the baud rates in BASIC. In machine language, you can choose to put your variables out of the way of the RS232 buffer. In the Commodore 64 and 128, the RS232 routines are provided in software. This software UART is very sensitive to speed variations. The setting in the OPEN statement for 1200 is just that -- 1200 baud, not 1205 or 1195. This can cause problems wit h Bell 212A compatible modems. All Bell 212A modems can handle a computer to modem baud rate of 1200 just fine, but the Bell 212A modem has a modem to computer baud rate of 1219. The net result is that you can transmit data successfully, but all that is received is garbled characters. Fortunately, since we are dealing with a software UART, it is easy to fine-tune the baud rate. This is done with the user definable baud rate as outlined in the Programmer's Reference Guide. A setting that works for most computers is: OPEN 2,2,2,CHR$(0)+CHR$(0)+CHR$(61)+CHR$(1). 61 and 1 are the decimal value low byte and high byte of the user definable baud rate. You may need to vary the low byte above or below 61 to fine tune the UART for your particular application. Advanced users may wish to modify the kernal entirely -- allowing you to adjust the transmit speed and the receive speed independently. COMPARISON WITH HAYES SMARTMODEM 1200 ===================================== Some users may expect the 1670 Modem to function exactly like the Hayes Smartmodem 1200. There are some minor differences between a true Hayes Smartmodem 1200 and a Commodore 1670 Modem. They are: 1. The 1670 Modem will hang up after typing the online escape sequence (+++). 2. There are only three dip switches; the parameters controlled by switches in the Hayes product may be adjusted using on-line commands in the 1670 Modem. 3. Only a few of the S-Registers are implemented. See the 1670 Modem command table in Section 2 for further information. =================== = TROUBLESHOOTING = =================== This section describes some of the common problems you may encounter using the 1670 Modem, and tells what to do to fix them. CONNECTION PROBLEMS =================== 1. "I connected it properly, but when I turned the computer on the modem started buzzing!" You may have installed the modem incorrectly, or with the computer turned on. Turn off the equipment, install the modem again, then turn on the computer, disk drive and monitor. Be sure not to unplug the modem once the computer is turned on. 2. "When I plugged the cord into the LINE jack on the modem, the phone gave a short ring. Is something wrong?" It's okay for the phone to give one quick ring. If the modem buzzes, however, turn off your computer, check the connection and try again. TERMINAL MODE PROBLEMS ====================== 1. "All I can get on the screen is garbled characters!" If you are not on-line, this is probably a connection problem. See question 2 under Connection Problems. If you are on-line, there could be two reasons: 1. You are using incorrect telecommunications parameters for the particular host you are calling. 2. A noisy or "hot" telephone line. Solution to 1> Alter the parameters according to the directions provided by the terminal program you are using, and try to retransmit. Solution to 2> A noisy telephone line can occur when telephone lines get overloaded. Stop transmitting and redial to try to get a better connection. If the trouble persists, contact your phone company. On PBX lines (private phone systems, often within a large company) a "hot" signal can occur because of the proximity of the modem to the switchboard. The dip switches on the back of the 1670 Modem can sometimes fix this. Look at the back of the 1670 Modem. Next to the phone jack are three tiny switches. Ordinarily they are set like this: 1. Up 2. Down 3. Down (Switches are numbered left to right looking at modem from rear.) Switch 1: Up for regular home and single-line business phones. Down for PBX systems (usually the 1670 Modem can function in the up position with PBX systems as well). Switch 2: Up for Analog Loopback self-test. See (3) below. Down for normal operation. Switch 3: Up for no carrier detect signal. Down for Carrier Detect on pin H-K of edge connector. Only Plus/4 users need be concerned with this switch. It must be in the UP position for successful data transmission. Other computers can operate regardless of how this switch is set. Check that switch 1 is in the down position for PBX lines, and retransmit. 2. "Voices are coming over my modem!" You probably dialed the wrong number. The modem will automatically disconnect and indicate NO CARRIER. You may press RETURN to abort dialing immediately. 3. "I give up, nothing works. It's still garbled." Your 1670 Modem has a type of self-test that may help determine if the problem is with the modem itself or with the phone lines. Look at the switches on the back of the 1670 Modem. The middle switch, usually in the "down" position, is called the analog loopback switch. The introduction of this text file describes analog versus digital signals. Your modem uses digital signals while telephones use analog. The analog loopback self-test will determine if signals are being correctly translated by the modem. 1. Remove any disks from the disk drive. Turn off all equipment. 2. Flip the middle switch to the "up" position. You may find it easier to remove the modem from the computer, then flip the switch. 3. Re-install the modem. 4. Turn on all equipment and load your terminal program. 5. When you transmit, everything you type should appear on your screen (it's being "looped back"). If this works, you can be reasonably sure that the modem is correctly translating the signals, and the problem lies in the phone lines or with the host computer. Be sure to return switch 2 to the "down" position after completing this test. ============ = GLOSSARY = ============ ANSWER/ORIGINATE MODE -- A mode of operation describing the sending or receiving of data from one computer to another. When your 1670 modem is in the originate mode, you dial the telephone call to the receiving computer. If your 1670 Modem is in the answer mode, then you receive the call from the remote computer. ASCII -- The abbreviation for American Standard Code for Information Interchange. ASCII is the code that represents the characters on the keyboard. Standard ASCII uses 7 bits to represent a character and Commodore ASCII uses all eight bits (in a byte) to allow an extra 128 graphics characters. An ASCII conversion routine (in your terminal program) is necessary to communicate between a Commodore system and a standard ASCII device, such as many host computers or a non-Commodore printer. BAUD -- a unit of measurement for the transmission of data; roughly translates into bits per second. The 1670 Modem operates at 1200 baud, that is it transmits 1200 signal elements (bits) per second. BIT -- the smallest unit of information in a computer system. A bit may be either "off" representing zero, or "on" representing one. Specific combinations of bits represent meaningful information. BLOCK -- A unit of information sent and received between devices, usually predefined in terms of number of bytes. For example, Commodore disk blocks (sectors) are 256 bytes; XMODEM blocks are 131 bytes. BUFFER -- A temporary storage area, usually in a computer's memory. The data is stored in the buffer and later output to tape, disk, or printer or acted upon by the computer program currently in memory. Peripheral devices such as disk drives and printers can also have their own buffers to temporarily manage and store data. BULLETIN BOARD -- An electronic public storage medium within an information network where messages can be transmitted and received. BYTE -- a unit of information consisting of combinations of bits. A byte may represent a letter, number, special symbol, or control information. CONFERENCING -- A method of communication where several users within a large geographic area can "meet" in a public storage location within an information network and exchange messages, conduct computer dialogues or participate in a class. CURSOR -- the indicator on your screen that shows where the next character will be displayed. DATABASE -- A large collection of related information stored on a computer medium such as disk, tape or in a computer's memory. Databases are often available to the public for a fee. DOWNLOAD -- The process of SAVEing information transmitted from another computer to your disk, tape or printer. DUMP -- the bulk movement of information from one area (device) to another as a single activity. DUPLEX -- also called full-duplex -- Indicates that transmission of data from remote to host and host to remote happens simultaneously. Opposite of half-duplex, where transmission is in only one direction at a time. ESCAPE CODES -- a special character used in telecommunications to indicate that the succeeding characters are different than the characters making up the actual message. The standard escape character is CHR$(27), which usually signifies that the following characters will be control characters in an escape sequence that may include such directions as clear screen, position cursor, etc. FILES -- collections of information on disk. Files may consist of programs, or text information for use by a program. HANDSHAKE -- the defined electrical line sequences for proper communication between digital devices. HOST/REMOTE COMPUTER -- In telecommunications the host is the computer that receives a call from the other computer. The host controls the processing while the computer that originated the call, the remote, acts according to the way the host dictates. INFORMATION SERVICE -- An electronic information source, usually on a large computer, such as QuantumLink, or CompuServe, that provides information to other computers through telecommunications. Information services may contain world and financial news, stock quotes, shop at home services, games and other public domain software. INTELLIGENT TERMINAL -- A remote computer with the capacity to upload (transmit) and download (SAVE) files to and from a host computer. LINE FEED -- In telecommunications, indicates that a carriage return will be added whenever the data being transmitted cannot fit on one line of the screen. MODEM -- A communication device that acts as an interface (connector) between a computer and a telephone. It allows electronic signals from one computer to be sent across standard telephone lines to another computer. The word stands for MOdulator/DEModulator. ON-LINE -- The state of being connected to a host computer as a terminal. PARITY -- The agreed-upon definition of valid bit combinations in a character. The parity bit is used as a checking mechanism to determine if transmission has been complete. Parity may be even, odd, mark, or space. PROGRAM FILE -- A set of computer instructions stored on disk or tape, which can be executed in a computer's memory. PROTOCOL -- The appropriate settings or parameters required for accurate and correct sending and receiving of information during a telecommunications dialogue. The telecommunication protocol includes parameters such as duplex, parity, word length an d baud. SEQUENTIAL FILE -- A collection of related data stored (one character after the other) as a complete unit on disk or tape. STOP BIT -- A bit that signals the end of a character being transmitted. SYNCHRONOUS/ASYNCHRONOUS COMMUNICATION -- A synchronous computer system transmits data according to and in unison with the internal clock of the computer. Asynchronous systems, like your Commodore computer, transmit data independently of the internal system clock and use start and stop bits to regulate data transmission. TELECOMMUNICATIONS -- the sending and receiving of information between computers across standard telephone wires. Also known as telecomputing. TERMINAL MODE -- The mode of operation in which sending and receiving information takes place. UPLOAD -- The process of transmitting the contents of your computers memory to the memory of another computer where it can be executed or SAVEd. WORD LENGTH -- The number of data bits in a telecommunications word, or unit of data transmission. Usually 7 or 8 (plus start bit, stop bit(s), and optional parity bit). Most programs default to one start bit, eight data bits, one stop bit and no parity. ======================= = ADDENDUM NUMBER ONE = ======================= A SYSOPS NOTES ABOUT THIS FILE ============================== In reading this text file I have noticed a few errors, most of which are only errors of omission These will be outlined below. 1. In Table 2-1 it is stated that ATZ will restore ALL default values. ATZ will restore MOST but not ALL default settings. 2. In the section on High Speed/Low Speed Protocol it is mentioned that use of the OPEN statement in Basic for the RS232 port will foul up program variables. This is true in regard to the C-64 and the C-128 in 64 mode. It should be noted that this is not true of the C-128 in native 128 mode. Opening the RS232 port from Basic will not affect variables in 128 mode as RS232 buffers are reserved at powerup in low memory. 3. In the Glossary, under BLOCK. The statement that a Commodore disk block contains 256 bytes is correct IF you include the two bytes used by DOS to indicate the track and sector number of the next block in the file. (Most of us are used to considering a CBM block as 254 bytes.) The statement that an X-Modem block contains 131 bytes is correct for X-Modem Checksum IF you include the three bytes in the "header". (Most of us are accustomed to thinking in terms of 128 byte X-Modem blocks.) It should be noted that this file appears to have been written around 1985-86 and considers only the older three dip switch 1670. No mention is made of the later four dip 1670. eof