Joke Collection Website - Blessing messages - What to do when the terminal identification code of the card acceptance machine is less than 8 digits

What to do when the terminal identification code of the card acceptance machine is less than 8 digits

1. How to establish communication with GSM MODEM

2. Cannot communicate normally with GSM MODEM or garbled characters always appear on the emulation terminal

3. How to know the error code

4. After sending the short message, I received the error message CMS ERROR 512

5. After sending the short message, I received the error message CMS ERROR 513

6. After sending the short message, I received the error message CMS ERROR 514

7. After sending the short message, I received the error message CMS ERROR 515

8. How to know that the short message you sent has been delivered to the destination number

9. How to send Chinese short messages

10. How to set up a voice call

11. How to establish a data call

12. How to display the calling phone number when GSM MODEM is the called party

13. When GSM MODEM is the called party, how to determine whether the calling party initiates a voice, data or fax call

14. When GSM MODEM is called, how to make it answer automatically or not?

15. How to read or write short messages directly without using the SIM card

1. How to establish communication with GSM MODEM

You can use terminal emulation software such as HyperTerminal or Pcomm under Windows to directly connect the serial port of the computer to the serial port of the GSM MODEM with a cable.

2. Cannot communicate normally with GSM MODEM or garbled characters always appear on the emulation terminal

Check whether your serial port ensures normal connection. The serial port leads of the computer and the serial port leads of the GSM MODEM should be in one-to-one correspondence. The GSM MODEM and emulation terminal should be set to the same communication rate.

But when you use GSM MODEM for the first time, please set the communication rate on the emulation terminal to 9600bps, 8 data bits, no parity bit, and 1 stop bit.

3. If you want to get the error code number after an error occurs, you need to set the GSM Modem as follows:

AT CMEE=1

4. After sending the short message, you receive the error message CMS ERROR 512

It means that your GSM MODEM received a new short message while sending the short message, and the sending of the short message was rejected. You need to resend this message. Short message.

5. After sending the short message, you received the error message CMS ERROR 513

You encountered one of the following problems:

a) Your GSM MODEM lost the wireless link connection;

b) Within 28 seconds after sending the short message, your GSM MODEM did not receive the receipt confirmation CMGS: from the short message center;

c ) Within 42 seconds after sending a request to establish a control channel command for sending short messages, your GSM MODEM did not receive a confirmation from the base station>.

6. After sending a short message, you received the error message CMS ERROR 514

You encountered one of the following problems:

a) The number of the short message center you set is wrong ;

b) The destination number to which the short message will be sent is wrong;

c) The short message you sent was rejected by the short message center (generally the destination number does not exist or the destination number is disabled).

7. After sending the short message, an error message CMS ERROR 515 was received

If your GSM MODEM accepts new commands during initialization or during command execution, this error will occur.

You must wait until initialization is complete or the instruction is executed.

8. How to know that the short message you sent has been delivered to the destination number

a) Send in text format

When you send short message in text format, your GSM MODEM must do The following settings:

at csmp=49, 〈X〉, 〈X〉, 〈X〉

at cnmi=〈X〉, 〈X〉, 〈X〉, 1 , 〈X〉

〈X〉 represents the appropriate parameters you choose according to your needs.

After you send the short message, you will receive one of the following two confirmations from the SMS center:

CDS: 〈X〉, 〈sequence number〉 , "telephone number", "sending time", "receiving time", 0

or:

CDS: 〈X〉, 〈sequence number〉, "telephone number", " "Sending time", "receiving time", 48

The last number in the confirmation represents the transmission status of this short message. (0 means the destination number has been delivered, 48 means it is impossible to deliver the destination number)

b) Send in PDU format

When you send a short message in PDU format, Your GSM MODEM must make the following settings:

at cnmi=〈X〉,〈X〉,〈X〉,1,〈X〉

〈X〉 means according to your Requires the appropriate parameters of your choice.

In the short message in PDU format you want to send, you must set the first byte after the short message center number to 31

After sending the short message, You will receive the following confirmation from the short message center:

CDS: 00

Note: In the confirmation received in PDU format , the sequence number and the transmission status flag exist in hexadecimal numbers. You can directly convert them into decimal numbers without inverting them and then converting them.

9. How to send Chinese short messages

If you use the existing GSM MODEM to send Chinese short messages, you must first convert the Chinese short messages to be sent into 16-bit Unicode encoding.

A) Sending in text format

When you send Unicode-encoded Chinese short messages in text format, the settings your GSM MODEM must make:

at csmp=〈X〉,〈X〉,〈X〉,8

〈X〉 represents the appropriate parameters you choose according to your needs.

