Controlling your Modem with AT Commands

Zoltrix-logo-big.jpg

Controlling your Modem with AT Commands


Index


Issuing AT Commands

Getting Started with the Terminal Mode

With your modem installed, your computer powered ON, and your computer's communications software loaded in its terminal mode, you can enter commands to the modem.

Sample Hyper Terminal Mode display

If available in your communication's software, select the "terminal mode" (sometimes referred to as, "terminal emulation mode", "dumb terminal mode", "local mode", or "direct connect mode"). This mode allows you to send commands directly to the modem. Some software packages start immediately in the terminal mode as soon as you load the program.

Using AT Commands

When issued to the fax modem, AT commands direct the fax modem to dial, answer, hang up, and to perform many other communication tasks. Some of the most commonly used commands are:

AT (Attention). This is the command line prefix. (All the commands listed , except A/ and +++, must be preceded by the command AT). A Answer an incoming call D Dial the following phone number E Turn echo OFF H Hang up O Return to on-line state Z Reset the modem to the values stored in the N.V. Ram +++ Return to the Command State A/ Repeat last command (Do not precede this command with AT or follow it with <Enter>)

The Command Line

A Command line allows you to issue a number of commands at one time rather than issuing and waiting for the modem to react to each command separately. Here are a few rules you must follow when issuing a command line to the modem.

  • 1. Every command line must begin with the letters AT, (except the commands A/ and +++)
  • 2. You can group several commands on one line as long as the total line does not exceed 40 characters. Remember that "DT" and <Enter> each count as one character, (do not count spaces and the AT).
  • 3. Because all spaces are ignored in the command line, you may leave spaces between each command, and between each character of every command. You can also include punctuation's in telephone numbers, and type commands in either UPPER- or lowercase. For example, the following commands are identical:
    •  

      ATDT8005551234 < Enter > or

      atdt (800) 876-5555 < Enter >

  • 4. To cancel a dialing command in progress, press any key on the keyboard.
  • 5. If you make an error, backspace to erase it, and retype the characters correctly.
  • 6. To execute the command line, press the <Enter> or <Return> key on your keyboard.
Repeating a Command Line

If you want to repeat the last command line you entered, type the following command:

A/        (upper or lowercase A, followed by a slash)
  • Note: In this case you do not need to type AT first, nor do you press <Enter> at the end of the command line. This command comes in handy when you need to redial a number that got a busy signal.
Result Codes

When a command is issued, the screen will usually respond with a message. This message is called a "Result Code". It tells you the result of the command you've executed; whether the command has been executed, whether you have connected to another modem, whether the modem received a busy signal, and so forth.

Result codes can be displayed by either a number representing a result code or by verbal responses for a more descriptive code. Your modem has been defaulted to show the verbal response codes. However, you can alter the result code responses in the following ways:

  • 1. The Xn command instructs the modem to give you less detailed responses. The default is X4.
  • 2. The V0 command instructs the modem to respond with numerical (digits) instead of verbal result codes.
  • 3. The Q1 command disables generation of result codes.
  • 4.The W dial string modifier instructs the modem to wait for a DIAL tone before continuing dialing.
  • 5.The @ dial string modifier instructs the modem to include the NO ANSWER result code in the X4 mode.
Dialing with AT Commands

The Terminal mode allows you to instruct the modem to dial a remote modem by issuing the D command followed by the phone number. You can also include dial string modifiers in your command line to give the modem additional instructions. The following dial modifiers are available on most modems:

  • T Dial using DTMF tones
  • P Pulse/rotary dial (factory default)
  • , Pause
  • W Wait for dial tone
  • @ Wait for silence
  • ! Hookflash
  • ; Return to the Command Mode after dialing
  • Note: Download the complete AT command manual for more information on whether the commands are supported by your model.
Simple Dialing

To command the modem to dial a remote modem from an ordinary tone dialing telephone line, enter the dialing command followed by the phone number. For example, type the following command:

