1

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.

Community
  • 1
  • 1
Onewildgamer
  • 101
  • 1
  • 2
  • 11

1 Answers1

0

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).

Community
  • 1
  • 1
hlovdal
  • 26,565
  • 10
  • 94
  • 165
  • Thanks for your response. I get the same response in PDU mode, and with "SM, "ME" memory. I've limited knowledge about AT+CNMI command, I've tried with 1,1,0,0,0 and various other supported combinations which I got from AT+CNMI=? So I guess it doesn't make any difference when I set to 0. I've tried only on windows 7. To run the program in Linux machine I need phone driver for Linux right? – Onewildgamer Jan 16 '14 at 07:06
  • On linux there is just one common USB modem driver (CDC ACM) which works with all phones, so it is highly unlikely that you have to install anything special. For a terminal program you can use minicom (console) or putty (graphical). – hlovdal Jan 16 '14 at 07:51
  • I will try that, while it may take time as i have to go through many procedures before installing a VM and software in it can you suggest a GSM modem that works perfectly fine for both sending and receiving an SMS? I feel that a GSM modem will help in long run, also purchasing a device is not a big deal. – Onewildgamer Jan 16 '14 at 09:16