I spent some time yesterday to solve the problem of netizen GSM Modem and Small SMS, found that " " is added by default before the small Lingxia number.
There is an Address Field in the PDU encoding, with an Address Type segment, which is fixed to 0x91 in many articles. In fact, this is wrong. According to the 3GPP 23040-650 for this field, 0x91 is internationally used, that is, add a " " before the number. But for the format of the Today's 106 area code number, the Address Type is fixed to 0x91 becomes 106 area code number format, and the SMS center may be considered international SMS, which may be sent to other countries. It is also possible. Failed to send.
Therefore, for this situation, the 0x91 is changed to 0x81 to be solved.
For the process of the program, it is desirable to increase the judgment of the " " number. If there is " " in front of the number, the AddResStype value is 0x91, otherwise the value is 0x81.
For more detailed information about PDU, please see 3GPP information, in My Home:
The "Information" section on http://dream-world.nese.net has a PDF version download.