Skip to content

Command response times out due to naked Line Feed #63

@AfmanS

Description

@AfmanS

I am testing a newer GSM Modem, a WebDyn EasyDot, and it responds to CPIN like this:

Image

Whereas the modems I used previously, a Cinterion MC55i, responded like this:

Image

This is from testing the command manually with putty. Other commands show a similar response. The modem sends just an LF, intead of CRLF between READY and OK. ATLib does not accept this as a success and times out waiting for the OK. Here's the debug log:

[10:43:26 VRB] [ATLIB] Out: AT+CPIN?
[10:43:27 VRB] [ATLIB] In (line1):
AT+CPIN?
[10:43:27 VRB] [ATLIB] In (line1): +CPIN: READY
[10:43:27 VRB] [ATLIB] In (line1):
OK
[10:43:36 ERR] Modem 'TEST' [COM7] could not load. Reported error: 'Timed out while waiting for command response'

So I'm guessing it's because \nOK is not an option here?

private static readonly string[] FinalResponseSuccesses = new string[]
{
"OK",
"CONNECT"
};

I tried MC55i, Fona3G and DWM222. Setting the serial port's NewLine = "\n" didn't help. Maybe the lines should be trimmed of CR and LF? Maybe it's wrong behavior from the modem? I'd appreciate any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions