PDA

Click to See Complete Forum and Search --> : read GSM modem message


Waka
Jul 29th, 2009, 04:11 AM
HI, how can i read out the message from the GSM modem. The follow code only manage to show "at+cmgl=all" which is not the mesage i want. anyone know how to solve it ?



With serialport
.PortName = "COM6"
.BaudRate = "115200"
.StopBits = IO.Ports.StopBits.One
.DataBits = 8
.Parity = IO.Ports.Parity.None
.ReadBufferSize = 10000
.ReadTimeout = 1000
.WriteBufferSize = 10000
.WriteTimeout = 10000
.RtsEnable = True

.Open()
.DiscardOutBuffer()
'for reading sms

atcCommand = "AT+CMGL=all" 'to read from inbox
.Write(atcCommand + vbCrLf) 'execute command on buffer

'code manage to get out what it wrote in the atcCommand
TextBox1.Text = .ReadExisting

End With

petevick
Jul 29th, 2009, 07:09 AM
Hi,
there should be an 'incoming' event on the serial port that should list what comes back.

I know when I did this, I used the serial control from www.franson.com - although I know Dick Grier (http://www.hardandsoftware.com) has some examples on his site

Waka
Jul 29th, 2009, 09:24 AM
well.. i look through it. but there is no key word for incoming event.. is it possible send me a working copy..?? thanks

petevick
Jul 30th, 2009, 01:20 AM
Hi,
take a look at the excellent article here (http://www.code-magazine.com/article.aspx?quickid=0609051&page=4) - that should put you on the right lines.

Waka
Aug 3rd, 2009, 01:43 AM
My GSM modem don't have auto trigger function. it will not auto detect incoming data/msg.
How can i make my GSM modem auto detect incoming msg/data.

at+cnmi?
2,1,0,0
ok

but when i send a msg to my modem. it is not responing.. how am i going to make it auto detect ?

petevick
Aug 3rd, 2009, 05:32 AM
how do you know it isn't responding and it isn't your code.

Try downloading an evaluation of the terminal emulator from http://www.cam.com/vxhpc.html and trying your commands on that

Waka
Aug 3rd, 2009, 09:03 AM
coz i using the same code to phone is workable.. when i use the at+cnmi? command
it will auto trigger to read message from inbox.. my phone show a respone when it receive new message.. but my gsm modem is not responing..

ericyeoh
Sep 30th, 2009, 12:18 AM
Is it the same??
At+cmgl=all
or should it to be
at+cmgl="all"