The AT is AttenTIon, and the instruction set is sent from a Terminal Equipment (ATTE) or a Data Terminal Equipment (DTE) to a Terminal Adapter (TA) or a Data Circuit Terminal (Digital Equipment) (DCE). Through the TA, the TE sends an AT command to control the function of the mobile station (MobileStaTIon, MS) and interact with the GSM network service. Users can control calls, text messages, phone books, data services, faxes, etc. through AT commands.
The AT command must start with "AT" or "at" (the first instruction sent to the module should be capitalized) and end with a carriage return ("CR"). The module's response is usually followed by the format: "Enter", "Line Feed", "Response Content", "Enter", "Wrap". We test it through the serial port debugging assistant SSCOM, open: select the correct COM number (connected to the COM port of the SIM900A module, my computer is COM3), then set the baud rate to 115200, check the send new line (required! Sscom automatically adds the carriage return linefeed feature), then sends the AT to the SIM900A module as shown below:
We sent 2 AT commands, and we saw garbled characters for the first time. This is because the serial port synchronization has not been realized after the module is powered on. After receiving the first data (not necessarily the AT command), the module will automatically implement Serial port synchronization follow-up communication will not be garbled. Because SIM900A has automatic serial port baud rate recognition function (identification range: 1200~115200), our computer (or device) can choose a baud rate (not exceeding the recognition range) to communicate with the module. We chose the fastest 115200. As can be seen from the above figure, we can now communicate with the SIM900A module. We can implement various control of the SIM900A by sending different AT commands. Commonly used AT commands:
1, AT+CPIN? This command is used to query the status of the SIM card, mainly the PIN code. If the command returns +CPIN:READY, it indicates that the SIM card status is normal. If other values ​​are returned, there may be no SIM card.
2, AT+CSQ This command is used to query the signal quality and return the received signal strength of the SIM900A module. If returning +CSQ:30,0, the signal strength is 30 (the maximum effective value is 31). If the signal strength is too low, check if the antenna is connected?
3, AT+COPS? This command is used to query the current operator. The command returns to the operator only after connecting to the network. Otherwise, it returns null. For example, return: +COPS:0,0, "CHINAMOBILE", indicating that the currently selected carrier is China Mobile. . 4. AT+CGMI This command is used to query the module manufacturer. For example, return: SIMCOM_Ltd, indicating that the SIM900A module is manufactured by SIMCOM.
5, AT+CGMM This command is used to query the module model. For example, return: SIMCOM_SIM900A, indicating that the module model is SIM900A.
6, AT+CGSN This command is used to query the product serial number (ie IMEI number). The IMEI number of each module is different.
The uniqueness of the ball, such as the return: 869988012018905, indicating that the product serial number of the module is: 869988012018905.
7, AT+CNUM This command is used to query the local number. It must be queried when the SIM card is in place. For example, return: +CNUM: "", "15902020353", 129, 7, 4, indicating the local number For: 15902020353. In addition, not all SIM cards support this command, and individual SIM cards cannot get their number through this command.
8, ATE1 This command is used to set the echo mode (default is enabled), that is, the module returns the received AT command to the sender completely. Enabling this function is beneficial to debugging the module. If the echo mode is not required to be turned on, the ATE0 instruction can be turned off, so that the received command will not be returned to the sender, which is convenient for program control.
The instruction sent to the module will return the corresponding information and "OK" if the execution is successful. If the execution fails / the instruction is invalid, it will return "ERROR". In addition, remind everyone that all instructions must be sent in ASCII-encoded character format. Do not include Chinese symbols in the instructions. At the same time, many instructions have a query or prompt function, you can query the current settings by the command + "?", and get the setting prompt by the command + "=?".
2 Make/receive callsATE1 is used to set the echo, that is, the module returns the received command to the sending device completely for debugging. ATD, used to dial any phone number, the format is: ATD+number+;, the end of the ';' must be added, otherwise it can not be successfully dialed, such as sending: ATD10086;, you can dial 10086. ATA, used to answer the phone, when receiving the call, send the module: ATA, you can answer the call. ATH, used to hang up the phone, in order to end the ongoing call, just send the module: ATH, you can hang up. AT+COLP is used to set the called number display. Here we send the called number display by sending: AT+COLP=1. When the call is successfully dialed (the called party answers the call), the module will return the called number. AT+CLIP is used to set the caller ID. By sending: AT+CLIP=1, you can set the caller ID function. When the module receives the call, it will return the caller ID. AT+VTS=*, generates DTMF tones. This command is only valid during the call and is used to send DTMF tones to the other party. For example, when dialing 10086, we can send: AT+VTS=1, analog send button 1.
After introducing a few AT commands to be used in this section, we started to implement the functionality of this section, but there are prerequisites: that is, the module must be powered on and the carrier is found. By sending: AT+COPS? If you return: +COPS:0,0, "CHINAMOBILE", you can start the following test. 2.1 Calling
In this section, we will use the SIM900A module to dial 10086 and make a call charge inquiry. First send: ATE1, set the echo, and then send: AT+COLP=1, set the called number display. As shown in the figure below:
Then, we send: ATD10086; , dial 10086, after the connection, the SIM900A module returns:
+COLP: "10086", 129, "", "", at this time, after a bunch of words are finished, we send: AT+VTS=1, you can query the local phone number. Finally, by sending: ATH, hang up, end the call.
After checking the credit balance, we have completed a dial-up, DTMF tone, and end call. It's very simple, so using the SIM900A module to make a call is really a piece of cake.
2.2 Answering the callFirst, we send: AT+CLIP=1, turn on the caller ID feature, then we use the other phone/phone to dial the SIM card number on the module. Then, when receiving the incoming call, the module will output the ringtone through the headset, and can receive the caller number on the serial port, such as: +CLIP: "15124532672", 161, "", "ailin", 0, indicating the current connection The entry number is . At this point, we send: ATA, you can answer the call and make a call. When the other party hangs up, the SIM900A module will return: NOCARRIER and end the call. Of course, we can also end the call by sending: ATH.
2.3 Reading and sending SMS messagesAT+CNMI, used to set new message indications. Send: AT+CNMI=2,1, set a new message prompt, when a new message is received, and the SIM card is not full, the SIM900A module will return data to the serial port, such as: +CMTI: "SM", 2, indicating When a new message is received, it is stored in the location 2 of the SIM card; if it is full, it will not be prompted, and it can be solved by deleting the SMS. AT+CMGF, used to set the short message mode, SIM900A supports two modes, PDU mode and text (TEXT) mode, and send: AT+CMGF=1, it can be set to text mode. AT+CSCS is used to set the TE character set. The default is the GSM7 default character set. When sending a plain English message, send: AT+CSCS=“GSMâ€, set to the default character set. When sending Chinese and English text messages, you need to send: AT+CSCS=“UCS2â€, set to 16-bit universal 8-byte multiple coded character set. AT+CSMP is used to set the short message text mode parameter. When using UCS2 to send Chinese SMS, you need to send: AT+CSMP=17,167,2,25, set the text mode parameter. AT+CMGR is used to read short messages. For example, if you send: AT+CMGR=1, you can read the SMS stored in the location 1 of the SIM card. AT+CMGS is used to send text messages. Under the “GSM†character set, it can send up to 180 bytes of English characters. Under the “UCS2†character set, it can send up to 70 Chinese characters (including characters/numbers). This instruction is described in detail later. AT+CPMS, used to query/set the preferred message memory by sending: AT+CPMS? You can query how many SMS storages the current SIM card supports and how many SMS messages are currently stored. For example, return: +CPMS: User manual "SM", 1, 50, "SM", 1, 50, "SM", 1, 50, which means that the current SIM card stores a maximum of 50 messages, and there is already 1 stored information. .
2.4 Reading of English text messagesIn this section, we will use another mobile phone to send an English text message to the SIM900A module, and then read the English text message received by the module.
First, we send: AT+CMGF=1, set to text mode, then send: AT+CSCS=“GSMâ€, set the GSM character set, then send: AT+CNMI=2,1, set a new message prompt. Next, we use another mobile phone to send an English text message "SIM900AModule" to our module (if you don't know the module number, you can send: AT+CNUM, query module number). After receiving the SMS, the module will prompt for: +CMTI: "SM", 2, indicating that a new SMS has been received and stored in SIM card location 2. Then, we can send the message by sending AT+CMGR=2.
Note: At some point, the module receives a text message but does not send a prompt. The reason is that the module has limited storage capacity and cannot continue to store text messages. Solution: You can delete some SMS messages, for example, send: AT+CMGD=1, delete all SMS commands.
2.5 Sending English text messagesIn this section, we will use the SIM900A module to send an English text message to the specified mobile number. Here, we use the AT+CMGS command to send text messages. When sending all English/digital text messages, we first set them to: “GSM†character set (AT+CSCS=“GSMâ€), text mode (AT+CMGF=1) Suppose we want to give the mobile number:. 15124532672, send a text message, then send: AT+CMGS=“15124532672â€, then the module returns: â€, at this time we input the content we need to send: SIM900A TEST, note that this can be done without sending a carriage return. After the content is sent, it will be sent separately in hexadecimal (HEX) format: 1A (ie 0X1A), then a short message transmission can be initiated. Note 1: 0X1A, the key value of “CTRL+Zâ€, is used to tell SIM900A to perform the send operation. In addition, you can also send: 0X1B, the key value of “ESCâ€, used to tell SIM900A to cancel this operation and not to send. Wait a moment, after the message is successfully sent, the module returns a confirmation message such as: +CMGS: 156, indicating that the short message is successfully sent, where 156 is the internal SMS counter of the module, and generally ignores it.
2.6 Sending Chinese and English text messagesIn this section, we will use the SIM900A module to send a Chinese and English text message to the specified mobile number. Similarly, we use the AT+CMGS command to send Chinese and English text messages. Or send in text mode, the sending steps are as follows: First, send: AT+CMGF=1, set to text mode. Then, send: AT+CSMP=17,167,2,25, set the text mode parameters. Finally send: AT+CSCS=“UCS2â€, set to UCS2 coded character set. At this point, we can send the AT+CMGS command to send the Chinese and English text messages, but since the UCS2 character set is used, all characters/numbers/Chinese characters must use UNICODE encoding. Suppose we want to give the mobile phone number: 15124532672, send a Chinese and English text message, the content is "SIM900A Chinese and English SMS sending test". We first need to use: Chinese character UNICODE interchange tool .exe, this software converts the number and the content of the transmission into a UNICODE string (you need to manually remove the space), get:
15124532672 Converted UNICODE string (after removing spaces)
For .SIM900A. Chinese and English SMS test, the converted UNICODE string is:
00530049004D00390030003000414E2D82F1658777ED4FE153D190016D4B8BD5, then, send: AT+CMGS=“00310035003100320034003500330032003600370032â€, this instruction, then the module returns: †At this point we enter what we need to send:
00530049004D00390030003000414E2D82F1658777ED4FE153D190016D4B8BD5, Note, do not send a carriage return here. After sending the content, it will be sent separately in hexadecimal (HEX) format (without adding a carriage return): 1A (ie 0X1A), initiate a text message transmission.
As a mobile multi-purpose platform, tablet computers also provide many possibilities for mobile teaching. The touch-based learning & entertainment teaching platform allows children to efficiently improve their academic performance in a relaxed and pleasant atmosphere. Such tablet computers generally integrate two learning sections of various courses and systematic learning functions. Generally, it includes multi-disciplinary high-quality teaching resources. The education tablet has the following main functions: it has the functions of touch screen input, text editing, picture editing, data storage, data management, wired and wireless Internet access that ordinary tablet computers have; Management functions, search methods support manual search, query by keyword, query by time; text and pictures can be scanned and converted into documents to save.
Education Tablet,learning tablet,leaning machine,New learning tablet
Jingjiang Gisen Technology Co.,Ltd , https://www.jsgisentec.com