-
Notifications
You must be signed in to change notification settings - Fork 20
Command response times out due to naked Line Feed #63
Description
I am testing a newer GSM Modem, a WebDyn EasyDot, and it responds to CPIN like this:
Whereas the modems I used previously, a Cinterion MC55i, responded like this:
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?
ATLib/src/HeboTech.ATLib/Parsing/AtChannel.cs
Lines 21 to 25 in a2dcaab
| 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.