ATDT 876-5555 < Enter >
  • Note: For rotary/pulse dialing telephone systems you must use:
      • ATDP 876-5555 <Enter>
  • Note: If all of your typed characters appear double (for example, you see AATTDD), you need to disable command echo by reconfiguring your communication software (refer to the software manual) or issuing the ATE0 <Enter> command.
After you issue the dialing command you will hear the modem dialing and the remote telephone ringing. If the remote modem answers the call, the two modems will send high-pitched carrier tones to one another which establishes the transmission speed and other parameters for the data connection. This process is called handshaking.

If the call is answered, you should see the message, "CONNECT", followed by the connection speed. If the other phone line is busy, you will see "NO CARRIER" or "Busy" displayed (this is dependent upon the current X setting). If the other modem does not answer, you will see the message,"NO CARRIER".

After a connection has been established, with one of the "CONNECT" messages displayed, the modem is ready to immediately begin transmitting and receiving data. This may vary from typing messages to each other, sending or receiving files, logging on to an information service, or any other data communication task you wish to perform.

Manual Dialing Commands

If both your modem and the remote modem that you are connecting with have phones connected through the phone jacks on the modem, this mode will allow you to toggle between a voice connection and a data connection. This feature is invaluable if your trying to make adjustments to optimize your communications with the remote modem. After discussing what changes you want to make you can then release the line to the modem and switch back again if you need to discuss the further modifications.

Switching Between Voice and Data

To switch from a voice connection to a data connection, both you and the other party must have a computer with a modem. Communication software must be loaded and in the terminal mode (this may be referred as, "Dumb Terminal", "Terminal Emulation Mode", "Local Mode", "Direct Connect Mode", "On-line Manual" or something similar). Check your software communication manual if you can't locate this mode.

Switching From Voice to Data

You can make the initial call either by dialing your telephone manually or by letting the modem dial for you. When you have completed your voice conversation and want to switch to a data connection, type the following command:

      • ATX3D <Enter>
This command instructs the modem to be the "originating modem". While you are issuing this command the other party should type the following command:
      • ATA <Enter>
This command instructs the modem to be the "answering modem". Either party may be the answering or originating modem, but, both parties can't be the originating or answering modem.

Both parties should now hang up their telephone handsets. If you don't hang up, data errors may occur. You will now hear the modems handshake and see the result code CONNECT along with the connection speed.

Switching From Data to Voice

To switch from a data connection to a voice connection, both parties would pick up their handsets, and either use the hang-up command of the software you are using or issue the Escape sequence command (+++) followed by the ATH command as soon as the modem responds OK to the Escape command. You should now hear the other party in your telephone handset.

Using the Modem to Establish a Voice Call

To use the modem as an auto-dialer you can either use software designed for this purpose or use regular communication software with a few modifications.

Add a record to the communication software you are using. In the phone number field, enter the voice telephone number followed by a semi- colon (;) and an H. The semicolon instructs the modem to return to the command mode after dialing the number. The H command then instructs the modem to hang-up releasing the line to your telephone.

Before selecting the record to dial, pick up the telephone handset (connected to the Phone Jack of the modem). You should hear the dial tone in the handset. Select the record to dial. You should now no longer hear the dial tone in the handset. After the modem dials the number, the modem will be returned to the command mode and then hung up. You should be able to hear the phone ringing in your handset.

Hanging Up

If you are using a communications program, use the "hang up" or "disconnect" command in the program to disconnect the call.

A method used with computers in the “dumb terminal mode” is to return to the Command State by typing an escape sequence. Typing three plus signs is the standard escape sequence,

      • +++
(refer to Issuing Commands During the Data Connection), and to hang-up then type the "hang-up" command as follows:
      • ATH <Enter>
Dialing from a Business Phone System

When you dial from a business phone, you typically must instruct the modem to dial a number for an outside line, to wait for a dial tone, and then to dial the telephone number of the remote modem. A typical command line might look like this:

      • ATDT9,876-5555 <Enter>
