Results 1 to 8 of 8

Thread: read GSM modem message

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2009
    Location
    Singapore
    Posts
    355

    Exclamation read GSM modem message

    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 ?

    vb.net Code:
    1. [CODE]
    2. With serialport
    3.             .PortName = "COM6"
    4.             .BaudRate = "115200"
    5.             .StopBits = IO.Ports.StopBits.One
    6.             .DataBits = 8
    7.             .Parity = IO.Ports.Parity.None
    8.             .ReadBufferSize = 10000
    9.             .ReadTimeout = 1000
    10.             .WriteBufferSize = 10000
    11.             .WriteTimeout = 10000
    12.             .RtsEnable = True
    13.  
    14.             .Open()
    15.             .DiscardOutBuffer()
    16.             'for reading sms
    17.  
    18.             atcCommand = "AT+CMGL=all"        'to read from inbox
    19.             .Write(atcCommand + vbCrLf)    'execute command on buffer
    20.  
    21. 'code manage to get out what it wrote in the atcCommand
    22.             TextBox1.Text = .ReadExisting
    23.  
    24.         End With
    25. [/CODE]

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: read GSM modem message

    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 has some examples on his site
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2009
    Location
    Singapore
    Posts
    355

    Re: read GSM modem message

    well.. i look through it. but there is no key word for incoming event.. is it possible send me a working copy..?? thanks

  4. #4
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: read GSM modem message

    Hi,
    take a look at the excellent article here - that should put you on the right lines.
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2009
    Location
    Singapore
    Posts
    355

    Exclamation Re: read GSM modem message

    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 ?
    Last edited by Waka; Aug 3rd, 2009 at 01:51 AM.

  6. #6
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: read GSM modem message

    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
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2009
    Location
    Singapore
    Posts
    355

    Re: read GSM modem message

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

  8. #8
    Junior Member
    Join Date
    Sep 2009
    Posts
    21

    Re: read GSM modem message

    Is it the same??
    At+cmgl=all
    or should it to be
    at+cmgl="all"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width