-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKconfig
426 lines (348 loc) · 11.2 KB
/
Kconfig
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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
#
# Copyright (c) 2018 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
#
menu "Asset tracker"
rsource "src/ui/Kconfig"
config APPLICATION_WORKQUEUE_STACK_SIZE
int "Application workqueue stack size"
default 4096
config APPLICATION_WORKQUEUE_PRIORITY
int "Application workqueue priority"
default SYSTEM_WORKQUEUE_PRIORITY
menu "GPS"
choice
prompt "GPS device"
default GPS_USE_SIM
help
Select from which device GPS data will be fetched.
config GPS_USE_SIM
bool "Use GPS simulator"
select GPS_SIM
select GPS_SIM_TRIGGER
help
Use simulated GPS data.
config GPS_USE_EXTERNAL
bool "User provided GPS device"
help
Provide a GPS device that location data will be fetched from and
sent to nRF Cloud
endchoice
config GPS_DEV_NAME
string "GPS device name"
default GPS_SIM_DEV_NAME if GPS_USE_SIM
help
GPS device from which location data will be fetched and sent
to nRF Cloud.
config GPS_CONTROL_ON_LONG_PRESS
bool "Control the GPS state with button"
default y
help
Control the GPS operation with long-press on the button.
Press for 5 seconds to enable, or 5 seconds to disable.
config GPS_CONTROL_PSM_ENABLE_ON_START
bool "Enable PSM when starting GPS"
help
The nRF9160 modem needs to be set in PSM mode for the GPS to start
searching for satellites. Enabling this option will do so
automatically, otherwise the application must handle it.
config GPS_CONTROL_PSM_DISABLE_ON_STOP
bool "Disable PSM when stopping GPS"
help
Selecting this option will disable PSM when the GPS is stopped.
During a PSM interval, the device is not reachable from the outside
until the interval times out, or the device itself attempts to
send data on the link.
config GPS_CONTROL_FIRST_FIX_CHECK_DELAY
int "Time from Cloud conenction until first fix check"
default 30
help
The amount of time that should pass between successfully establishing
connection to cloud until first attempt to get position fix.
Attempting to get a fix means entering PSM mode, in which the device
is not reachable for the duration of the interval, or until the
device itself sends data and then for the duration for the set
active time thereafter.
config GPS_CONTROL_FIX_CHECK_INTERVAL
int "Interval in seconds to between check for position fix"
default 120
help
The fix check interval gives the interval for how long it will go
between each retry to achieve position fix. The actual fix time will
vary with factors such as satellite coverage, surrounding buildings
and landscape, PSM interval and activity time requested and granted
by the network.
config GPS_CONTROL_FIX_CHECK_OVERDUE
int "Longest allowed time in seconds between checks for position fix"
default 900
help
The fix check interval gives the interval for how long it will go
between each retry to achieve position fix, when GPS_START_ON_MOTION
enabled, even if no motion is detected.
config GPS_CONTROL_FIX_TRY_TIME
int "Time in seconds to try to get fix"
default 180
help
Amount of time the device will attempt to get position fix. Note that
if the interval is interrupted by the device sending data, the timer
is not reset, and the actual try time will be shortened due to
the device not being in PSM mode all the time. If fix is not acquired
before it times out, the device will try to get fix again in
GPS_CONTROL_FIX_CHECK_INTERVAL seconds. If GPS_CONTROL_FIX_COUNT is reached
before the full GPS_CONTROL_FIX_TRY_TIME has passed, the GPS will be stopped.
config GPS_CONTROL_FIX_COUNT
int "Number of position fix before stopping GPS"
default 3
help
The number of fixes to get before stopping the GPS, within the time
set in GPS_CONTROL_FIX_CHECK_INTERVAL.
config GPS_CONTROL_MAX_FAILED_FIX_ATTEMPTS
int "Number of failed fix attempts before stopping GPS"
default 3
help
Number of retries to get fix before shutting down the GPS until user
input tells it to start retrying.
config GPS_START_ON_MOTION
bool "Motion triggered GPS update"
default n
help
When accelerometer detects movement, and GPS is enabled, update GPS
position, but if no movement, wait a longer delay between updates
to conserve power.
endmenu # GPS
menu "Device and modem"
config POWER_OPTIMIZATION_ENABLE
bool "Enable power optimization"
default y
select LTE_EDRX_REQ
if MODEM_INFO
config HOLD_TIME_RSRP
int "Minimum time [s] between RSRP subscription messages"
default 60
help
The minimum time in seconds where the modem
informer is allowed to submit RSRP data to the cloud.
endif
endmenu # Device
menu "Motion"
choice
prompt "Accelerometer device"
default ACCEL_USE_SIM
help
Select which device will provide accelerometer data.
config ACCEL_USE_SIM
bool "Use simulated accelerometer data"
select SENSOR
select SENSOR_SIM
select SENSOR_SIM_TRIGGER
select SENSOR_SIM_STATIC_VALUES
help
Use sensor simulator to generate accelerometer data for
flip detection data sent to nRF Cloud.
config ACCEL_USE_EXTERNAL
bool "User provided accelerometer device"
help
The user will provide an accelerometer device that will
be used for flip detection.
endchoice
if ACCEL_USE_SIM
config ACCEL_DEV_NAME
string
default SENSOR_SIM_DEV_NAME
config ACCEL_TRIGGER
bool
default SENSOR_SIM_TRIGGER
config FLIP_INPUT
int "Button or switch number to simulate flip"
range 1 4 if BOARD_NRF9160DK_NRF9160NS
range 1 1 if BOARD_NRF9160_PCA20035NS
default 3 if BOARD_NRF9160DK_NRF9160NS
default 1 if BOARD_NRF9160_PCA20035NS
help
Button or switch number to use for simulating
a board flip event.
1 - Button 1
2 - Button 2
3 - Switch 1
4 - Switch 2
endif
if ACCEL_USE_EXTERNAL
config ACCEL_DEV_NAME
string "Accelerometer device name"
help
Device from which accelerometer data will be fetched and used
for orientation detection and sent to nRF Cloud.
endif
config ACCEL_INVERTED
bool "Accelerometer inverted"
default y if BOARD_NRF9160_PCA20035NS
help
Enable if the accelerometer is mounted with the top side facing
down when the board itself is in normal position.
endmenu # Motion
menu "Cloud"
config MQTT_KEEPALIVE
int "Time after last transmission to send a ping to keep connection on"
default 1200
help
This should be set to the expected time between messages sent from
this device. Making it larger than the expected data period does not
conserve bandwidth, as the ping is only sent if nothing else
has been within the specified period. Shorter values can prevent hidden
NAT timeouts at the carrier, but also will interrupt GPS fix attempts
and slow down TTFF.
config CLOUD_BUTTON
bool "Enable button sensor"
default y
config CLOUD_BUTTON_INPUT
int "Set button sensor button number"
range 1 4 if BOARD_NRF9160DK_NRF9160NS
range 1 1 if BOARD_NRF9160_PCA20035NS
default 1
config CLOUD_CONNECT_RETRY_DELAY
int "Cloud connection retry delay in seconds"
default 480
help
Time to wait before trying to reconnect to the cloud if the
previous attempt failed (in seconds).
config CLOUD_CONNECT_COUNT_MAX
int "Maximum number of cloud connection attempts"
default 8
help
Maximum number of unsuccessful cloud connection attempts.
Device will wait for the value defined by CLOUD_CONNECT_RETRY_DELAY
between attempts.
config CLOUD_WAIT_DURATION
int "Cloud connection acknowledge wait duration"
default 30
help
How long the device should wait for a CONNACK
event from the cloud when connecting. Device will reboot
if an ack is not received within the duration.
config CLOUD_FOTA_APP
bool "Enable firmware over-the-air upgrades for application"
depends on AWS_FOTA
depends on DFU_TARGET_MCUBOOT
default y
config CLOUD_FOTA_MODEM
bool "Enable firmware over-the-air upgrades for modem"
depends on AWS_FOTA
depends on DFU_TARGET_MODEM
default y
config CLOUD_CONNECT_ERR_REBOOT_S
int "Seconds to wait before rebooting when a cloud connect error occurs"
default 300
endmenu # Cloud
menu "Environment sensors"
config USE_BME680_BSEC
bool "Use Bosch BME680 BSEC lib"
default n
help
Enable use of Bosch BSEC library. The library itself is not a part of
NCS and must be downloaded from Bosch Sensortec.
config BOSCH_BSEC_LIBRARY_PATH
string "Path to Bosch BSEC library folder"
default "$(ZEPHYR_BASE)/../nrf/ext/BSEC_1.4.7.4_Generic_Release"
help
Path to the folder where the Bosch BSEC library is placed.
config ENVIRONMENT_DATA_SEND_INTERVAL
int "Interval in seconds for sending environment data"
default 30
help
Interval between each sampling and sending of environment sensor data.
If the GPS is active, sensor data will not be sent before it is
stopped. The unit is seconds.
config ENVIRONMENT_DATA_BACKOFF_TIME
int "Time to delay sending environment data if GPS active"
default 20
help
Time in seconds before retrying to send environment sensor data if
the GPS is active.
choice
prompt "Temperature measurement device"
default TEMP_USE_SIM
help
Select which device will provide temperature data.
config TEMP_USE_SIM
bool "Use simulated temperature data"
select SENSOR
select SENSOR_SIM
help
Use sensor simulator to generate temperature data to send to
nRF Cloud.
config TEMP_USE_EXTERNAL
bool "User provided temperature device"
help
The user provides a temperature device that is
used for temperature measurement.
endchoice
if TEMP_USE_SIM
config TEMP_DEV_NAME
string
default SENSOR_SIM_DEV_NAME
config TEMP_TRIGGER
bool
default SENSOR_SIM_TRIGGER
config TEMP_SIM_BUTTON
int "Button or switch to trigger 'data ready' event"
range 1 4 if BOARD_NRF9160DK_NRF9160NS
range 1 1 if BOARD_NRF9160_PCA20035NS
default 3 if BOARD_NRF9160DK_NRF9160NS
default 1 if BOARD_NRF9160_PCA20035NS
help
Button or switch number to use for triggering
a 'data ready' event.
1 - Button 1
2 - Button 2
3 - Switch 1
4 - Switch 2
endif
if TEMP_USE_EXTERNAL
config TEMP_DEV_NAME
string "Temperature device name"
help
Device from which temperature data will be fetched and
sent to nRF Cloud.
endif
endmenu # Environment sensors
menuconfig LIGHT_SENSOR
bool "Light sensor"
select BH1749 if BOARD_NRF9160_PCA20035NS
default y if BOARD_NRF9160_PCA20035NS
if LIGHT_SENSOR
config LIGHT_SENSOR_DEV_NAME
string "Light sensor device name"
default "BH1749" if BOARD_NRF9160_PCA20035NS
config LIGHT_SENSOR_DATA_SEND_INTERVAL
int "Interval in seconds for sending light sensor data"
default 60
help
Interval between each sampling and sending of light sensor data.
If the GPS is active, sensor data will not be sent before it is
stopped. The unit is seconds.
endif # LIGHT_SENSOR
config GPS_START_AFTER_CLOUD_EVT_READY
bool "Automatic start of GPS on CLOUD_EVT_READY event after reset"
default n
help
Enabling this will make the GPS automatically start after a reset.
Useful when operating as a GPS tracker outdoors for a longer period
of time.
config ASSET_TRACKER_WATCHDOG_TIMEOUT_MSEC
int "Watchdog timeout in milliseconds"
default 10000
config USE_AT_HOST
bool "Enable AT commands"
default y
select AT_HOST_LIBRARY
help
Enable the AT host library so that AT commands can be sent to and
received from a serial terminal.
endmenu
menu "Zephyr Kernel"
source "Kconfig.zephyr"
endmenu
module = ASSET_TRACKER
module-str = Asset Tracker
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"