At command lab-learn how to dial the Internet, send and receive text messages, and call

Source: Internet
Author: User
At command Experiment

I. Tutorial Purpose

1. Understand the meaning and usage of AT commands.

2. Learn to use at commands to send and receive text messages, make phone calls, and answer the phone.

3. Use the AT command to access the Internet ).

 

Ii. Lab Equipment

1. One lab box for "modern communication technology comprehensive experimental training system.

2. One mobile phone card and one mobile phone that is working normally.

3. Experimental Module: GPRS module, arm module, and ARM-based LCD module (or PC ).

 

Iii. Experiment Principles

The at command was invented by Hayes and has now become a de facto standard and adopted by all modem manufacturers. The name of each command starts with the letter ". At is followed by letters and numbers to indicate specific functions, such as dialing commands, initializing the modem, controlling the speaker volume, specifying the number of ringing times for the modem to initiate a response, and selecting the error correction format, the AT commands for modem of different grades are different. Please read the modem user manual carefully to use at commands correctly.

The common at command test is as follows. Students can pick out a part of the test.
(1) Change the pin code.

At + cpin = "1234", "5678"

(2) Ask about signal strength

At + CSQ

(3) query user numbers

At + cnum

(4) mobile activity status query

At + CPAs

Parameters:

0 me ready

1 me unavailable

2 unknown, me not ready

3. zhenling

4. The call is in progress.

5 sleep, me not ready

(5) query the current CALL

At + CLCC

(6) query carrier names

At + copn

(7) query all available at commands

At + CLAC

If you want to practice more at commands, please refer to the AT Instruction Manual of the Huawei gtm900 module GPRS.

Iv. Experiment steps

1. Open the experiment box, connect the AC power cord, insert a mobile communication card (SIM card) into the gtm900b module, connect the gtm900b module and the GPRS module with a cable, and finally mount the antenna on the GPRS module. Turn on the power switch and the arm module switch. Wait a moment to see the Windows CE interface.

2. Enable the GPRS module and connect the arm module and the GPRS module with a cross-string line (NOTE: When the arm module is switched on, generally, it is connected to the started GPRS module with a serial port. Please wait until the source of the GPRS module is turned on after the Windows CE system is started ).

3. exercise at commands.

The at command is the basic command for operating the entire arm system and the GPRS module. In fact, the r8cat software used to call and send and receive text messages in previous experiments was written using the AT command. There are two ways to practice at commands: one is to use the r8ctest file on the Windows CE operating system based on ARM, that is, the serial assistant of Baike rongchuang; the other is the computer connected to the experiment box through the serial line.

Solution 1: Double-click r8ctest in the Windows folder to go to The Baike rongchuang serial Assistant dialog box. Set the serial port number, baud rate, data bit, stop bit, and check to COM1, 115200, 8, 1, and none. Click "Open Port" and "receive data" to start working on the serial port. You can enter the AT command in the dialog box, add a semicolon, line feed, and then click send ".

