Hello, I’m using TD210: IoT Cellular Modem version Quectel UC200T.
If I use the next AT commands, the return response is:
AT+CTZU=3 //Enable automatic time zone update via NITZ and update LOCAL time to RTC
AT+CCLK?
+CCLK: “24/08/15,13:53:54-24” //The date and time are updated to where I am (Mexico City).
OK
The first problem I have is when I execute the following AT command and if I am not receiving any SMS messages I get the following error as a response
AT+CMGR=0
+CMS ERROR: 321
But if I receive any SMS message, the command is executed as follows.
+CMTI: “ME”,0
AT+CMGR=0
+CMGR: “REC READ”,“+525536357992”,“24/08/15,13:54:44+104”
HELLO
OK
I ask because I have a modem with a previous version which is Quectel UC20 and in this modem when I execute the read command, even though no SMS message has been received, the response is OK.
The second question I have is why in the response when I receive an SMS message: +CMGR: “REC READ”,“+525536357992,“08/24/15,13:54:44+104”, I am getting something like time zone a “+104” and is different from that obtained by the CCLK command “-24”
This is arguably a more correct result than “OK”.
You have no SMS stored in location zero (the first slot). Error 321 means: invalid memory index. Refer 3GPP 27.005, section 3.2.5.
I cannot make sense of timezone +104. For further background, please see 3GPP 23.040, section 9.2.3.11.
1 Like
I should have mentioned before the available window for editing my earlier reply closed, that it may help to view the received SMS in PDU mode, and decode the timestamp there.
AT+CMGF=0
AT+CMGR=0
1 Like
Thanks for the support and yes I assumed that the operation should be like this, but in the other modem with the UC20 version, that error is not marked even though there is no message received.
Hi mate, I did what you told me and this is what I get when I switch to PDU sms mode.
+CMGR: 1,.24
0891254901001014F0040c912555521387260000428091711382 4a 054769b1e804
OK
According to the review I did to decode the string, after the space I have a 4A that represents the time zone, but the digits must be changed, leaving it as A4, which is equivalent to 164 in decimal and in binary it represents a 1 010 0100. (-24)
In the document it indicates that when separated in this way, the first bit if it is 1 is a negative sign.
This tells me the time zone I want, what I still don’t understand is because in Text Mode it expresses the time zone as +104, If you could tell me the reason I would appreciate it, thank you very much. 
+CMGR: “REC READ”,“+525536357992”,“24/08/19,17:31:28+104”
GREEN
OK
I share the link with the information to decode the chain in PDU mode.
The timezone byte 0x4A decodes as follows:
0x4A is 01001010 binary.
I have highlighted the sign bit. It is 1, meaning that the time is behind UTC (west of Greenwich).
That leaves us with 0100 (4 decimal) and 010 (2 decimal).
Those two decimal digits get reversed, giving us negative 24 as you say.
The units are 1/4 hours, making you 6 hours behind UTC.
The +104 in text mode is a Quectel firmware decoding error.
We can be sure the 0x4A in the PDU is correct, because 3GPP-compliant devices are required to store the PDU exactly as received.
1 Like