Here the modem dials 9 for an outside line, pauses to wait for a dial tone (the comma in the command line causes the pause), and then dials the number.

By default, the comma causes a two-second pause. However, you can create a longer or shorter pause by changing the value for register S8.

You can also create a longer pause by including several commas in a row in the command line. If there is no dial tone by the time the pause ends, the modem will go ahead and dial the number anyway, but the connection will not succeed.

A better way to dial would be to insert a W in the command line to instruct the modem to wait until it hears the dial tone (for a specific maximum amount of time). The command line would look like this:

      • ATD9W876-5555<Enter>
Here the modem dials 9 for an outside line and then waits for a dial tone (the default maximum wait time varies from modem to modem, but the range is usually 30 to 50 seconds, but you can change this value in register S7). If no dial tone is detected in the specified time, the modem hangs up.
  • Note: Your office phone system must allow the use of a regular telephone (not a proprietary phone) to use your modem from your business.
Returning to the Command State After Dialing

Occasionally you may want the modem to dial a number and then to return to Command State to send additional commands before establishing a data connection. You will find this feature useful when dialing an electronic service such as telephone banking. You can dial the number of the bank, then after the call is answered, you can enter your access code.

To cause the modem to return to Command State after dialing, include a ; (semicolon) at the end of the command line.

For example, to dial a bank for electronic banking, you might type the following command:

      • ATDT 876-5555; <Enter>
Here, the modem tone dials the number. If the remote modem answers, you see the OK Result Code, and can enter addition commands. For example, to instruct the modem to dial your access code or account number, you could enter the second command line as follows:
      • ATDT 12345678 <Enter>
If the connection is successful, you will see the CONNECT Result Code on your screen.

Transferring a Call with a Hookflash

The ! can be used in a dialing command to create a “hookflash”. During the hookflash, the modem hangs up for 1/2 second and then reconnects.

The following command line could be used to transfer a call to extension 333:

      • ATDT!333; H <Enter>
Here the modem receives the tone dialing command, issues the hookflash, and then tone dials the extension. The semicolon returns the modem to Command State so it can hang up.

Waiting for Silence

Some services may answer your modems call with a prerecorded message of their own. In this case you would have to instruct the modem to wait until the message was over before proceeding with the data connection. You can do this with the @ dial modifier.

To instruct the modem to dial a number, listen for ringing, and then wait for up to fifty seconds for a 5 second silence (you can change the wait time with register S7) before proceeding you could use the following command line:

      • ATDT876-5555@ 5678 <Enter>
Here you instruct the modem to tone dial the number and then, if it hears ringing, to wait up to fifty seconds for 5 seconds of silence before dialing the remaining digits (this could be an extension number, a password, or an account number).

Dialing a Stored Phone Number

Your modem can dial one of up to four previously stored telephone numbers (identified as 0-3) of up to 33 digits each. This feature is useful for connecting to a frequently called remote modem without your having to dial the digits individually.

You can store the phone number in the nonvolatile RAM with the &Zn=x command. The n refers to which of the four (0-3) memory locations you want, and the x is the phone number. To store the phone number 876-5555 as the 3rd stored number, type the following command:

      • AT&Z3 = 8765555 <Enter>
Here the modem is instructed to store the telephone number as stored number #3. Once stored, the number is retained in the modems nonvolatile memory until you change it. The phone number remains stored even when power to the modem is turned OFF.

To dial a previously stored phone number you would use the s=n dial string modifier, (n refers to which of the four stored phone numbers you wish to have dialed). To dial stored phone number 3, you would type the following command:

      • ATDs=3 <Enter>
The s=n can appear anywhere in the dialing command. For example, you might want to store a special access code or password that follows the phone number. Your command line might look like this:
      • ATDT8765555, s = 1 <Enter>
In the above example you command dialing the phone number. The modem then pauses for a set length of time (the “comma” forces this pause) and then dials a previously stored access code (the result of the s=1 dial modifier).

Do not confuse the s = n dial string modifier with the S command used to read or change the value of S-Registers.

Answer Mode

