Question

I have connected my samsung phone (GT-S3350) to my PC through an usb cable and installed usb driver for it. I am able to send SMS to any phone number through my PC using AT commands. I've tried with Hyperterminal also through Java.

To configure the mobile to text mode and to receive elaborate errors I'm submitting following commands in the Hyperterminal.

AT+CMGF=1
OK
AT+CMEE=2
OK

As I said earlier I am completely able to send an SMS using CMGS command, it works perfectly fine. But when I'm trying to list the messages I get a long list of OK's like below.

AT+CMGL="ALL"
OK

OK

OK


OK


OK


OK


OK


OK
.
.
.
ERROR

OK

Same is the case when I give "REC READ", "REC UNREAD" etc. instead of "ALL".
Also when I am using CNMI command to listen to the new message notifications I receive an OK right away. It is expected that it shows the index of the newly received SMS, but for me it stays blank.

AT+CNMI=1,1,0,0,0
OK

I've tried receiving SMS from my other phone. The message is received but I don't see any memory index on my terminal.

I learnt these mostly from blogs and browsing through APIs. I've also tried the method suggested by this thread. Am I doing anything wrong or am I missing something?

I am totally open for alternatives about receiving an SMS in PC. Please suggest.

Was it helpful?

Solution

Ouch, that does not look good. AT commands should never1 deliver more than one Final Result Code, so getting tons of OKs followed by an ERROR is definitely not right.

Some questions and suggestions for further testing/debugging:

  • Does this apply in PDU mode as well?

  • Does this apply to all the different message storages (check AT+CPMS)?

  • While you are not running a data call started with ATD, does it make any difference to set <mode> to 2 for AT+CNMI?

  • The <bfr> argument says that unsolicited result codes will be flushed when entering modes 1 to 3. Right after receiving an message (while you are testing), does it make any difference to briefly set mode to 0 and then back to 1 (or 2), thus forcing an enter to a mode that should output all buffered indications?

  • Have you tried with different operating systems? Different terminal programs? (This really ought not to make any difference, but who knows)

1 Well, except for one specification mistake (see note 1).


General tip on learning more about AT commands, check out the links from the at-command tag info page, in particular 27.005 for messaging commands (but if you have not read V.250 before, start with that one).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top