Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
302 views
in Technique[技术] by (71.8m points)

at command - Trouble setting "Preferred Message Storage" with AT+CPMS on Samsung Galaxy

When connecting Samsung Galaxy S via USB to Hyperterminal, I cannot retrieve any messages from the modem. The commands AT and AT+CMGF=1 work, and AT+CPMS=? returns different memories available.

But when I try to execute the following command: AT+CPMS="SM" (or any other memory) I get: cms error 321. Can anybody help me? Thanks!

Additional info:

AT+CPMS=?

+CPMS: ("BM","ME","SM","SR"),("ME","SM"),("BM","ME","SM","SR")

AT+CPMS="SM"

+CMS ERROR: 321
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

From 27.005 +CMS ERROR 321 means invalid memory index.

The AT+CPMS command has three parameters with official syntax AT+CPMS=<mem1>[,<mem2>[,<mem3>]]. However I think that the problem is that the phone chokes at having different <mem1> and <mem2> values.

So although the official valid syntax would allow for only giving <mem1> I suspect the syntax to actually be AT+CPMS=<mem1>,<mem2>[,<mem3>] on some phones due to some implementation issue, (possibly limited to just certain values/combinations for <memN>). As far as I remember this was the case for phones from SonyEricsson, but I have always given both <mem1> and <mem2> with the same value for many years, so my memory might be a bit rusty.

I do think it is might be the case for other phones as well; if you search for example use cases of AT+CPMS you will see that giving both is more common than just <mem1> (and frankly I have a hard time imagining scenarios where you really want to read/delete from one storage and write/send from another storage). Given that my memory is correct, the described behaviour should be applicable for your phone as well since Samsung uses software from ST-Ericsson in their Galaxy phones.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...