Then you can send the converted Unicode encoded Chinese short message according to the method of sending ordinary text short messages.

B) Send in PDU mode

You only need to set the second byte after the destination number string to 08 in your short message in PDU format.

The converted Unicode encoded Chinese short message is sent together as the sending content in the PDU.

10. How to establish a voice call

Send the command ATD to the serial port of the GSM MODEM; must confirm that the phone number is a voice number and not a fax or data number.

11. How to establish a data call

First set your GSM MODEM as follows:

at ipr=9600

at ifc=2, 2

at cbst=0, 0, 1

Send the command ATD to the serial port of GSM MODEM

You must confirm that the phone number is a data number and It is not a fax or voice number, and you must confirm that your SIM card has activated data communication service.

12. How to display the calling phone number when GSM MODEM is used as the called party

Set your GSM MODEM as follows:

at clip=1

13 . When a GSM MODEM is used as the called party, how to determine whether the calling party initiates a voice, data or fax call?

Set your GSM MODEM as follows:

at crc=1

p>

14. When a GSM MODEM is called, how to make it answer automatically or not?

If you want your GSM MODEM to answer automatically, set your GSM MODEM as follows:

ats0=〈N〉 N is an integer representing the number of times the GSM MODEM rings, that is, the GSM MODEM will automatically answer after N rings.

If you want your GSM MODEM not to answer automatically, set your GSM MODEM as follows:

ats0=0

15. How to read or write short messages directly without using the SIM card

Because the SIM card only has 10,000 to 100,000 reading and writing times and storage space for 10-15 short messages, it also involves short messages on the SIM card. Reading and writing messages takes a certain amount of time to complete. These factors have affected many applications, which require a large amount of data exchange through the GSM network. In order to ensure the smooth progress of the process, the SIM card must complete a large number of read, write and delete operations. The life cycle of the SIM card will soon be reached. Furthermore, it takes more time for the SIM card to complete these tasks than the outside world requires. In order to solve these problems, it is necessary to make some software settings on the terminal so that short messages are not read and written through the SIM card.

The following description describes how to use this method to exchange data between the Falcom A2 series and the data terminal MT4002 without passing the SIM card. This method can also be used between two MT4002.

a) The RTS signal from the terminal on the serial port can be used to indicate whether the data exchange time slot is busy and the serial port is ready to receive data

b) If both terminals can be used to receive and To send short messages, both parties must set the same commands and constants when setting up.

At the receiving end, set the command AT CNMI=2, 2, 0, 0, 0

At the sending end, set the command AT CSMP=17, 167, 0, 240 (when When sending in PDU format, 240 is changed to the string DCS (F0))

c) When the program finds that the short message is in the format of prefix CMT followed by the transmitted data, it immediately captures the short message and Distribute it to the original address.

d) When the sending end does not set CSMP=17, 167, 0, 240, the captured short message should be prefixed with CMTI. At this time, use the command AT CMGR=n to read and distribute it to the original specified address, and then use the command AT CMGD=n to delete the short message to ensure that the SIM card has enough space.

AT CMGC Send an SMS command (send a short message command)

AT CMGD Delete SMS message (delete the short message in the SIM card memory)

AT CMGF Select SMS message format (Select SMS message format: 0-PDU; 1-Text)

AT CMGL List SMS message from preferred store

(List SMS messages in the SIM card PDU/text: 0/"REC UNREAD"-unread, 1/"REC READ"-read,

2/"STO UNSENT"-to be sent, 3/"STO SENT"-sent , 4/"ALL"-all)

AT CMGR Read SMS message (read short message)

AT CMGS Send SMS message (send short message)

AT CMGW Write SMS message to memory (write short messages to be sent to SIM memory)

AT CMSS Send SMS message from storage (send short messages from SIN|M memory)

AT CNMI New SMS message indications (display newly received short messages)

AT CPMS Preferred SMS message storage (select short message memory)

AT CSCA SMS service center address (Short Message Center Address)

AT CSCB Select cell broadcast messages (Select Cell Broadcast Messages)

AT CSMP Set SMS text mode parameters (Set SMS text mode parameters)

AT CSMS Select Message Service

There are three modes for controlling short messages:

Block Mode based on AT commands

PDU Mode is based on AT commands

Text Mode Using Block mode requires mobile phone manufacturers to provide driver support. Currently, PDU Mode has replaced Block Mode. Text Mode is relatively simple. This article focuses on the mode PDU Mode. , take Siemens’ product TC35T as an example.

TC35 basic commands

1. Set up short message center

