AT programming FAQ
1. How to establish a communication link 2 with GSM Modem. No normal communication with GSM MODEM or always appears on the emulant terminal. How can I know the error code 4. After sending a short message, receive an error message CMS ERROR 5125. After sending a short message, receive an error message CMS Error 5136. After sending a short message, receive an error message CMS Error 5147. After sending a short message, receive an error message CMS ERROR 5158. How can I know that the short message you sent has been delivered to the destination number 9. How to send Chinese short message 10. How to build a voice call 11. How to build a data call 12. How to display the calling phone number 13 when GSM Modem makes a call. When the GSM Modem is called, how to discriminate the calling initiated by the calling is voice, data or fax call 14. How to automatically answer or cannot answer 15 when GSM Modem makes it called. How to read or write short message 1 without passing the SIM card 1. How to establish a communication with GSM Modem You can use a terminal emulation software such as Hyper Terminal or PCOMM under Windows to connect your computer's serial port with GSM Modem serial port. 2. Cannot perform normal communication with GSM MODEM or always appear on the simulation terminal to check if your serial port is guaranteed to be properly connected, the serial port leading of the computer serial port and GSM Modem should be one or one. The GSM MODEM and the simulation terminal should set the same communication rate. However, when you use GSM MODEM in the first time, set it to the communication rate of 9600bps, 8-bit data bit, no longer bit, 1 bit stop bit. 3. If you want to get the error code number after an error, you need to set the GSM Modem as follows: AT CMEE = 1 4. After sending a short message, receive an error message CMS Error 512 indicates that your GSM Modem is sent to a short message while it receives a new short message, and the short message is rejected, you need to resend this short message. 5. After sending a short message, you receive an error message CMS Error 513 You have encountered one of the following questions: a) Your GSM Modem lost the wireless link connection; b) within 28 seconds after sending a short message, Your GSM Modem does not receive a short message center delivery received acknowledgment cmgs:
8. How can I know that the short message you sent has been delivered to the destination number a) When you send a short message in your text format, your GSM Modem must make the following settings: AT CSMP = 49,
12. When GSM MODEM is called called, how to display the calling phone number sets your GSM Modem as follows: AT Clip = 1 13. When GSM Modem makes a call, how to discriminate the calling initiated by the call, data or fax calls are set as follows: AT CRC = 1 14. When GSM MODEM is called, how to automatically answer or automatically answer if you want your GSM Modem to answer, set your GSM Modem as follows: ATS0 =
Q: What is the function of STK? How does the Falcom A2D series? How to use STK? Thank you .a: STK (Sim Tool Kit) card pre-stores some of the services available to some of the services available, such as the short message center number , Information service code, etc., currently China Mobile's upcoming mobile banking is required to support. Use the STK card phone on the screen to display menus that are not available in the normal SIM card, such as "Global Service". By calling this menu, you can go to the next level and in the next level menu. The user can operate a hierarchical link similar to the Internet page by selecting a number of mobile information services such as mobile e-commerce such as news stock information inquiry, bank transfer stock commission. STK (Sim Tool Kit) card is provided by a SIM card manufacturer. Q: How do STK programs develop, tools and help documents? A: Current China Mobile Network STK (SIM TOOL KIT) card is provided by SIM card manufacturers, responsible for providing STK development systems, responsible for STK programming and production, and guarantee messages The advanced nature of the encryption method and the security application layer protocol format are network operations, service providers, SIM card manufacturers, and short message manufacturers. Q: When SMS is sent, how is it possible to automatically judge the language of the mobile phone, send a Chinese SMS to the Chinese, English SMS to English machine .a: When sending a short message, it is impossible to automatically judge the language of the mobile phone, must be accepted in advance. The language that the phone can support, then select the language type encoding. Taking the cell broadcast as an example, whether the mobile phone in the English information community will be received at the same time, and the mobile phone that does not support the language of the language will be garbled. Q: GSM MODEM has an API or other information that provides SMS programming A: GSM MODEM usage and development information, please refer to A2D-1. For Falcoma2D-A (B, C) and A2D-3 we provide supporting development tools, please refer to the relevant category of information. Q: How is the format of SMS? A: Please download the Falcom A2D User Manual on our website About the short message communication related instructions. Q: I bought a Nokia Data Suite wants to implement the Chinese through it. SMS but does not support "AT * C" "send" How to handle? A: Do you know if "AT * C" you mentioned in GSM specification 07.07 and 07.05? Q: Where can I get GSM specification 07.07 and 07.05? Thank you! A: You can download the relevant document on our website, with a detailed description of the GSM specification AT directive. Or you can find it on the official website of ETSI.
Q: I also sent a message with the data suite (Nokia DataSuite2.0), but only English, can not send Chinese. What should I do? A: The coding format of the Chinese and English short message is different. Q: I can determine that I am using it. Chinese, how do you not make? If you want to do Chinese, what do you say? Email: zhangqing888@sina.com A: "Nokia DataSuite2.0" data format and definition We don't know. Falcom A2D can Implement Chinese SMS. Q: How to send a command through a super connection? I want to send Chinese through the super connection (mobile phone does not support Chinese transmission), how should I write a command format? I hope the prawn guidance .at cmgf = 0 ok At cmgs = " 6831050034192242308007400650073007 "How to solve? Help prawn! A: Assumption There is a message AB to send, then: AT CMGS = 16> 0891 (short message center number) 11000d91 (destination number) 00f2a7024121 (end) Q: RE : AT cmgs How to send a command? A: Set at cmgf = 0 first, then AT cmgs = "Lehgth" "Length" represents the sending byte length Short message center number and destination number contains in which Chinese use Unicode encoding, such as I don't understand, I will contact me to send me Q: I just encode unicode, but in the PDU format, I can't display it on the other phone. A: Falcom A2D can implement Chinese SMS. Q: Please ask PDU data format and SMS-AT command Sending data format A: "PDU Data Format" See GSM03.40 and GSM03.41, "Send Data Format in SMS-AT Command" See GSM07.05 and GSM07.07. The above specification can be http: // www . Q: Whether Falcom's A2D series products can be compatible with WAP, GPRS? A: WAP is a simplified browser protocol, and there is no relationship with the transfer pathway as long as you have WAP or similar browser on your terminal. You can support WAP, so Falcom's A2D is available as long as you have built a data link. Supported A2D will be launched in the third quarter of this year, and the existing core is supported now. Q: Whether the A2D kernel supports WAP, whether it is directly built-in WAP browser, if yes, whether the A2D is equal to the WAP phone .A: A2D itself does not have a WAP browser, you must join the WAP browser and the display and keyboard in A2D to become Mobile phone Q: Your company has the agent of GPS Receiver and Is the relevant Chinese information about A2D-GPS? A: Our company does not act in a separate GPS, but I can recommend this agent to you. A2D-GPS currently has no Chinese information, sorry Q: Can you send me a quotation table? Email: Seagate @ 163. Net hopes to get your company's latest agent products and company products. Thank you! A: Please fill in the user information under 'Contacts'. We will email you Q: NOKIA mobile phone NDS send and receiving short message is also commanded with an AT command? Is there a standard of mobile phone and computer communication? I also want to know the norms of PC and mobile communication. Which is the communication specification used by the mobile phone when TE and ME (without TA) are connected? A: What is the representative of NDS? Please refer to this website A2DMAN.PDF. Please refer to the ETSI related specification. http://www.etsi.org Q: I have viewed ETSI's specifications for GSM, such as GSM07.01 GSM 07.07 GSM 07.05, etc., but still not understanding, in this special request, special specification involving mobile programming issues A: Please contact our company directly about the development of FALCOM GSM products.
Other products We don't understand any further answers, please forgive me. Welcome all the colleagues to provide information and advice. Q: Can I find any papers Published on IEEE and how? Thanks.a: http://www.ieee.org/ Q: How does ModeM set an automatic answer? Ask the AT command set? A: ATS0 = 1 q: What instructions can be used to send the short message received by the phone not to the data terminal directly to the data terminal (such as a computer) inside the phone. If you are widely used, it will cause damage to the flash or SIM card EEPROM of the short message. What AT instruction can make the short message received directly from the serial port without storage? A: Please download the simcn.doc file q: I use the PDU mode, 8bit encoding characters, send English characters normal, but send Chinese characters to display on the phone? How can SMS encodes the Chinese character can be identified by the phone and display it? A: Please refer to this forum. Q: But still can't solve the problem, how to encode to make the ordinary mobile phone after receiving it? A: Does your phone support Chinese? Q: RE: AT cmgs How to send a command? I just encode Unicode, but under the PDU format, I can display it on the other party's mobile phone A: Falcom A2D can implement Chinese SMS. Q: Ask the content: When I receive Chinese text messages, I received Unicode original code, but its body is like a normal ASC code, such as: I sent "one one one" received It is "4e004EOO4E004E", and there is still "00" not; when I sent "one one one B", I received "4E004E004E004E", please ask why? A: But this is not a Unicode original code, it is your own code! Q: Ask, GPRS is abbreviated. A: The full name of GPRS is "General Packet Radio Service", which is a set of standards developed by ETSI organizations to implement mobile packet data services. · Implementation: Add group data service devices on the GSM network, and upgrade the GSM wireless network device, providing packet data services using existing GSM wireless overrides. · Features: · Transmission speed is fast: up to 171Kbps (initial 9-50kHz) · Flexible support multiple data applications · Network access speed · Long-term online connection · Billing is more reasonable (by data traffic bills) · Efficient use of network resources, reduce communication costs, using existing wireless network coverage, improve network construction speed, reduce the development trend of construction costs, GPRS, to meet the development trend of communication network, for the GSM network to the third generation evolution and lay the foundation · progress : Commercial System Plan 2000 launched Q: Use ISDN adapter to send short messages to the phone with PC serial port, ISDN adapter makes the mobile phone receive short messages can be implemented? A: As long as your ISDN adapter can communicate with the short message center, you can send a short message "normal communication with the short message center" to the ISDN's adapter to send a standard Hyra, and the short message center will be accepted. Also refer to the Short Message Center Authorization, the Short Message Center gives a set of standard instructions that you define. Normal communication with the short message center "means to send a standard Hygram command to the ISDN adapter, and the short message center will be accepted. Always refer to the Short Message Center Authorization, Short Message Center gives a set of standard instructions.
The AT command can be q: A2D devices to send SMS small use because the AT is transmitted from the MODEM compatible with the AT instruction. A: A2D is GSM MODEM, which is based on the system application based on GSM wireless network. Q: Whether the A2D module supports 16-bit short message transmission content: Thank you! A: Falcom A2D module supports 16-bit short message transmission. Please contact us for specific applications. Q: RE: How to send broadcast messages with FALCOM? A: Falcom GSM Modem / Module fully complies with GSM specification, via FTA certification. Sending a broadcast message should require a short message center to have this feature. Q: RE: How do I send SMS in PDU format? A: Please contact us by Falcom GSM Modem / Module, please contact us or see the information listed on this website. Conversion Unicode into Chinese code
The following is a code that converts Unicode into Chinese. function TfrmMain.ReadHex (AString: string): integer; beginResult: = StrToInt ( '$' AString) end; function TfrmMain.UnicodeToAnsi (Unicode: string): string; vars: string; i: integer; j, k: string [2]; begini: = 1; s: = '; while ij: = Copy (Unicode, i 2, 2); K: = Copy (Unicode, I, 2); i: = i 4; s : = S Char (Readhex (j)) Char (Readhex (k)); END; if S <> '' Thes: = WideChartostring (PWIDECHARTOSTRING (PWIDECHAR (S # 0 # 0 # 0 # 0)) ELSE S: = ''; Result: = S; end;
How to translate Chinese characters into Unicode in VB
A. Sending Chinese Example: There are two ways to send Chinese, one is a PDU, one is ucs2 text 1.pdu method: AT cmgf = 0at cmgs = 24> 0891683108100005011000B8131080000007596484E30 information content is SET Chen Feng interpretation: This string Biographic SET Chen Feng five characters, using Unicode encoding. 0891 fixed format does not move, 683108100005F0 is the short message center number, 11 fixed format does not move on behalf of the PDU format, 00 represents the short message, 0B81 fixed format, 3109018759f1 as a destination number, 00 fixed format does not move the representative is short Message, 08 represents 8-bit Unicode encoding (in Chinese must use Unicode encoding), F0 to F3 is 7 encoding, F4 to F7 is 8-bit encoded A7 represents this short message in the short message center storage time is 24 hours, the maximum ff is 135 Zhou, 0A representatives have 10 bytes (with 1 byte of 01, 2 01, "Pushing) 0065 is the Unicode encoding, 0073 is the Unicode encoding of E, 0074 is the Unicode encoding of T, 9648 is Chen Unicode encoding, 4E30 is a full Unicode encoding 0A, following the message section you want, all of which use Unicode encoding. Unicode's encoded conversion can be called directly in VB or VC. 24 is 14 in AT CMGS = 24, plus the message length 10. 2. OSC2 text method AT cmgf = 1t CSMP = ??, ??, ??, 8 (question mark represents yourself as needed Choose the appropriate parameters) AT cmgs = mobile number (1390pqRabCD)> 00650073007496484E30 Information content to send Chinese short messages when you use UCS2 text, first turn Chinese to Unicode encoding, then Chinese short message Unicode encoding Send with text. B. Programming example: private submmand1_click () 'uses COM3. '9600 baud, no parity, 8-bit data, a stop bit. Mscomm1.Settings = "9600, n, 8, 1" MSCOMM1.Handshaking = "Open port. 'Mscomm1.portopen = false' mscomm1.portopen = true 'Sends the AT command to the modem.
Mscomm1.output = "at" mscomm1.output = chr (13) mscomm1.output = "at cmgf = 1" mscomm1.output = chr (13) mscomm1.output = "at cmgs =" mscomm1.output = CHR ( 34) MScomm1.output = "13901237885" mscomm1.output = CHR (34) mscomm1.output = chr (13) mscomm1.output = "test ok" mscomm1.output = chr (26) end sub private submmand3_click () MSCOMM1. CommPort = 2MSComm1.PortOpen = TrueEnd Sub // UNICODE conversion to Chinese Public Function Unicode2AscII (ByVal s As String) On Error Resume NextDim i As IntegerDim r As StringFor i = 1 to Len (s) Step 4r = r ChrB ( "& H "& MID (S, I 2, 2)) & chrb (" & H "& MID (S, I, 2)) NextUNICode2ASCII = Rend function // converts Chinese to Unicode (ANSI: String): String Vars: string; i: integer; j, k: string [2]; A: Array [1..1000] of char; begins: = '; stringtowidechar (ANSI, @ (A [1]), 500) ; i: = 1; While ((a [i] <> # 0) or (a [i 1] <> # 0)) DO Beginj: = INTTOHEX (Integer (A [i]), 2); K : = INTTOHEX (Integer (A [i 1]), 2); s: = S K J; I: = I 2; End; Result: = S; END; remote automatic meter reading based on serial communication System implementation
Summary: The scheme of the remote meter reading system, the composition, hardware configuration, software design, working principle, function, and technical performance are discussed. The system collects and organizes data by the lower machine (MCU) and the wireless transmission and receiving module (PTR2000), and the data is collected by the serial port by the MODEM module and the host computer, water, electricity, gas company collects data through the host computer (PC), and realizes remote wireless automatic automatic. The function of the meter reading. Introduction In people's daily life, water, electricity, gas is an essential life guarantee, but for water, electricity, gas supply companies, each month, the three table reading of each user is very heavy. Work, you need to put a lot of manpower and material resources. Many companies are now studying automatic meter reading systems, but they usually use a telephone line or a special line to perform communication with the host computer, and the cost is relatively high. See References for reference [3] [6] [7]. In this case, the author designed a remote wireless automatic meter reading system. Automatic meter reading system, referred to as ARMS (Automatic Reading Meter System), is supplied to water, electricity, and gas departments will be installed in the amount of water, electricity, and gauge recordings recorded by the user. Summary, transmission, and computer system The business sector replaces the artificial meter reading and a series of subsequent works. The system's wireless communication is a GSM short message service, and its implementation is the first step towards home automation and helps to improve the modernization of hydropower system management. The system has two main features: one of its system data collection points, thousands of tens of thousands of data; its second system is a widely covered communication network, and the collection point has dispersion. For the system requirements, on the one hand, low, economic affordable, and on the other hand, the collection of data should be accurate and timely, and there must be a certain environmental adaptability and anti-interference ability. With the development of modern electronic technology, communication technology and computer technology have rapidly develop, and the combination of both has further evolved many new communication methods and communication systems, providing possibilities for ARMS implementation. This avoids the disadvantages from the copy table meter reading, the province has the embarrassing problem of the on-site meter reading, and there is a great convenience of the company and users, with good market prospects. Especially in large and medium cities, the system has a wide range of promotional value. 1. Composition and working principle system of the system: data acquisition part; data transmission, wireless communication section; data reception, processing section. Working principle: The data acquisition device first collects three table readings through the sensor, and stores the acquired data into the single chip (AT89C2051); the single-chip PTR2000 (sending data), the PTR2000 (receiving end) of the user concentrator through the wireless communication module Receive the transmitted data, the lower computer mainly completes the function of collecting data, storing and hosting the same host, which is connected to the GSM / MODEM, with the public network (GSM), through telecommunications public network transmission data. With the construction and development of GSM mobile communication network, mobile communication network is increasingly complex, and the coverage area is also increasingly wide. Therefore, the transmission of data by the GSM mobile communication network has also become a new data transmission means. GSM / MODEM sends data via a short message service of GSM. PC (host machine) is generally located in the company's business office, which is responsible for the entire system management, it collects data, then organizes, stores, displays the received data, and calculates the cost of each user needs to pay. It is also advantageous to print the user's usage curve, which is advantageous to implement the seasonal electricity price, the time-time electricity price, and use economic lever to achieve peaks, which can save energy for the country. The composition of the system is shown in Figure 1: Economic Analysis: The maximum capacity design of this system is 1,000.
It is specified that a piece of data is collected every 100ms, and 600 data can be collected a minute. Ordinary meter is 2400 rpm, and 20 pulses in 20 pulses per acquisition device are acquired. The data collected every ten minutes accounts up to 1 byte. Each purchase data is collected by increment. The increment of three tables accounts up to 3 bytes, so 600 data accounts up to 2k bytes, each The minute is collected, the collected data is stored in the RAM of the AT89C51, organizes, packaged, one time every ten minutes. Since the amount of electricity gas at night is relatively small, the packet sent at night is a space, which is wasting the time to occupy the communication channel. Therefore, in the software design, the percentage transmission is used, that is, the data acquired by each collected must be transmitted, and the peak period of up to 12 hours a day is sent once every ten minutes. Based on the GSM short message service is mainly determined by the processing capability of the short message service center and the carrying capacity of the wireless signaling channel, each short message is limited to 140 eight groups (7-bit encoding, 160 characters) No more than 140 bytes. 3K data is collected every ten minutes, and 22 short messages need to be sent, and approximately 50,000 pieces are sent each month. According to Xi'an SMS fees, 2-50,000 / month's cost is 2000 yuan / month. Average 2 yuan / month. So the system is very economical. Moreover, the host computer collects the data every ten minutes, so that the user can be acquired in time in the peak period of time, and print it out. 2. Hardware configuration 2.1 data acquisition, sending part of the water meter is to convert the raw water meter count gear pointer into a band magnetic pointer, and then use the sensor to perform data acquisition; the gauge must be used with signal output; the electric meter must use pulse electronics The power meter, the device for the electric meter pulse output is optocoupler, has a good isolation. The data acquisition device is mounted with the user's electric meter, in order to prevent the user's sudden power outage, the acquisition device must be mounted on the front end of the air switch. The meter can be measured by counting pulses, and the counting pulse of the electrical collection head collects the meter, the dial is transferred, and the photoelectric acquisition hair has a pulse, and the P1.0 of the input P1 port is stored by the AT89C2051. Then send data through the PTR2000 module. The PTR2000 module is ultra-small, ultra-low power consumption, high rate 19.2K wireless transceiver MODEM. Using the most advanced European "Bluetooth Technology" application of all digital technology, it is combined by a single IC, and the receiving emission is 1, the operating frequency band is 433-434MHz, the air transmission data rate is 19.2kbps, the operating voltage is 2.7V -5.25V, using FSK modulation, strong anti-interference ability, standard DIP pin spacing, more suitable for embedded devices. When the PTR2000's TXEN pin is high, it is in a launch state; when the TXEN pin is low, it is in the reception state. When designing the hardware, TXEN is connected to the P1.1 foot of the AT89C2051, and the PTR2000 is controlled by software. The schematic diagram of the circuit is shown in Figure 2. Figure 2 Data acquisition, transmission device circuit schematic 2.2 data reception and remote wireless communication PTR2000 receive data and stores the AT89C51, the ROM and RAM are used to store programs and data, respectively, and the data is stored in the corresponding period of storage. Inside, the interval interval is 10 minutes. The data of the same period of different dates is only accumulated in the corresponding storage area. The acquisition device has a maintenance-free power supply to ensure that the data and reception are possible after power failure, and execute the command of the host computer. The AT89C51 implements wireless communication with the host computer via the serial port with the wireless MODEM. GSM (GLobal System for Mobile Communication) is the most mature, perfect, and widely used system based on time division multi-site mobile technology.
my country has currently built a national GSM digital honeycomb mobile communication network, which is the main way of my country's public land mobile communication network. GSM's short message service SMS (Short Message Service) is the main telecom service provided by the GSM digital cellular mobile communication network as the voice transmission and fax, which is transmitted through the wireless control channel, which is unique to the GSM communication network. The business center completes the storage and forwarding function, it does not have to set up the connection, directly sends the information you want to send to the short message service center, and then send it to the final bandkeeration by the short message service center. This is adapted to send each collected data to the monitor center. The control channel for transmitting a short message service is a dedicated control channel (DCCH). See the reference [6] for details. The short message service allows the network to know if the called party has received a short message. If the transfer fails, the called party does not answer the exact message, and the network will retain the message transmitted. Once the network discovers the called party to be called At the time, the message can be researched to ensure that the called party can be received. Therefore, the short message service is a major telecom service in the GSM network, and its transmission is reliable. In summary, this system uses GSM's short message service to implement remote wireless data transfer is feasible. The emergence of GSM modem (GSM / MODEM) has changed the traditional communication means of voice-oriented communication, opening GSM network data communication and its application. It provides an RS232 data interface that uses AT Heith's instructions that meet ETSI standard GSM0707 and GSM0705. The GSM / MODEM of this system uses the GSM / MODEM module of French Wavecom. See the reference [5] circuit schematic diagram Figure 3 Figure 3 Data receiving, wireless communication circuit schematic Figure 2.3 Data processing section The host machine transmits data transmitted by the lower computer through the DDE interface to the Excel worksheet, defined in Excel Report format, metering format, and save files in template format, after the meter table is completed, the system can automatically fill in the corresponding specified cell, automatically calculated by Excel, converted into KWH values and calculates the fees. Print on the upper computer, display the user's water, electricity, tampuring fees, and various reports and load curves. When the user load is over-limited, the alarm signal is issued, and the remote command is decided to make a power-off process for the user according to the company's provisions. It is also possible to calculate the cost of each period, providing a reliable guarantee for the implementation of a total charges for the power sector. Moreover, in order to ensure the security of data storage, the host machine (PC) uses a dual-hard disk to perform data backup, the system has a backup power supply, and it can maintain a normal working state after power outage. The reserve power supply ensures that the system works normally more than 36 hours in the full load working state. If the power failure is longer, the system will not perform data acquisition, but the original data will not be lost, and the power is required to re-verify the data, update the settings The data stored in the middle of the concentrator. 3. Software Design Since the system uses a point to multi-point two-way data transmission, each table has its own address code. The host computer can query the lower computer, and the lower computer can also send data to the host computer. The purpose of this system is to achieve a multi-machine (upper machine) communication control, and its communication software is mainly divided into two parts: the remote communication software of the host computer and the lower computer; the single-chip microcomputer and the string of GSM / MODEM Wire communication software. See Refigui [2] for details. The key to programming is the accuracy of remote communication between the next time. In the programming, the communication protocol is used, and the read watch instruction and address code are sent by the host computer, allowing each lower computer to pass the recorded data, and perform the verification to ensure the correctness of the data. Each lower computer has a different address code. When the upper machine sends an address code and meter reading command to all the next machine, all the lower machine receives the address code, and is the same as the same address code. If you don't have the same, you will not receive other commands.