I'm new to GSM AT Commands and I'm using ZTE MF190S USB 3G USB Modem with Modem Nodejs Module also tried with MS Hyperterminal.
The problem I'm facing that when I receive SMS using AT+CMGL="ALL"
from Whatsapp (as example) I got in sender number field 81084326797126204
which is an invalid phone number and should be "Whatsapp" instead although the manufacture's software is showing message from Whatsapp normally.
Note: I tried to decode it as a Hexadecimal string but not done.
> AT+CSCS="GSM"
> AT+CPMS="ME"
> AT+CMGL="ALL"
//Result
+CMGL: 0,"REC UNREAD","81084326797126204",,"20/05/30,14:53:55+08"
FEFF000000000000000000000000000000000000020
As described in this link
+CMGL: index,message_status,address,[address_text],[service_center_time_stamp][,address_type,sms_message_body_length]sms_message_body[+CMGL: ...]
The address Field
The third field of the information response of the +CMGL AT command, address, is a string that contains the address/phone number stored in the SMS message header. If the SMS message read is an incoming SMS message, the address field contains the originator address. If the SMS message read is an outgoing SMS message, the address field contains the recipient address. Usually the address field value is a phone number formatted using the typical ISDN / telephony numbering plan (ITU E.164/E.163). For example, "+85291234567".
The address_text Field
The fourth field of the information response of the +CMGL AT command, address_text, is a string that contains the text associated to address in the phonebook. For example, if the text "Alice" is associated to the phone number "91234567" in the phonebook, address_text will be "Alice". The AT command +CSCS (command name in text: Select TE Character Set) can be used to specify the character set for displaying address_text. Note that address_text is an optional field. Some GSM/GPRS modems and mobile phones (examples: most Nokia products, including my Nokia 6021) leave this field empty.
How can I identify the message is from Whatsapp or any other services providers names?
AT+CGML
? Is there a reason why you can't just identify those messages by parsing that specific number from every message displayed in the list? Have you tried to insert that number in the phonebook? – Roberto CaboniYou would just like to have The "WhatsApp" string in the fourth parameter of AT+CGML?
Yes Exactly, i don't know why it's can't be displayed as well as manufacture's software, i think maybe there is missing command to show more details about SMS, i've triedAT+CSDH=1
to get SMS header also tried with Text and PDU modes. – Mamdouh Saeed