Solution 2: connect the computer and GPRS module with a serial port, enable the experiment box switch and GPRS module, and enable the serial port software in the computer. Set the serial port number, baud rate, data bit, stop bit, and check to COM1, 115200, 8, 1, and none. After the serial port software works properly, you can enter the AT command in the sending information bar, add a semicolon, and click "send" to view the AT command result. (Note: 1. Clear the sending area before sending each command.

2. Switch between uppercase and lowercase letters and click cap on the keyboard.

3. Input of some symbols such as "+" can be obtained by clicking "shift ).

Call and information sending instructions for CDMA and GPRS modules based on serial port debugging Assistant Software

First open the serial port debugging Assistant Software, change the baud rate to 11520, then connect the serial port line, open the GPRS module, and you can see the display in the receiving area: At-commandinterpreter ready.

Double-click the icon to enter the work interface, as shown in Figure 1:

Figure 1

Modify the baud rate to 115200, and then click clear again. 2:

Figure 2

GPRS module

The GPRS module works normally and the receiving area displays: At-command interpreter ready

1. Call instructions

(1) Call the voice phone number atd123456789 or atdt123456789.

(2) Call: ATA

(3) hanging up: ATH

Example:

Enter atd158110000046 after clearing the sending area; (Press ENTER) and click "Send manually"

After clicking "send", the receiving area is displayed:

Atd158110000046;

OK

 

After clearing the sending area, enter ath (Press ENTER) and click "manually send"

After clicking "send", the receiving area is displayed:

ATH

OK

2. Short Message commands

(1) send Short Messages

At + cmgf = 1 (Press ENTER) // set the text message format

At + cmgs = "15811045046" (Press ENTER) // SMS destination

Hellohello // text message content

(Hexadecimal) 1A // send command

Example:

After clearing the sending area, enter at + cmgf = 1 (Press ENTER) and click "Send manually"

After clearing the sending area, enter at + cmgs = "115811045046" (Press ENTER) and click "Send manually"

After clearing the sending area, enter hellohello and click "Send manually"

After clearing the sending area, enter (select hexadecimal) 1A and click "manually send"

After the text message is sent, the receiving area displays:

At + cmgf = 1

OK

At + cmgs = "15811045046"

> Hellohello

> + Cmgs: 161

OK

(2) read short messages

At + CPMS = "SM", "SM", "SM" (Press ENTER) // set the SMS storage unit to SIM card

At + cmgr =? (Press ENTER) // read the number in SM? SMS messages

Example:

After clearing the sending area, enter at + CPMS = "SM", "SM", "SM" (Press ENTER) and click "send"

After clearing the sending area, enter at + cmgr = 1 (Press ENTER) and click "send"

After the command is complete, the receiving area displays:

At + CPMS = "SM", "SM", "SM"

+ CPMS: 50, 70, 50, 70

OK

At + cmgr = 5

+ Cmgr: "recread", "8615810374834", "@ Y", "08/06/8613800100500: 31: 06 + 32", 145,807, "", bytes

OK

CDMA module

The CDMA module works normally. The receiving area is displayed as follows :~~~ Setapp_running_flag is true0 ~

1. Call instructions

(1) Call the voice phone number at + cdv123456

(2) Call: at $ qccav

(3) Host: At + chv0

Example:

After clearing the sending area, enter at + cdv158110000046 (Press ENTER) and click "Send manually"

 

After clicking "send", the receiving area is displayed:

At + cdv158110000046

OK

$ Hcorg: 15811045046, 0

$ Hccnt: 0

After clearing the sending area, enter at + chv0 (Press ENTER) and click "Send manually"

After clicking "send", the receiving area is displayed:

At + chv0

$ Hcend: 3, 0, 00:00:31

OK

2. Short Message commands

(1) send Short Messages

At $ hsmssd = (destid), (length), (ACK), (Format)

(MSG)

Note:

Destid phone number, 0 ~ 9 and * and #.

Length refers to the length of a short message sent. For example, if an English character is sent, the maximum length is 160 characters. If a Chinese character is sent, the maximum length is 35 Chinese characters.

Ack center reply settings. Ack indicates whether to send a short message to the message center. 0 indicates no reply, and 1 indicates a reply.

Format. 1 is asc11 encoding, 2 is unified character encoding, and dual-byte character encoding.

The content of the short message sent by MSG.

Example:

After clearing the sending area, enter at $ hsmssd = 15811011646,10, (Press ENTER) and click "manually send"

After clearing the sending area, enter hellohello (Press ENTER) and click "manually send"

After clicking "send", the receiving area is displayed:

At $ hsmssd = 15811011646,10

OK

Hellohello

$ Hsmssd: OK

(2) read short message content

At $ hsmsrd = (INDEX)

Description: Index is the directory for reading short messages. The directory value is 1 ~ 62 indicates the index Short Message of the read module.

Example:

After clearing the sending area, enter at $ hsmsrd = 3 (Press ENTER) and click "Send manually"

After clicking "send", the receiving area is displayed:

At $ hsmsrd = 3

$ Hsmsrd: 15811045046, <2008/09/11> <>, 0, 0, 0

Thankyou

OK

 

V. lab report

1. describes the features and usage of AT commands.

2. Record the AT command you entered and the result of the receiving area.

3. Explain the instructions you have used to call, answer the phone, and other services.

 

 

 

 

 

 

 


 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.