Skip to content

Commit a3be791

Browse files
committed
treewide: Change AT command terminator to CR
Change default AT command terminator from <CRLF> to <CR> in both the serial modem application and the host side. This is aligned with 3GPP TS 27.007. Jira: SLM-39 Signed-off-by: Tommi Rantanen <tommi.rantanen@nordicsemi.no>
1 parent 7092cb1 commit a3be791

6 files changed

Lines changed: 11 additions & 10 deletions

File tree

app/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ config SM_EXTERNAL_XTAL
2929
#
3030
choice
3131
prompt "Termination mode"
32-
default SM_CR_LF_TERMINATION
32+
default SM_CR_TERMINATION
3333
help
3434
Sets the command terminator used by the serial terminal.
3535
Available options are:

app/overlay-ppp-cmux-linux.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
CONFIG_SM_SKIP_READY_MSG=y
88
CONFIG_SM_CMUX=y
99
CONFIG_SM_PPP=y
10-
CONFIG_SM_CR_TERMINATION=y
1110

1211
CONFIG_MODEM_CMUX_MTU=127
1312
CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE=536

doc/app/sm_description.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ CONFIG_SM_AUTO_CONNECT - Connect to the network at start-up or reset
159159

160160
CONFIG_SM_CR_TERMINATION - CR termination
161161
This option configures the application to accept AT commands ending with a carriage return.
162+
This is the default AT command terminator.
162163

163164
Select this option if you want to connect to the development kit using PuTTY.
164165
See `Testing and optimization`_ for instructions.
@@ -443,11 +444,10 @@ To connect to an nRF91 Series DK with a PC:
443444

444445
.. note::
445446

446-
The default AT command terminator is a carriage return followed by a line feed (``\r\n``).
447-
The Serial Terminal app supports this format.
448-
If you want to use another terminal emulator, make sure that the configured AT command terminator corresponds to the line terminator of your terminal.
449-
When using PuTTY, you must set the :ref:`CONFIG_SM_CR_TERMINATION <CONFIG_SM_CR_TERMINATION>` |SM| configuration option.
450-
See :ref:`sm_config_options` for more details.
447+
The default AT command terminator is a carriage return (``\r``).
448+
The Serial Terminal app, PuTTY and many terminal emulators support this format by default.
449+
However, make sure that the configured AT command terminator corresponds to the line terminator of your terminal.
450+
See :ref:`sm_config_options` for more details on AT command terminator choices.
451451

452452
.. sm_connecting_91dk_pc_instr_end
453453

doc/lib/sm_host.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ Optionally configure the following Kconfig options based on need:
4646

4747
Use one of the following options to select the termination character:
4848

49-
* ``CONFIG_SM_HOST_CR_TERMINATION`` - Enables ``<CR>`` as the termination character.
49+
* ``CONFIG_SM_HOST_CR_TERMINATION`` - Enables ``<CR>`` as the termination character, which is selected by default.
5050
* ``CONFIG_SM_HOST_LF_TERMINATION`` - Enables ``<LF>`` as the termination character.
51-
* ``CONFIG_SM_HOST_CR_LF_TERMINATION`` - Enables ``<CR+LF>`` as the termination character, which is selected by default.
51+
* ``CONFIG_SM_HOST_CR_LF_TERMINATION`` - Enables ``<CR+LF>`` as the termination character.
5252

5353
You must configure the same termination character as that configured in |SM| on the nRF91 Series SiP.
5454
The library sends the termination character automatically after an AT command.

doc/migration_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ The following changes are mandatory to make your application work in the same wa
4747
* Renamed the file name from ``slm_`` to ``sm_`` and ``modem_slm`` to ``sm_host``.
4848
* Functions and other symbols in the code have been renamed accordingly making automatic patching to likely fail.
4949

50+
* Default AT command terminator changed from ``\r\n`` (``CONFIG_SM_CR_LF_TERMINATION`` and ``CONFIG_SM_HOST_CR_LF_TERMINATION``) to ``\r`` (``CONFIG_SM_CR_TERMINATION`` and ``CONFIG_SM_HOST_CR_TERMINATION``).
51+
5052
* Rename the following AT commands:
5153

5254
* ``AT#GPS`` to ``AT#GNSS``

lib/sm_host/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ config SM_HOST_SHELL
5555

5656
choice
5757
prompt "AT command terminator"
58-
default SM_HOST_CR_LF_TERMINATION
58+
default SM_HOST_CR_TERMINATION
5959
help
6060
Sets the termination ending from the serial terminal
6161
Levels are:

0 commit comments

Comments
 (0)