AT CSCA="8613800270500" and press Enter (the specific number is determined by the local operator.)

2. Receive short messages

CMTI: "SM", X (X represents the SIM card storage number for receiving short messages)

AT CMGR= )

AT CMGD=X Enter (delete the short message from the X storage area)

3. Send a short message

AT CMGF=1 and press Enter (send in text format, if using PDU format, AT CMGF=0) AT CMGS="8613xxxxxxxxx" and press Enter gt; enter the short message. Crtl Z ends and sends.

4. Important commands

ATZ; E Enter Echo OFF ATZ; E1 Enter Echo ON AT CREG? Enter and answer x (X=2 is offline, X=1 is registered, X=0 status is unknown) AT COPS? Enter to indicate whether the SIM card is accepted by the network AT COPS=? Enter to display all available networks.

5. Establishing a voice call

AT CREG? Enter (whether to register on the network) ATD13xxxxxxxxx; Enter (the difference between a voice call and a data call is the semicolon after the number)

6. Change and save parameters

AT IPR=2400 Enter (change the rate of RS232 port to 2400bps) ATamp; W Enter (save the changed parameters)

7. Enter PIN code

AT CPIN="xxxx"

 

2. Communication between computer and TC35T

(1) RS232 serial port connection Since TC35T comes with its own RS232 serial port cable, you only need to connect it to the computer serial port. Open the HyperTerminal, select the corresponding serial port, and set the port parameters as: rate—4800, parity bit—none, data bit—8, stop bit—1, and flow control—hardware.

(2) For connection test, enter "AT" and press Enter. "OK" returned on the screen indicates that the computer and TC35T have been successfully connected and TC35T can work normally. At this time, you can test various AT commands.

When testing the command "AT CMGS=?lt;CRgt;", if "OK" is returned, it indicates that TC35T supports this command.

The complete syntax of this command is as follows:

If TC35T is in PDU Mode at this time (i.e. "AT CMGF?lt;CRgt;" returns "0") AT CMGS=lt;lengthgt ;lt;CRgt;PDU is givenlt;^Z/ESCgt; If the short message is sent successfully, "OK" is returned and the information number is displayed: CMGS: lt;mrgt;[,lt;ackpdugt;] If the short message fails to be sent, The following information number is returned: CMS ERROR: lt; errgt;

If TC35T is in Text Mode at this time (i.e. "AT CMGF?lt; CRgt;" returns "1") AT CMGS=lt; dagt; [, toda]lt; CRgt; text is enteredlt; ^Z/ESCgt; If the short message is sent successfully, "OK" will be returned and the information number will be displayed: CMGS: If the sending fails, the following information number will be returned: CMS ERROR: lt; errgt;

In addition, since TC35T is used, when a new short message arrives, the TC35T needs to generate a prompt and use the command "AT CNMI ". The complete syntax of this command is as follows: AT CNMI=[lt;modegt;][,lt;mtgt;][,lt;bmgt;][,lt;dsgt;][,lt;bfrgt;] If there is a new short message comes, the TC35T will automatically return the following prompt: CMTI: "SM", lt; indexgt; At this time, read out lt; indexgt;, and then use the "AT CMGR" command to read out the short message content.

3. PDU data format analysis:

For example, we want to send the character "Hi" to the destination "13823788935". The PDU string is: 08 91 683108701305F0 11 00 0D 91 3128738839F5 00 00 00 02 C834

⑴08—Short message center address length. Refers to the length of (91) (683108701305F0).

⑵91—Short message center number type. 91 means that TON/NPI complies with the International/E.164 standard, which means that a ' ' sign needs to be added before the number; there are other values, but 91 is the most commonly used.

91—10010001 BIT No. 7 6 5 4 3 2 1 0

Name 1 Numeric type number identification

Type of Number:

000—Unknown, 001—International, 010—Domestic, 111—Reserved for expansion;

Numbering plan identification:

0000—Unknown, 0001—ISDN/telephone number (E.164/E.163), 1111—reserved for expansion;

⑶683108701305F0—Short message center number.

Due to the slight processing of the position, the actual number should be: 8613800731500 (the letter F means the length minus 1). This needs to be modified accordingly according to different regions. ⑴, ⑵, and ⑶ are commonly called the Address of the SMSC. ⑷11—File header bytes.

11amp;h=00010001amp;b BIT No. 7 6 5 4 3 2 1 0

Name TP-RP TP-UDHI TP-SPR TP-VFP TP-RD TP- MTI value 0 0 0 1 0 0 0 1

Response path—TP-RP (TP-Reply-Path): 0—not set; 1—set

