app: Remove extra <CRLF> from AT response#182
Closed
trantanen wants to merge 1 commit into
Closed
Conversation
SM used to add <CRLF> between information text and the OK in AT responses when MFW returns one <CRLF> in there as follows: <CRLF>+COMMAND: RESPONSE,VALUE,OR,TEXT<CRLF><CRLF>OK<CRLF> Two <CRLF>s before OK will change to one: <CRLF>+COMMAND: RESPONSE,VALUE,OR,TEXT<CRLF>OK<CRLF> This should be aligned with 3GPP TS 27.007 Section 4.2. Signed-off-by: Tommi Rantanen <tommi.rantanen@nordicsemi.no>
3295208 to
57c0bd5
Compare
| if (err) { | ||
| LOG_ERR("AT command response failed: %d", err); | ||
| } | ||
| err = sm_at_send_str(buf); |
Contributor
There was a problem hiding this comment.
This works well for the AT+ and AT%, but the SM AT# commands still send the additional \r\n:
OK
Ready
at#xsocket=1,1,0
#XSOCKET: 0,1,6
OK
at+cereg?
+CEREG: 0,4
OK
The first \r\n comes from:
https://github.com/nrfconnect/ncs-serial-modem/blob/main/app/src/sm_at_socket.c#L542
And the second one from lines above this. The first one should be removed from all the commands.
Collaborator
Author
Collaborator
Author
|
It seems double CRLF before OK is done for specific requests from customers so we won't change it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


SM used to add
<CRLF>between information text and the OK in AT responses when MFW returns one<CRLF>in there as follows:<CRLF>+COMMAND: RESPONSE,VALUE,OR,TEXT<CRLF><CRLF>OK<CRLF>Two
<CRLF>s before OK will change to one:<CRLF>+COMMAND: RESPONSE,VALUE,OR,TEXT<CRLF>OK<CRLF>This should be aligned with 3GPP TS 27.007 Section 4.2.