forked from nrfconnect/ncs-serial-modem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKconfig
More file actions
400 lines (324 loc) · 11 KB
/
Copy pathKconfig
File metadata and controls
400 lines (324 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
#
# Copyright (c) 2019 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
source "Kconfig.zephyr"
menu "Nordic Serial Modem"
config SM_CUSTOMER_VERSION
string "Customer version string"
help
This version is reported together with baseline versions by AT command "#XSMVER".
config SM_AT_BUF_SIZE
int "AT command buffer size"
range 128 8192
default 4096
help
Size of the buffer for incoming AT commands and modem responses.
#
# external XTAL for UART
#
config SM_EXTERNAL_XTAL
bool "Use external XTAL for UARTE"
default y
#
# AT command terminator
#
choice
prompt "Termination mode"
default SM_CR_TERMINATION
help
Sets the command terminator used by the serial terminal.
Available options are:
- CR termination
- LF termination
- CR+LF termination
config SM_CR_TERMINATION
bool "CR termination"
config SM_LF_TERMINATION
bool "LF termination"
config SM_CR_LF_TERMINATION
bool "CR+LF termination"
endchoice
#
# UART buffers (when CMUX is not in use)
#
config SM_UART_RX_BUF_COUNT
int "Receive buffers for UART"
range 2 4
default 3
help
Amount of buffers for receiving (RX) UART traffic.
If the buffers are full, UART RX will be disabled until the buffers are processed.
These buffers are not used when CMUX is in use.
config SM_UART_RX_BUF_SIZE
int "Receive buffer size for UART"
range 128 4096
default 2048 if BOARD_THINGY91X_NRF9151_NS
default 256
help
Amount of received (RX), unprocessed, UART traffic that can be held by single buffer.
Increase buffer space for Thingy:91 X as hardware flow control is not used.
These buffers are not used when CMUX is in use.
config SM_UART_TX_BUF_SIZE
int "Send buffer size for UART"
range 128 4096
default 256
help
Amount of UART traffic waiting to be sent (TX), that can be held.
If the buffers are full, will send synchronously.
These buffers are not used when CMUX is in use.
config SM_URC_BUFFER_SIZE
int "TX buffer size for unsolicited result codes (URC)"
default 4096
help
Buffer, in which unsolicited result codes (URC) are stored before being sent to the host.
The buffer has to be large enough to hold the largest URC that can be sent by the modem.
Result codes longer than this size will get dropped.
The URC in here means an URC from the Modem or from a thread which is not serving sm_work_queue.
Messages that are originally sent from sm_work_queue are part of AT-command responses, even though they are indistinguishable from the URCs.
This can be reduced if your use cases do not require lengthy notifications.
Note: %NCELLMEAS notifications can be nearly 4kB in size,
which explains the default value.
config SM_AT_ECHO_MAX_LEN
int "Maximum length of AT command echo"
range 2 4096
default 4096
help
Maximum length of AT command echo that will be sent back to the host when AT command echo is enabled.
AT commands longer than this value will be truncated in the echo.
The AT command terminator is included in this length and it is always echoed.
config SM_URC_DELAY_WITH_INCOMPLETE_ECHO_MS
int "Delay for URC transmission when incomplete AT command echo is in progress (ms)"
default 1000
help
When AT command echo is enabled, and the command is spread over multiple RX buffers,
due to its length, or the speed of incoming data (typing), the command echo is considered incomplete
until the final part of the command (terminating character) has been received and echoed back to the host.
When the AT command echo is incomplete, URC transmissions are delayed by this amount of time for every
RX buffer (keystroke, while typing) received until the command echo is complete.
#
# Automatic network attach
#
config SM_AUTO_CONNECT
bool "Automatically connect to the network on start-up or after a reset"
help
Enables automatic connection to the network using the PDN configuration.
if SM_AUTO_CONNECT
config SM_AUTO_CONNECT_SYSTEM_MODE
string "System mode for automatic network attach"
default "1,1,1,0"
help
Defines the default system mode using '%XSYSTEMMODE' AT command for automatic network attach.
The format is a comma-separated list of four integers. See the AT command reference for +XSYSTEMMODE for more details.
Default value enables LTE-M, NB-IoT, and GNSS, with no LTE preference.
config SM_AUTO_CONNECT_PDN_CONFIG
bool "PDN configuration for automatic network attach"
help
Enables sending of PDN configuration during automatic network attach.
if SM_AUTO_CONNECT_PDN_CONFIG
config SM_AUTO_CONNECT_PDN_APN
string "APN for automatic network attach"
default ""
help
APN to use for automatic network attach.
If left empty, the APN configured in the modem will be used.
choice SM_AUTO_CONNECT_PDN_FAMILY
prompt "PDN family (IP type) for automatic network attach"
default SM_AUTO_CONNECT_PDN_FAMILY_IPV4V6
help
Select the PDN family (IP address type) to use for automatic network attach.
See AT command reference for +CGDCONT for more details.
config SM_AUTO_CONNECT_PDN_FAMILY_IP
bool "IPv4"
help
Use IPv4 only for the PDN connection.
config SM_AUTO_CONNECT_PDN_FAMILY_IPV6
bool "IPv6"
help
Use IPv6 only for the PDN connection.
config SM_AUTO_CONNECT_PDN_FAMILY_IPV4V6
bool "IPv4 and IPv6"
help
Use both IPv4 and IPv6 for the PDN connection (dual stack).
config SM_AUTO_CONNECT_PDN_FAMILY_NON_IP
bool "Non-IP"
help
Use Non-IP PDN type for the connection.
This is used for data transmission without IP headers.
endchoice
config SM_AUTO_CONNECT_PDN_FAMILY_STRING
string
default "IP" if SM_AUTO_CONNECT_PDN_FAMILY_IP
default "IPV6" if SM_AUTO_CONNECT_PDN_FAMILY_IPV6
default "IPV4V6" if SM_AUTO_CONNECT_PDN_FAMILY_IPV4V6
default "Non-IP" if SM_AUTO_CONNECT_PDN_FAMILY_NON_IP
help
Internal use only. Represents the selected PDN family as a string.
config SM_AUTO_CONNECT_PDN_AUTH
int "PDN authentication type for automatic network attach"
default 0
range 0 2
help
PDN authentication type to use for automatic network attach.
0 = None
1 = PAP
2 = CHAP
config SM_AUTO_CONNECT_PDN_USERNAME
string "PDN username for automatic network attach"
default ""
help
PDN username to use for automatic network attach.
Leave empty if no username is required.
config SM_AUTO_CONNECT_PDN_PASSWORD
string "PDN password for automatic network attach"
default ""
help
PDN password to use for automatic network attach.
Leave empty if no password is required.
endif # SM_AUTO_CONNECT_PDN_CONFIG
endif # SM_AUTO_CONNECT
#
# Data mode
#
config SM_DATAMODE_TERMINATOR
string "Pattern string to terminate data mode"
default "+++"
help
Use a pattern to terminate data mode
config SM_DATAMODE_BUF_SIZE
int "Buffer size for data mode"
range 1024 8192
default 4096
help
Size of the buffer for data received in data mode.
#
# Configurable services
#
config SM_SMS
bool "SMS support"
default y
select SMS
help
Support SMS send/receive in plain text
config SM_GNSS
bool "GNSS support"
default y
config SM_NRF_CLOUD
bool "nRF Cloud support"
default y
select EXPERIMENTAL
if SM_NRF_CLOUD
config HEAP_MEM_POOL_ADD_SIZE_SM_NRF_CLOUD
int "Additional heap memory pool size for nRF Cloud support"
default 8192
help
Some libraries used by nRF Cloud use System Heap (k_malloc() / k_free()) for
dynamic memory allocation.
endif # SM_NRF_CLOUD
config SM_NRF_CLOUD_LOCATION
bool "nRF Cloud Location support"
depends on SM_NRF_CLOUD
help
Enable the nRF Cloud Location service for cloud-assisted geolocation.
Supports cellular and Wi-Fi positioning.
config SM_MQTTC
bool "MQTT client support"
default y
select MQTT_LIB
select MQTT_LIB_TLS
select EXPERIMENTAL
config SM_FULL_FOTA
bool "Full modem FOTA support"
config SM_DFU_MODEM_FULL
bool "Full modem DFU support"
config SM_PPP
bool "PPP support"
config SM_CMUX
bool "CMUX support"
config SM_CMUX_CHANNEL_COUNT
int "Number of CMUX channels"
depends on SM_CMUX
default 2
range 1 63
help
Number of channels to be used by the CMUX implementation.
Each channel adds about 4 kB of RAM usage for buffers.
if SM_PPP
config SM_PPP_FALLBACK_MTU
int "Fallback MTU to be used by PPP"
default 1280
help
PPP tries to retrieve the cellular link MTU from the modem (using `AT+CGCONTRDP`).
If no MTU is returned by the modem, this value will be used as a fallback.
The MTU will be used for sending and receiving of data on both the PPP and cellular links.
endif # SM_PPP
if SM_CMUX || SM_PPP
config SM_MODEM_PIPE_TIMEOUT
int "Timeout for the CMUX and PPP modem pipe operations in seconds"
default 10
endif # SM_CMUX || SM_PPP
if SM_MQTTC
config SM_MQTTC_MESSAGE_BUFFER_LEN
int "Size of the buffer for MQTT library"
default 512
help
Specifies maximum message size that can be transmitted/received through
MQTT (excluding MQTT PUBLISH payload).
endif # SM_MQTTC
if SM_GNSS
config SM_GNSS_OUTPUT_NMEA_SATELLITES
bool "Output NMEA satellite messages (GSV, GSA)"
default y if SM_LOG_LEVEL_DBG
depends on SM_LOG_LEVEL_DBG
help
If enabled, NMEA messages that pertain to the satellites will be output
along with the other NMEA messages. Those are output in debug logs.
config SM_PGPS_INJECT_FIX_DATA
bool "Inject the data obtained when acquiring a fix"
default y
depends on SM_GNSS
depends on SM_NRF_CLOUD
depends on NRF_CLOUD_PGPS
help
If enabled, when a fix is acquired the current location and time will
be passed to the P-GPS subsystem.
It allows to speed up the time it takes to acquire the next fix when
A-GNSS is disabled or unavailable.
This can be detrimental to short TTFF if the device is expected to move
distances longer than a few dozen kilometers between fix attempts.
In that case this option should be disabled.
endif # SM_GNSS
if NRF_MODEM_LIB_TRACE
choice NRF_MODEM_LIB_TRACE_BACKEND
config SM_MODEM_TRACE_BACKEND_CMUX
bool "CMUX modem trace backend"
depends on SM_CMUX_CHANNEL_COUNT > 2
help
When CMUX is enabled, modem traces are transmitted on a dedicated CMUX channel.
The trace channel is the first channel after the AT command channel and the PPP channel.
endchoice # NRF_MODEM_LIB_TRACE_BACKEND
endif
#
# Hardware RX byte counting for UART
#
# Either hardware flow control OR hardware RX byte counting is required to prevent RX data loss.
# When hw-flow-control is enabled in devicetree, it handles flow management efficiently.
# When hw-flow-control is disabled, hardware RX byte counting is enabled to prevent data loss,
# but it consumes more power due to additional timer usage.
#
if UART_ASYNC_API
config UART_0_NRF_HW_ASYNC
default y if HAS_HW_NRF_UARTE0 && !$(dt_nodelabel_bool_prop,uart0,hw-flow-control)
config UART_0_NRF_HW_ASYNC_TIMER
default 0 if HAS_HW_NRF_UARTE0 && !$(dt_nodelabel_bool_prop,uart0,hw-flow-control)
config UART_2_NRF_HW_ASYNC
default y if HAS_HW_NRF_UARTE2 && !$(dt_nodelabel_bool_prop,uart2,hw-flow-control)
config UART_2_NRF_HW_ASYNC_TIMER
default 2 if HAS_HW_NRF_UARTE2 && !$(dt_nodelabel_bool_prop,uart2,hw-flow-control)
endif # UART_ASYNC_API
module = SM
module-str = serial modem
source "$(ZEPHYR_BASE)/subsys/logging/Kconfig.template.log_config"
rsource "src/lwm2m_carrier/Kconfig"
endmenu