User data Header identifier—TP-UDHL (TP-User-Data-Header-Indicator):

0—Does not contain any header information; 1—Contains header information

Status reporting requirements—TP -SPR (TP-Status-Report-Request): 0—Report required; 1—No report required

Validity period format—TP-VPF (TP-Validity-Period-Format):

00—Not present; 10—Integer (standard); 01—Reserved; 11—Provide half of the 8-bit byte (Semi-Octet Represented)

Reject copy—TP -RD (TP-Reject-Duplicates): 0—Accept duplication; 1—Reject duplication

Message type prompt—TP-MTI (TP-Message-Type-Indicator): 00—Read (Deliver) ; 01—Submit

⑸00—Message type (TP-Message-Reference)

⑹0B—Called number length.

⑺91—Called number type (same as ⑵).

⑻3128738839F5—The called number has undergone displacement processing, and the actual number is "13823788935".

⑹, ⑺, and ⑻ are commonly known as destination addresses (TP-Destination-Address).

⑼00—Protocol identification TP-PID (TP-Protocol-Identifier) ??

BIT No. 7 6 5 4 3 2 1 0

Bit No.7 With Bit No.6: 00—Assigned as defined below Bit No.0—Bit No.5; 01—See GSM03.40 protocol identification fully defined; 10—Reserved; 11—Allocated for Service Center (SC) special purpose Bit No.0—Bit No.5. Generally these two positions are set to 00. Bit No.5: 0—Does not use the remote network, just a protocol between short message devices; 1—Uses the remote network.

Bit No.0—Bits No.4:

00000—implied; 00001—telefax; 00010—group 3 telefax; 00100—voice; 00101—European Wireless Information System (ERMES); 00110—domestic system; 10001—any public information processing system based on X.400; 10010—Email.

⑽00—Data coding scheme TP-DCS (TP-Data-Coding-Scheme)

BIT No. 7 6 5 4 3 2 1 0

Bit No.7 and Bit No.6: Generally set to 00;

Bit No.5: 0—the text is not compressed, 1—the text is compressed using the GSM standard compression algorithm;

Bit No.4: 0—Indicates that Bit No.1 and Bit No.0 are reserved bits and do not contain information type information; 1—Indicates that Bit No.1 and Bit No.0 contain information type information;

Bit No.3 and Bit No.2: 00—default alphabet, 01—8bit, 10—USC2 (16bit), 11—reserved; Bit No.1 and Bit No.0: 00—Class 0, 01— Class 1, 10—Class 2 (SIM card specific information), 11—Class 3.

⑾00—Validity period TP-VP (TP-Valid-Period)

VP value(amp;h) corresponding validity period 00 to 8F (VP 1)*5 minutes 90 to A7 12 hours (VP-143)*30 minutes A8 to C4 (VP-166)*1 day C5 to FF (VP-192)*1 week

⑿02—User data length TP-UDL ( TP-User-Data-Length)

⒀C834—User data TP-UD (TP-User-Data)

“Hi” 4. Short message encoding assumes that the content of the short message to be sent is "Hi", and the GSM character set used is 7-bit encoding. First, the characters are converted into 7-bit binary, and then the bits of the subsequent characters are transferred to the front to make up for the previous differences.

For example: H is translated into 1001000, and i is translated into 1101001. Obviously the binary code of H is less than eight digits, so the last digit of i is added to the front of H. Then it becomes 11001000 (C8), the remaining six digits of i are 110100, and two more 0s are added in front to become 00110100 (34), so "Hi" becomes two octal numbers C8 34.

5. Short message sending and receiving cases Since TC35(T) supports TEXT format, we mainly tested this format in the experiment.

(1) Set the short message center AT CSCA=" 8613800731500" (short message center);

(2) Set the short message sending format AT CMGF=1 (1-TEXT; 0-PDU);

(3) Send a short message (the content of the short message is "test") AT CMGS="13823788935" (destination address) lt; crgt; gt; test ^z;

(4) Set automatic prompt for short message arrival: Set short message arrival prompt. When the short message is received, the command will be obtained: CMTI: "SM", INDEX (information storage location) AT CNMI=1, 1, 0, 0, 1();

(5) Get the short message content (Once more), assuming INDEX=8. AT CMGR=8 returns the following information: CMGR: "REC UNREAD", "8613823788935", "01/07/16, 15:37:28 32", Once more 6. Notes (1) The short message center will generally not be changed. If the short message center number is changed, remember that TC35 needs to be restarted when using the "AT CSCA" statement, otherwise TC35 will not work properly (TC35T does not have this problem). (

2) Some SIM cards have a password, which needs to be entered when starting.