Answering a Call

When the modem is in the data mode, Auto-Answer will answer an incoming call provided the computer is on and your software is properly loaded.

  • Note: Your modem is not factory set to Auto-Answer telephone calls.
You can enable the Auto-Answer mode by setting register S0 to one or greater. Your terminal or computer must be in the On-Line mode with its DTR signal true or the &D0 command (DTR forced ON) must have been issued. See the discussions covering Selecting the Number of Rings and Disabling Auto-Answer.

When the modem answers the call, it sends a high-pitched carrier tone to the modem on the other end, which begins the handshaking process.

After handshaking, you will see one of the CONNECT result code messages on your screen, and the data connection will begin.

Selecting the Number of Rings

Register S0 allows you to select the number of rings after which the modem will Auto-Answer. For example, to instruct the modem to answer after four rings, type the following command:

      • ATS0=4 <Enter>
Disabling Auto-Answer

If you want to disable the Auto-Answer feature (perhaps you will be away from your phone for a while), you can do so by setting register S0 to 0.) If you are using communications software, and it is programmed to Auto-Answer, it will do so regardless of the modems settings.

  • Note: The modem can answer a call even if Auto-Answer is disabled. Your computer must be turned ON, your computer's software loaded, and you must be in the terminal mode. When you hear the telephone ring, type the command ATA <Enter>. The modem will answer the call.
Sending and Receiving Files

You can use your modem, your computer and communications software to transmit (upload) and receive (download) files. These processes are handled through your communications software. See your communications software manual for more information.

Issuing Commands During the Data Connection

The modem has two operational states: Command State and Data State. When you first turn your terminal ON, or load your computer's communications software, and start giving commands to the modem, the modem is in Command State. However, once you make a connection with another modem and start passing information over the telephone lines, you are in the Data State and can no longer issue AT modem commands.

If your connection with the other computer is broken for any reason, you will automatically return to Command State so that you can issue new commands. However, you may want to return to Command State temporarily without losing your data connection (e.g. to change a communications parameter). The modem provides a special Escape Code that lets you do this.

Using the Escape Code

To return to Command State during a data connection, wait for one second of inactivity, and then quickly type three pluses (+++).

After one second of inactivity, you will see OK on the screen. You have returned to the Command State and can issue commands, but you have not lost your data connection.

Resuming the Data Connection

When you are in the Command State and want to resume the data connection, type the following command:

      • ATO <Enter>
You will see the CONNECT result code on the screen and your data connection will continue.

Setting Communications Parameters

Whenever you communicate via modem you use certain settings that establish agreements between the two modems. These settings are called communication parameters and cover such items as baud rate, parity, character length, and the number of stop bits.

When you are using a computer, communication parameters are set and changed by your communication software. In order to establish a data connection, your communication parameters must match those of the remote modem.

You may find that you can communicate perfectly without changing your software settings. This can be because your terminal or computer software program uses common default settings which may be the same as those of the remote modem. However, if you experience difficulty, you may have to change your communication parameters. The most common setting are either are 7 data bits, Even parity, and 1 stop bit (7E1) or 8 data bits, No parity, and 1 stop bit (8N1).

The Factory Profile

The factory profile is permanently stored in your modem. It cannot be changed like the stored profiles can. The factory settings may not be what the software expects, but this is a good starting point for all Initialization strings. This will ensure that the modem is set correctly without sending every command that the modem supports.

You can always return to these factory settings by issuing the following command:

      • AT&F <Enter>
You can return to the factory default settings, and then store them into the modems nonvolatile ram, (if supported in your model), for use when your modem is turned on or reset, by issuing either of the following commands: The Active Profile

The active profile contains the settings currently in effect. When you turn your modem on, or reset it, the modem reads its nonvolatile ram, if nonvolatile ram is supported in your model, and makes the active profile the same as one off the stored profiles. Normally, this will be stored profile #0, but exactly which stored profile is used is determined by the &Yn command. If nonvolatile ram is not supported by your model the active profile will be the same as the Factory Profile.

