AT command problem

Archived from groups: alt.cellular.gsm (More info?)

I am polling my GSM modem for new messages every 10 seconds...
and it works fine for some 5 minutes or so and returns OK.

after that it starts returning funny charracters. Character that looks
like
a small rectangle( some what like this []).

I have tried this on wavecom and round solutions modems and its the
same on both.

any clues ?

Cheeros
Rishi
18 answers Last reply
More about command problem
  1. Archived from groups: alt.cellular.gsm (More info?)

    Will try once i reach my place...but is it possible for the modem to
    function correctly for a while and then all of a sudden start returning
    junk if it is in autoo-baud ?

    Cheeros
    Rishi
  2. Archived from groups: alt.cellular.gsm (More info?)

    Hi John,
    thanks for the help last time. The wavecom modem did not
    have GPRS stack enabled so i switched to a round solutions modem.
    I was able to send mail using AT command.

    Cheeros
    Rishi
  3. Archived from groups: alt.cellular.gsm (More info?)

    rishi.israni@gmail.com wrote:

    > I am polling my GSM modem for new messages every 10 seconds...
    > and it works fine for some 5 minutes or so and returns OK.
    >
    > after that it starts returning funny charracters. Character
    > that looks like a small rectangle( some what like this []).
    >
    > I have tried this on wavecom and round solutions modems and
    > its the same on both.
    >
    > any clues ?

    This looks like a speed (baud rate) or character framing (number
    of data or stop bits, or parity) problem.

    Is the modem set to auto-baud? What do "AT+IPR?", "AT+ICF", and
    "AT+WRST?" return?

    John
  4. Archived from groups: alt.cellular.gsm (More info?)

    Hi,
    I am using a round solutions modem now. My wavecom has some issues.
    wanted to ask u something. When i send AT command to the modem using my
    program...what is the best way of reading the return buffer.

    I mean how do i know when to stop reading. \r\n does not work for all
    commands...
    i look for the expected return, lets say OK when i send an AT command
    via my program and then i ignore what is after that and i flush before
    every send to the modem.

    Any good modem programming articles that u can point me to ?

    Cheers
    Rishi
  5. Archived from groups: alt.cellular.gsm (More info?)

    rishi.israni@gmail.com wrote:

    > Will try once i reach my place...but is it possible for the
    > modem to function correctly for a while and then all of a
    > sudden start returning junk if it is in autoo-baud ?

    It shouldn't be possible, but that doesn't mean it isn't
    happening :(

    Another possibility is that you're running at a fixed rate and
    character framing, and have got Wavecom reset (AT+WRST) set to
    5 minutes (undoing your configuration).

    John
  6. Archived from groups: alt.cellular.gsm (More info?)

    setting the baud rate works....
    hey do u know how i can turn off the RING and other such disturbing
    unsolicited responses :)

    cheers
    Rishi
  7. Archived from groups: alt.cellular.gsm (More info?)

    rishi.israni@gmail.com wrote:

    > Hi,
    > I am using a round solutions modem now. My wavecom has
    > some issues.
    > wanted to ask u something. When i send AT command to the modem
    > using my program...what is the best way of reading the return
    > buffer.
    >
    > I mean how do i know when to stop reading. \r\n does not work
    > for all commands...
    > i look for the expected return, lets say OK when i send an AT
    > command via my program and then i ignore what is after that
    > and i flush before every send to the modem.

    The following works for me:

    I handle the reading of the buffer with a purpose-built
    subroutine. I pass it 2 (optional) parameters: the
    response-termination string I'm expecting (usually
    "\r\nOK\r\n"), and the number of seconds to wait for further
    input if I don't see that string. This means that I might get
    other responses as well (I also expect unsolicited responses
    like "+CREG:", "+CSQ:", "+CCED:" and "+CBM:"), and need to
    separate these outside of this subroutine. So I always check
    the buffer for every type of response that might be expected.
    If the response happens to be incomplete, I leave the
    incomplete part of the response string there so that the
    remainder of that response gets concatenated to it at the next
    call to the input subroutine.

    This input subroutine waits around for a half-second or so for
    further input in any case, and I find it works perfectly
    reliably.

    I hope that helps.

    > Any good modem programming articles that u can point me to ?

    http://www.programmersheaven.com/ is a good starting point.

    John
  8. Archived from groups: alt.cellular.gsm (More info?)

    rishi.israni@gmail.com wrote:

    > setting the baud rate works....
    > hey do u know how i can turn off the RING and other such
    > disturbing unsolicited responses :)

    I haven't tested it, but you could have a look at "AT+CMER"
    (perhaps "AT+CMER=0,0,0" might work, but you might lose output
    you need too).

    A better, more defensive programming approach is to deal with
    them.

    I keep the device output in a buffer string variable. I
    frequently search that string for all result code introducers
    that interest me, and process them in a logical, sensible
    order. Having dealt with one, I immediately destroy it (by
    overwriting a character, changing "+CBM:" to "+ BM:" for
    instance). At appropriate points, I shorten the string or
    clear it completely.

    For commands that don't produce a leading result code (like
    "AT+CGSN"), I temporarily turn command echo on, and take my cue
    from the echoed command instead.

    John
  9. Archived from groups: alt.cellular.gsm (More info?)

    Some hints on the Round Solutions modem www.roundsolutions.com you will
    find on http://www.gsm-modem.de/gsm-modem-faq.html .
    Sending of emails is descripted on http://www.gsm-modem.de/smtp-gprs.html .
    Regards
    Meff
  10. Archived from groups: alt.cellular.gsm (More info?)

    Hi,
    I finally figured it out...it was the baud rate settings issue. Once is
    set it to 19200 using th AT+IPR it is quite ok now.

    One last problem remaining...when i enter the data mode...i cannot exit
    it...
    nothing happens when i send +++ also... :(

    its quite fun playing with the modem..but unfortunately round solutions
    documentation is not as good as wavecome...

    Cheers
    Rishi
  11. Archived from groups: alt.cellular.gsm (More info?)

    rishi.israni@gmail.com wrote:

    > One last problem remaining...when i enter the data mode...i
    > cannot exit it...
    > nothing happens when i send +++ also... :(

    Don't neglect the importance of the guard time. There must be a
    significant pause in the data stream both sides of the "+++"
    escape string (but not within it). I don't know what the
    default is, but 3 seconds should be more than sufficient.

    John
  12. Archived from groups: alt.cellular.gsm (More info?)

    I've experiences quite differing behaviour from various modems in response
    to the '+++' and 'ATH' commands.
    Some devices tolerate zero guard time, some definitely require it (though
    IMHO 3seconds is a lot...). One unit actually responded with an 'OK' to the
    '+++'. Be prepared :)
    I decided to turn to the 'drop DTR' method of hanging up - but if the OP
    only needs to enter command mode temporarily, that's of course not going to
    help him...

    Just my 2 cents..

    Regards
    Per


    "John Henderson" <jhenRemoveThis@talk21.com> wrote in message
    news:3bsc1lF6kp7prU1@individual.net...
    > rishi.israni@gmail.com wrote:
    >
    > > One last problem remaining...when i enter the data mode...i
    > > cannot exit it...
    > > nothing happens when i send +++ also... :(
    >
    > Don't neglect the importance of the guard time. There must be a
    > significant pause in the data stream both sides of the "+++"
    > escape string (but not within it). I don't know what the
    > default is, but 3 seconds should be more than sufficient.
    >
    > John
  13. Archived from groups: alt.cellular.gsm (More info?)

    rishi.israni@gmail.com wrote:

    > I finally figured it out...it was the baud rate settings
    > issue. Once is set it to 19200 using th AT+IPR it is quite ok
    > now.

    You might find that 9600 is a better choice for a Wavecom
    Fastrack modem, as that's what the DCE => DTE side will revert
    to after a reset using "AT+CFUN" or "AT+WRST".

    And for GPRS use, 57600 or 115200 are the realistic choices to
    get class 10 throughput.

    Personally, I like to use autobaud. You might need to save that
    setting to EPROM though, using "AT&W".

    John
  14. Archived from groups: alt.cellular.gsm (More info?)

    Per Laursen wrote:

    > I've experiences quite differing behaviour from various modems
    > in response to the '+++' and 'ATH' commands.
    > Some devices tolerate zero guard time, some definitely require
    > it (though IMHO 3seconds is a lot...). One unit actually
    > responded with an 'OK' to the '+++'. Be prepared :)

    I think it should do that - it's going into command mode, after
    all.

    > I decided to turn to the 'drop DTR' method of hanging up - but
    > if the OP only needs to enter command mode temporarily, that's
    > of course not going to help him...

    A couple of further thoughts for Rishi: make sure that you
    haven't included a <carriage return> with the "+++". And
    because some systems will buffer the output (flushing with a
    <carriage return> for instance), you might need to read up on
    flushing the "+++" from the buffers in your compiler's
    documentation.

    John
  15. Archived from groups: alt.cellular.gsm (More info?)

    "John Henderson" <jhenRemoveThis@talk21.com> wrote in message
    news:3btharF6jujiiU1@individual.net...
    >
    > I think it should do that - it's going into command mode, after
    > all.

    You could very well be right - the 'standards' leave a lot to the
    interpretation of manufactures and users, IMO.
    Anyway, two of three (Ericsson GM29 and Siemens TC35) do not respond with
    'ok' to the '+++', one (OvisLink G??1500 PCMCIA - not sure about the exact
    p/n) does.
    /Per
  16. Archived from groups: alt.cellular.gsm (More info?)

    Per Laursen wrote:

    > You could very well be right - the 'standards' leave a lot to
    > the interpretation of manufactures and users, IMO.
    > Anyway, two of three (Ericsson GM29 and Siemens TC35) do not
    > respond with 'ok' to the '+++', one (OvisLink G??1500 PCMCIA -
    > not sure about the exact p/n) does.

    That's interesting. I'm not saying you're wrong, but the TC35
    "AT Command Set" manual I've got clearly shows an "OK" response
    to "+++". I've never used a TC35 though.

    It goes on to specify a guard time of "1000 ms", and mentions
    that the three "+" characters must be sent "all within 1000
    ms".

    As an aside, a modem with zero guard time could not be used to
    connect to an ISP and post this message - because it contains
    the "escape to command mode" sequence.

    John
  17. Archived from groups: alt.cellular.gsm (More info?)

    i solved my problem...
    I was making a mistake..i was hoping to disconnect from a smtp session
    using +++. The escape sequence works after i send a QUIT commands to
    the smtp and service channel is closed.

    I have to be able to send http packets over the gprs connection that i
    have established...Is it by anyway possible to direct my program to use
    the gprs connection instead of the normal lan that i use...?

    There is a class by the name of WebClient in .NET which handles http. I
    was hoping if i could redirect the communication via my gprs connection
    then i would not need to send http commands on the wire myself.

    Cheers
    Rishi
  18. Archived from groups: alt.cellular.gsm (More info?)

    I am using rasdial.exe and i call it from my program to dialup my gprs
    connection.

    then i can use .net's built in webclient class to access the internet.

    cheers
    Rishi
Ask a new question

Read More

GSM Command Prompt