I'm trying to send and receive SMS via a Huawei e153s USB HSPA Dongle connected to an Ubuntu Laptop. I use a minicom emulator to make the SSH connection. After doing the configurations (setting serial ports, etc.) I tried AT commands one by one.
First I set the modem mode to text mode by AT+CMGF=1
. When I entered AT
in terminal then it gives OK
. After that I successfully sent a message to my mobile using AT+CMGS="xxxxxxxxxxx"
command but the problem occurs when I tried to read a SMS in the SIM card which I inserted into the dongle. I used AT+CMGL
but it only shows a OK in terminal 1 (where i opened minicom) and terminal 2 shows
T+CMGL
OK
and when I use AT+CMGR=1
it shows OK in terminal 1 and terminal 2 shows
T+CMGR1
OK
I tried above commands in Ubuntu terminal by using PPP such as
chat TIMEOUT 1 "" "AT+CMGF=1" "OK" > /dev/ttyUSB0
chat TIMEOUT 1 "" "AT+CMGR=1" "OK" > /dev/ttyUSB0
and watched the output thruogh another terminal (terminal 2) window which shows the file /dev/ttyUSB0 using cat /dev/ttyUSB0
. (ttyUSB0 is the serial port belongs to the dongle. I returned it through the wvdialconf
)
but they give the same results as same as previous ones.
Why doesn't that show the content of the message?
I guess you first need to select the message storage (AT+CPMS=XX
), then list messages in that storage (AT+CMGL="ALL"
), and then when you have a valid index of a message read it (AT+CMGR=X
).
Have a look at this article: http://www.smssolutions.net/tutorials/gsm/receivesmsat/