When you choose to store an active profile into the modems nonvolatile memory, the chosen stored profile is made the same as the current active profile.

The Stored Profile(s)

Two stored profiles are stored in the modems nonvolatile memory. When you turn your computer and modem off, or reset the modem, you do not change or lose either stored profile. When you turn your modem on, or reset it with the Zn command, the modem reads its nonvolatile memory, and makes the active profile the same as one of the stored profiles.

The stored profile used when you turn on the modem is determined by the &Yn command. &Y or &Y0 (the factory default setting) cause stored profile #0 to be used when the modem is turned on. &Y1 causes stored profile #1 to be used when the modem is turned on.

If you want to change one of the stored profiles to match the current active profile, you would use one of the following commands:

      • AT&W0 <Enter>(Stored profile #0 = current profile)
            • or
        AT&W1 <Enter> (Stored profile #1 = current profile)
  • Note: Not all parameters may be stored in the modems nonvolatile ram. Refer to the AT command manual for your model to determine which values may be stored.
Viewing the Stored and Active Profile(s)

You may wonder "What's in my two stored profiles?" or "Just what is my active profile?". The &V command provides you with a "view" of your profiles. You must be in the "Terminal Mode" to be able to send the &V command to your modem. The &V command causes your modem to display a list of AT commands and S-Register settings currently in effect (Active Profile) and both stored profiles. Some models may also have a &V1 and &V2 command that will display other useful information.


Copyright@2000 Zoltrix International Limited
Last updated on May 06, 1999
Copyright@2000 Zoltrix International Limited
Last updated on May 06, 1999
Last updated on May 06, 1999
智慧旅游解决方案利用云计算、物联网和移动互联网技术,通过便携终端设备,实现对旅游资源、经济、活动和旅游者信息的智能感知和发布。这种技术的应用旨在提升游客在旅游各个环节的体验,使他们能够轻松获取信息、规划行程、预订票务和安排食宿。智慧旅游平台为旅游管理部门、企业和游客提供服务,包括政策发布、行政管理、景区安全、游客流量统计分析、投诉反馈等。此外,平台还提供广告促销、库存信息、景点介绍、电子门票、社交互动等功能。 智慧旅游的建设规划得到了国家政策的支持,如《国家中长期科技发展规划纲要》和国务院的《关于加快发展旅游业的意见》,这些政策强调了旅游信息服务平台的建设和信息化服务的重要性。随着技术的成熟和政策环境的优化,智慧旅游的时机已经到来。 智慧旅游平台采用SaaS、PaaS和IaaS等云服务模式,提供简化的软件开发、测试和部署环境,实现资源的按需配置和快速部署。这些服务模式支持旅游企业、消费者和管理部门开发高性能、高可扩展的应用服务。平台还整合了旅游信息资源,提供了丰富的旅游产品创意平台和统一的旅游综合信息库。 智慧旅游融合应用面向游客和景区景点主管机构,提供无线城市门户、智能导游、智能门票及优惠券、景区综合安防、车辆及停车场管理等服务。这些应用通过物联网和云计算技术,实现了旅游服务的智能化、个性化和协同化,提高了旅游服务的自由度和信息共享的动态性。 智慧旅游的发展标志着旅游信息化建设的智能化和应用多样化趋势,多种技术和应用交叉渗透至旅游行业的各个方面,预示着全面的智慧旅游时代已经到来。智慧旅游不仅提升了游客的旅游体验,也为旅游管理和服务提供了高效的技术支持。
智慧旅游解决方案利用云计算、物联网和移动互联网技术,通过便携终端设备,实现对旅游资源、经济、活动和旅游者信息的智能感知和发布。这种技术的应用旨在提升游客在旅游各个环节的体验,使他们能够轻松获取信息、规划行程、预订票务和安排食宿。智慧旅游平台为旅游管理部门、企业和游客提供服务,包括政策发布、行政管理、景区安全、游客流量统计分析、投诉反馈等。此外,平台还提供广告促销、库存信息、景点介绍、电子门票、社交互动等功能。 智慧旅游的建设规划得到了国家政策的支持,如《国家中长期科技发展规划纲要》和国务院的《关于加快发展旅游业的意见》,这些政策强调了旅游信息服务平台的建设和信息化服务的重要性。随着技术的成熟和政策环境的优化,智慧旅游的时机已经到来。 智慧旅游平台采用SaaS、PaaS和IaaS等云服务模式,提供简化的软件开发、测试和部署环境,实现资源的按需配置和快速部署。这些服务模式支持旅游企业、消费者和管理部门开发高性能、高可扩展的应用服务。平台还整合了旅游信息资源,提供了丰富的旅游产品创意平台和统一的旅游综合信息库。 智慧旅游融合应用面向游客和景区景点主管机构,提供无线城市门户、智能导游、智能门票及优惠券、景区综合安防、车辆及停车场管理等服务。这些应用通过物联网和云计算技术,实现了旅游服务的智能化、个性化和协同化,提高了旅游服务的自由度和信息共享的动态性。 智慧旅游的发展标志着旅游信息化建设的智能化和应用多样化趋势,多种技术和应用交叉渗透至旅游行业的各个方面,预示着全面的智慧旅游时代已经到来。智慧旅游不仅提升了游客的旅游体验,也为旅游管理和服务提供了高效的技术支持。
深度学习是机器学习的一个子领域,它基于人工神经网络的研究,特别是利用多层次的神经网络来进行学习和模式识别。深度学习模型能够学习数据的高层次特征,这些特征对于图像和语音识别、自然语言处理、医学图像分析等应用至关重要。以下是深度学习的一些关键概念和组成部分: 1. **神经网络(Neural Networks)**:深度学习的基础是人工神经网络,它是由多个层组成的网络结构,包括输入层、隐藏层和输出层。每个层由多个神经元组成,神经元之间通过权重连接。 2. **前馈神经网络(Feedforward Neural Networks)**:这是最常见的神经网络类型,信息从输入层流向隐藏层,最终到达输出层。 3. **卷积神经网络(Convolutional Neural Networks, CNNs)**:这种网络特别适合处理具有网格结构的数据,如图像。它们使用卷积层来提取图像的特征。 4. **循环神经网络(Recurrent Neural Networks, RNNs)**:这种网络能够处理序列数据,如时间序列或自然语言,因为它们具有记忆功能,能够捕捉数据中的时间依赖性。 5. **长短期记忆网络(Long Short-Term Memory, LSTM)**:LSTM 是一种特殊的 RNN,它能够学习长期依赖关系,非常适合复杂的序列预测任务。 6. **生成对抗网络(Generative Adversarial Networks, GANs)**:由两个网络组成,一个生成器和一个判别器,它们相互竞争,生成器生成数据,判别器评估数据的真实性。 7. **深度学习框架**:如 TensorFlow、Keras、PyTorch 等,这些框架提供了构建、训练和部署深度学习模型的工具和库。 8. **激活函数(Activation Functions)**:如 ReLU、Sigmoid、Tanh 等,它们在神经网络中用于添加非线性,使得网络能够学习复杂的函数。 9. **损失函数(Loss Functions)**:用于评估模型的预测与真实值之间的差异,常见的损失函数包括均方误差(MSE)、交叉熵(Cross-Entropy)等。 10. **优化算法(Optimization Algorithms)**:如梯度下降(Gradient Descent)、随机梯度下降(SGD)、Adam 等,用于更新网络权重,以最小化损失函数。 11. **正则化(Regularization)**:技术如 Dropout、L1/L2 正则化等,用于防止模型过拟合。 12. **迁移学习(Transfer Learning)**:利用在一个任务上训练好的模型来提高另一个相关任务的性能。 深度学习在许多领域都取得了显著的成就,但它也面临着一些挑战,如对大量数据的依赖、模型的解释性差、计算资源消耗大等。研究人员正在不断探索新的方法来解决这些问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值