Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
6454e91
bootloader: Make B0 unaware of MCUboot padding
oyvindronningstad Oct 1, 2019
4006121
bluetooth: controller: Let the controller decide its mempool size
Oct 2, 2019
554b84b
doc: Alias __PACKED_STRUCT to struct in doxyfile
Oct 11, 2019
571febd
manifest: Update ble-controller
Oct 11, 2019
1e847d1
samples: bluetooth: peripheral_lbs: remove redundant defines
kapi-no Oct 11, 2019
7df2465
samples: bluetooth: peripheral_uart: dk library for led
kapi-no Oct 11, 2019
b0d28d1
drivers: nrf9160_gps: Add COEX0 configuration
bjda Aug 22, 2019
9beb6f9
drivers: Add driver to disable flash patch
oyvindronningstad Oct 1, 2019
9537d21
manifest: Update manifest to include nrf cc310 crypto v0.9.0.
tejlmand Oct 1, 2019
07fe365
include: net: Cloud API extension
simensrostad Oct 9, 2019
e821bd0
lib: modem_info: Library extension
simensrostad Oct 7, 2019
0f34617
doc: cmake: Remove assignments to unused env. vars
ulfalizer Oct 1, 2019
a795a05
doc: cmake: Add a blurb and comments to clarify how the docs are built
ulfalizer Oct 2, 2019
d5d760e
doc: cmake: Remove unused CMake variables
ulfalizer Oct 2, 2019
e1da43c
doc: cmake: Move mbedtls config file creation into nrfxlib section
ulfalizer Oct 2, 2019
f9fa727
doc: cmake: Various CMakeLists.txt nits
ulfalizer Oct 2, 2019
0234703
doc: cmake: Move NRF_DOC_DIR and MCUBOOT_DOC_DIR
ulfalizer Oct 3, 2019
1cbfb03
applications: nrf_desktop: Fix ble_state conn handling
MarekPieta Oct 14, 2019
460c430
manifest: Update mbed TLS to point out 2.16.3.
tejlmand Oct 15, 2019
1984ce4
applications: nrf_desktop: Extend heap and HID event queueue size
ppryga-nordic Oct 15, 2019
675827d
applications: nrf_desktop: Shrink bootloader partition for release
pdunaj Oct 16, 2019
bf0cbb7
applications: nrf_desktop: Workaround for USB callback race
pdunaj Oct 16, 2019
9eb88a1
bluetooth: controller: Master and slave role count config
pdunaj Oct 15, 2019
c344ad6
applications: nrf_desktop: Integrate LLPM
pdunaj Jul 17, 2019
bb794d5
applications: nrf_desktop: Disable keyboard debug mcuboot build
pdunaj Oct 16, 2019
dcc3916
applications: nrf_desktop: BLE state fix conn handling
MarekPieta Oct 16, 2019
78ae6c8
lib: modem_info: Fix area code string termination
jtguggedal Oct 16, 2019
7a9b1e1
applications: nrf_desktop: BLE scan restart on disconnection
MarekPieta Oct 16, 2019
7b9084a
scripts: profiler: Fix initialization
MarekPieta Oct 16, 2019
0ad854d
scripts: hid_configurator: Add led stream
mip1-nordic Aug 20, 2019
46139b8
bootloader: Move validation logic into bl_validation.c/h
oyvindronningstad Oct 11, 2019
5635d06
bootloader: bl_validation: Move most h file content to c file
oyvindronningstad Oct 11, 2019
d9cd061
bootloader: bl_validation: Add Kconfig and refactor
oyvindronningstad Aug 23, 2019
dee5d3b
ext: cJSON: Update cJSON library to version v1.7.12
sigvartmh Jun 3, 2019
5b59ca7
ext: cjson: Add secure enhancements to CJSON
sigvartmh Oct 14, 2019
e5b8983
manifest: update nrfxlib
lemrey Oct 10, 2019
c23d248
fw_metadata: Add Kconfig template for ABIs
oyvindronningstad Oct 12, 2019
924c1dd
tests: bl_crypto: Fix test
oyvindronningstad Oct 12, 2019
2154ab2
applications: nrf_desktop: Change connection params update timeout to 1s
ppryga-nordic Oct 17, 2019
094ce13
doc: Update dev model diagram
carlescufi Oct 11, 2019
d796834
doc: dev model: Add a paragraph about forks
carlescufi Oct 11, 2019
14d5b32
applications: nrf_desktop: Fix selector GPIO port handling
MarekPieta Oct 18, 2019
4a2c6a2
applications: nrf_desktop: GPIO device assert in buttons
MarekPieta Oct 18, 2019
fdfdfb4
applications: nrf_desktop: BLE latency handling
MarekPieta Oct 16, 2019
d18165e
applications: nrf_desktop: Do not scan for connected devices
MarekPieta Oct 17, 2019
26e977f
applications: nrf_desktop: Add buttons debouncing
pdunaj Oct 18, 2019
5e9cb93
net: aws_jobs: Fix aws_jobs_cmp matching empty string
bjda Oct 18, 2019
b610273
applications: asset_tracker: Stop sending invalid RSRP values
jtguggedal Oct 17, 2019
4c23c9d
drivers: Add fprotect driver (moved from bootloader)
oyvindronningstad Oct 15, 2019
1693b6b
drivers: nrf9160_gps: Improve satellite tracking log
bjda Oct 11, 2019
604db9c
spm: fix include issue
hakonfam Oct 14, 2019
f4faf06
spm: enable FW_METADATA config for users of SPM
hakonfam Oct 15, 2019
7105d46
secure_services: add function to read firmware info
hakonfam Oct 1, 2019
cb1d88b
subsys: dfu: dfu_target: Add generic target API for DFU operations
sigvartmh Oct 10, 2019
7f9ad90
subsys: net: lib: fota_download: Change to use dfu_target API
sigvartmh Oct 10, 2019
9ca460d
samples: nrf9160: http_application_update: Add modem DFU support
sigvartmh Oct 10, 2019
0c24d72
samples: nrf9160: aws_fota: Add modem DFU support
sigvartmh Oct 10, 2019
34c5880
scripts: hid_configurator: GUI DFU handling update
mip1-nordic Sep 19, 2019
58ca681
bluetooth: controller: Fix clock config macro usage
pdunaj Oct 22, 2019
11f9078
manifest: Update nrfxlib version
gbakke Oct 21, 2019
22ddf3d
samples: nrf_cloud: switch to Zephyr MQTT
rlubos Nov 20, 2018
ef63e69
net: mqtt: Remove internal copy of the library
rlubos Nov 26, 2018
c815635
subsys: profiler: Fix warning
jbrzozoski Aug 10, 2019
a975449
tests: unity: Fix example compilation
nordic-krch Sep 23, 2019
0989c67
subsys: spm: added FICR ranges in read request service.
Sep 27, 2019
a2fae4f
samples: secure_services: added example to read FICR.
Oct 9, 2019
6cd13b7
manifest: update mcuboot
nvlsianpu Oct 18, 2019
930bfb0
spm: add NRF_DPPIC
Rallare Sep 5, 2019
d7dc85a
samples: nrf9160: aws_fota: Add warning with regards to provisioning
sigvartmh Oct 9, 2019
67ded39
lib: at_notif: Added module.
Oct 3, 2019
585f6e1
lib: register at_notif to Kconfig and cmake.
Oct 3, 2019
16ae282
drivers: lte_lc: use registration interfaces from at_notif.
Oct 3, 2019
09d17ac
lib: at_host: use registration interface from at_notif.
Oct 3, 2019
90c3504
lib: modem_info: use registration interface from at_notif.
Oct 3, 2019
677a33e
gps: fix ms member type
Rallare Oct 22, 2019
3446062
drivers: nrf9160_gps: copy *dop variables
Rallare Oct 22, 2019
3f5dd08
lib: modem_info: Increase %CESQ notification parameter count
jtguggedal Oct 18, 2019
cdfcead
applications: asset_tracker: add service info JSON
jayteemo Oct 14, 2019
b1ebd1f
bluetooth: controller: Remove unused function
rugeGerritsen Oct 21, 2019
ddbe7c1
bluetooth: controller: Use HCI_MSG_BUFFER_MAX_SIZE instead of 255+4
rugeGerritsen Oct 21, 2019
5873bbb
bluetooth: controller: Fetch data and events until no more available
rugeGerritsen Oct 21, 2019
5238140
lib: at_cmd_parser: Fix unqoted strings parsing
rlubos Oct 16, 2019
df50c52
Revert "samples: nrf9160: aws_fota: Add warning with regards to provi…
thst-nordic Oct 23, 2019
7feb77f
manifest: upgrade mcuboot revision
nvlsianpu Oct 22, 2019
780ce1b
doc: fix typo
hakonfam Oct 9, 2019
3dbf5d2
ci: update gitlint wrt. upstream changes
Rallare Oct 23, 2019
cc29d28
drivers: at_cmd: fix size_t header dependency
Rallare Oct 23, 2019
feb5156
manifest: update zephyr and tinycbor
ioannisg Oct 18, 2019
608424c
boards: arm: Update nrf_desktop boards
MarekPieta Oct 21, 2019
fc2bd32
samples: sensor: Fix DTS bindings for bh1749 sensor
carlescufi Oct 21, 2019
405209e
doc: add --kconfig to genrest.py calls in nrf/doc/Cmakelists
thst-nordic Oct 22, 2019
9219189
applications: asset_tracker: add light sensor
jayteemo Oct 19, 2019
2ab5f79
samples: lwm2m_client: Update DNS in project configuration
rlubos Oct 15, 2019
4892d2a
applications: nrf_desktop: Remove using NULL pointer in selector
MarekPieta Oct 23, 2019
4be0c6b
applications: nrf_desktop: Move BLE latency updated log
MarekPieta Oct 21, 2019
3df223a
applications: nrf_desktop: Change slave latency
ppryga-nordic Sep 6, 2019
cc03374
Bluetooth: Services: NUS: Fix bt_gatt_nus_send with given conn
joerchan Oct 11, 2019
842b392
Bluetooth: samples: Print bluetooth address in callbacks for NUS sample
joerchan Oct 11, 2019
cff31df
Bluetooth: samples: Peripheral UART sample only supports one connection
joerchan Oct 11, 2019
1474835
west.yml: snapshot mcuboot and zephyr
mbolivar-nordic Oct 24, 2019
8afeca2
west.yml: switch to new mcuboot and zephyr histories
mbolivar-nordic Oct 24, 2019
c2a47a2
west.yml: update zephyr and mcuboot
mbolivar-nordic Oct 24, 2019
0a9d1b7
scripts: west_commands: add -s option to ncs-loot
mbolivar-nordic Oct 24, 2019
27fdc27
net: download_client: retry on errors when callback returns zero
lemrey Oct 7, 2019
202af0c
bluetooth: controller: Update west to ble_controller_0.3.0-3.prealpha
rugeGerritsen Oct 24, 2019
cbacc32
lib: bsdlib: Set offloaded flag on nRF91 interface
rlubos Oct 16, 2019
68c52a5
manifest: update nrfxlib
lemrey Oct 24, 2019
d4a23f9
bsdlib: add RAW socket offloading
lemrey Oct 24, 2019
6d765ca
samples: nrf9160: aws_fota: Add warning with regards to provisioning
sigvartmh Oct 9, 2019
e9f0bc0
manifest: update nrfxlib for Oberon 3.0.2
tejlmand Oct 23, 2019
ec3de77
applications: nrf_desktop: Add BLE whitelisting
MarekPieta Oct 15, 2019
3ee6ece
samples: nrf9160: aws_fota: Remove disconnect on AWS Fota failure
sigvartmh Oct 28, 2019
821f69e
net: lib: aws_fota: Move device shadow out of library and into sample
sigvartmh Oct 25, 2019
751cbe9
dfu: support parsing paths for B1 MCUBoot upgrades
hakonfam Oct 15, 2019
b406740
tests: add test for dfu_target_mcuboot
hakonfam Oct 28, 2019
080ca73
tests: add test for fota_download_start
hakonfam Oct 28, 2019
ae1ce5a
Bluetooth: Mesh: Add mesh models module
trond-snekvik Sep 30, 2019
7e9c9d9
Bluetooth: Mesh: Generic OnOff models
trond-snekvik Sep 30, 2019
6c5f2ea
Bluetooth: Mesh: Generic Level models
trond-snekvik Oct 14, 2019
403f69f
Bluetooth: Mesh: Generic DTT models
trond-snekvik Oct 14, 2019
512bcdc
Bluetooth: Mesh: Generic Power OnOff models
trond-snekvik Oct 14, 2019
203496c
Bluetooth: Mesh: Generic Power Level models
trond-snekvik Oct 14, 2019
db1290f
Bluetooth: Mesh: Generic Battery models
trond-snekvik Oct 14, 2019
2d2a2d1
Bluetooth: Mesh: Generic Location models
trond-snekvik Oct 14, 2019
44bc7e7
Bluetooth: Mesh: Generic Property models
trond-snekvik Oct 14, 2019
1fc2c7c
codeowners: Add mesh module
trond-snekvik Oct 4, 2019
0ec845d
samples: nrf9160: aws_fota: Add AT Notify initialization
sigvartmh Oct 28, 2019
7f0bdbb
samples: nrf9160: http_application_update: Add AT Notify initialization
sigvartmh Oct 28, 2019
dd365fa
fw_metadata: Rename fw_metadata to fw_info
oyvindronningstad Oct 16, 2019
2ca6e9c
fw_info: Add documentation
oyvindronningstad Oct 16, 2019
031762c
nrf_cc310: Adding CC310 entropy driver utilizing nrf_cc310_platform lib
frkv May 16, 2019
967c058
drivers: entropy: add dependency of BT_LL_SW_LEGACY not set
tejlmand Oct 25, 2019
db0ef18
drivers: hw_cc310: Driver will default be deselected when using mcuboot
tejlmand Oct 25, 2019
c2f2a9a
sample: lwm2m carrier entropy dependency
tejlmand Oct 25, 2019
cdb864f
entropy: cc310 dependency to mpu settings introduced
tejlmand Oct 28, 2019
d112fe2
manifest: update fw-nrfconnect-zephyr
nvlsianpu Oct 28, 2019
d46e4fe
net: cloud: Add FOTA_DONE event
bjda Oct 25, 2019
e6c7468
net: lib: nrf_cloud: Add AWS jobs FOTA support
bjda Oct 25, 2019
5280b71
lib: bsdlib: Add bsdlib_get_init_ret function
bjda Oct 28, 2019
cd7c603
applications: asset_tracker: Enable FOTA
bjda Oct 25, 2019
ac09cf9
doc: samples: update AWS FOTA sample documentation
Oct 7, 2019
29f9cce
doc: libraries: update AWS FOTA libraries documentation
Oct 10, 2019
c28ee6e
net: lib: aws_fota: Add AWS_FOTA prefix to Kconfigs
sigvartmh Oct 15, 2019
19edb52
applications: asset_tracker: Fix incorrect symbol use
rlubos Oct 29, 2019
35fadd3
entropy: cc310: Use cc310 with MPU
tejlmand Oct 30, 2019
ef1097b
nrf_desktop: deselect the use of cc310 entropy
tejlmand Oct 30, 2019
41b5942
lib: modem_info: Fix param count check
rlubos Oct 30, 2019
fd0c323
lte_link_control: add to support unlocking PLMN
junqingzou Oct 31, 2019
a338963
lib: bsdlib: imply socket offloading instead of selecting it
lemrey Oct 29, 2019
cd1dbcf
applications: nrf_desktop: Disable CC310 for all devices
pdunaj Oct 31, 2019
b1d195d
net: lib: nrf_cloud: Check for correct state on disconnect
jtguggedal Oct 31, 2019
21efc6b
applications: nrf_desktop: Support constant latency
pdunaj Oct 30, 2019
46a66d6
applications: asset_tracker: Enable flash support
jtguggedal Oct 31, 2019
491d68a
applications: nrf_desktop: BLE Central QoS feature
nordic-auko Oct 18, 2019
4230c7e
manifest: update fw-nrfconnect-zephyr
sofu1 Oct 31, 2019
2743474
bootloader: Allow provision.hex to be overridden from the app's
oyvindronningstad Oct 31, 2019
89c59db
bootloader: bl_validation: Fix looping through public keys
oyvindronningstad Oct 31, 2019
f96b920
bootloader: provision: Fix bug in fetching of public key hashes.
oyvindronningstad Nov 1, 2019
02f4df0
bootloader: bl_validation: Fix printing
oyvindronningstad Oct 31, 2019
c5f4841
bootloader: Add Kconfig for placing the public key at the end.
oyvindronningstad Nov 1, 2019
dd65fc7
tests: bootloader: Add bl_validation test
oyvindronningstad Nov 1, 2019
0fd175f
bootloader: bl_crypto_client: Fixup for firmware info ABI renaming
sigvartmh Oct 29, 2019
9d32bc2
applications: nrf_desktop: Scan for new devices on request
pdunaj Oct 31, 2019
38625ba
net: lib: fota_download: Retry on download socket errors
jbrzozoski Oct 31, 2019
8273d09
samples: nrf9160: aws_fota: Add human readable IP print out
sigvartmh Oct 31, 2019
e208dc5
applications: nrf_desktop: Update queue size for LED stream
MarekPieta Oct 30, 2019
764a4cd
scripts: hid_configurator: Shorten poll interval for LED group
MarekPieta Oct 28, 2019
32667fe
scripts: hid_configurator: Add music LED stream effect
MarekPieta Oct 29, 2019
8b5701e
Bluetooth: Services: GATT Latency service implementation
ryanjh Oct 20, 2019
2e7050a
samples: bluetooth: llpm: Add NCS example to showcase LLPM features
ryanjh Oct 30, 2019
3d72432
fw_info: rename to avoid duplicate kconfig name
hakonfam Oct 30, 2019
525ac93
lib: at_cmd_parser: Parse AT commands
rlubos Oct 30, 2019
a08bea4
tests: at_cmd_parser: Add AT command parse test
rlubos Oct 30, 2019
573a329
Bluetooth: Services: Refactor bluetooth services Kconfig
joerchan Oct 31, 2019
a35b202
Bluetooth: Kconfig: Remove select of undefined config
joerchan Nov 1, 2019
dbe74ff
drivers: at_cmd: Add more logging
jbrzozoski Oct 22, 2019
11d7bd1
bootloader: force multi image mcuboot when b0 enabled
hakonfam Oct 30, 2019
b8b81a5
applications: nrf_desktop: LED indicates peer search
pdunaj Nov 5, 2019
739daf4
manifest: Adding nrf_cc310_mbedcrypto v0.9.1
frkv Nov 4, 2019
5ff8db8
samples: nrf9160: Serial LTE Modem sample
junqingzou Nov 5, 2019
d1bd96e
bootloader: debug_keys.cmake: Resolve paths if not absolute
oyvindronningstad Oct 29, 2019
a704c22
entropy: cc310 driver depends on !BT_LLL_VENDOR_NORDIC
tejlmand Oct 31, 2019
06e7915
doc: Adding documentation for AT Client sample
umapraseeda Sep 25, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .gitlint
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ debug = false
extra-path=../zephyr/scripts/gitlint

[title-max-length-no-revert]
line-length=72
line-length=75

[body-min-line-count]
min-line-count=1
Expand All @@ -22,7 +22,7 @@ min-line-count=1
max-line-count=200

[title-starts-with-subsystem]
regex = ^(([^:]+):)(\s([^:]+):)*\s(.+)$
regex = ^(?!subsys:)(([^:]+):)(\s([^:]+):)*\s(.+)$

[title-must-not-contain-word]
# Comma-separated list of words that should not occur in the title. Matching is case
Expand Down
6 changes: 5 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
/include/debug/ppi_trace.h @nordic-krch
/include/ @anangl @rlubos @pizi-nordic
/include/bluetooth/ @joerchan
/include/bluetooth/mesh/ @trond-snekvik @joerchan
/include/drivers/ @anangl
/include/net/ @rlubos
/include/nfc/ @anangl @grochu
/include/shell/ @nordic-krch @jarz-nordic
/lib/at_cmd_parser/ @rlubos
/lib/at_host/ @rlubos
/lib/at_notif/ @pkchan
/lib/bsdlib/ @rlubos
/lib/modem_info/ @rlubos
/lib/pdn_management/ @rlubos
Expand All @@ -57,10 +59,12 @@ subsys/debug/CMakeLists.txt @nordic-krch
/scripts/ @mbolivar @tejlmand
/scripts/hid_configurator/ @pdunaj
/subsys/bluetooth/ @joerchan @carlescufi
/subsys/bluetooth/mesh/ @trond-snekvik @joerchan
/subsys/bootloader/ @hakonfam @ioannisg
/subsys/dfu/ @hakonfam @sigvartmh
/subsys/enhanced_shockburst/ @Raane @lemrey
/subsys/event_manager/ @pdunaj
/subsys/fw_metadata/ @hakonfam
/subsys/fw_info/ @hakonfam
/subsys/net/ @rlubos
/subsys/nfc/ @grochu @anangl
/subsys/partition_manager/ @hakonfam
Expand Down
2 changes: 2 additions & 0 deletions applications/asset_tracker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ zephyr_library_include_directories(
src/ui
src/cloud_codec
src/env_sensors
src/light_sensor
)

# Application sources
Expand All @@ -31,6 +32,7 @@ add_subdirectory(src/ui)
add_subdirectory(src/cloud_codec)
add_subdirectory(src/gps_controller)
add_subdirectory(src/env_sensors)
add_subdirectory_ifdef(CONFIG_LIGHT_SENSOR src/light_sensor)

if (CONFIG_USE_BME680_BSEC)
target_link_libraries(app PUBLIC bsec_lib)
Expand Down
33 changes: 33 additions & 0 deletions applications/asset_tracker/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,18 @@ config CLOUD_UA_CONSOLE

endchoice

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

endmenu # Cloud

menu "Environment sensors"
Expand Down Expand Up @@ -323,6 +335,27 @@ 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 USE_AT_HOST
bool "Enable AT commands"
default y
Expand Down
1 change: 0 additions & 1 deletion applications/asset_tracker/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ LED 3 and LED 4:
Application state indicated by LEDs

All LEDs (1-4):
* Blinking simultaneously: Irrecoverable error in the BSD library.
* Blinking in groups of two (LED 1 and 3, LED 2 and 4): Recoverable error in the BSD library.
* Blinking in cross pattern (LED 1 and 4, LED 2 and 3): Communication error with the nRF Cloud.

Expand Down
24 changes: 19 additions & 5 deletions applications/asset_tracker/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y

# MQTT
CONFIG_MQTT_SOCKET_LIB=y
CONFIG_MQTT_LIB_TLS=y
CONFIG_MQTT_MAX_PACKET_LENGTH=2048

# LTE link control
CONFIG_POWER_OPTIMIZATION_ENABLE=n
CONFIG_LTE_LINK_CONTROL=y
Expand Down Expand Up @@ -81,3 +76,22 @@ CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_HW_STACK_PROTECTION=y

# MCUBOOT
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUBOOT_IMG_MANAGER=y

# Flash
CONFIG_FLASH=y

# AWS FOTA
CONFIG_AWS_FOTA=y
CONFIG_AWS_FOTA_LOG_LEVEL_DBG=y
CONFIG_AWS_JOBS_LOG_LEVEL_DBG=y
CONFIG_AWS_FOTA_VERSION_STRING_MAX_LEN=128
CONFIG_DFU_TARGET=y

# Download client (needed by AWS FOTA)
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
16 changes: 11 additions & 5 deletions applications/asset_tracker/prj_nrf9160_pca20035ns.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y

# MQTT
CONFIG_MQTT_SOCKET_LIB=y
CONFIG_MQTT_LIB_TLS=y
CONFIG_MQTT_MAX_PACKET_LENGTH=2048

# LTE link control
CONFIG_POWER_OPTIMIZATION_ENABLE=n
CONFIG_LTE_LINK_CONTROL=y
Expand Down Expand Up @@ -116,3 +111,14 @@ CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUBOOT_IMG_MANAGER=y

# AWS FOTA
CONFIG_AWS_FOTA=y
CONFIG_AWS_FOTA_LOG_LEVEL_DBG=y
CONFIG_AWS_JOBS_LOG_LEVEL_DBG=y
CONFIG_AWS_FOTA_VERSION_STRING_MAX_LEN=128
CONFIG_DFU_TARGET=y

# Download client (needed by AWS FOTA)
CONFIG_DOWNLOAD_CLIENT=y
CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
3 changes: 0 additions & 3 deletions applications/asset_tracker/prj_qemu_x86.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_HANDLER=y
CONFIG_CONSOLE_GETCHAR=y

CONFIG_MQTT_SOCKET_LIB=y
CONFIG_MQTT_MAX_PACKET_LENGTH=2048
CONFIG_MQTT_LIB_TLS=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y

# TLS configuration
Expand Down
1 change: 1 addition & 0 deletions applications/asset_tracker/src/cloud_codec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

zephyr_include_directories(.)
target_sources(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cloud_codec.c)
target_sources(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/service_info.c)
48 changes: 35 additions & 13 deletions applications/asset_tracker/src/cloud_codec/cloud_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
*/


#include <stdbool.h>
#include <string.h>
#include <stdio.h>
Expand Down Expand Up @@ -185,18 +184,16 @@ static CMD_NEW_GROUP(group_get, CLOUD_CMD_GROUP_GET, CMD_ARRAY(
);

static const char *const channel_type_str[] = {
[CLOUD_CHANNEL_GPS] = "GPS",
[CLOUD_CHANNEL_FLIP] = "FLIP",
[CLOUD_CHANNEL_BUTTON] = "BUTTON",
[CLOUD_CHANNEL_TEMP] = "TEMP",
[CLOUD_CHANNEL_HUMID] = "HUMID",
[CLOUD_CHANNEL_AIR_PRESS] = "AIR_PRESS",
[CLOUD_CHANNEL_AIR_QUAL] = "AIR_QUAL",
[CLOUD_CHANNEL_LTE_LINK_RSRP] = "RSRP",
/* The "device" is intended for the shadow, which expects its objects
* to have lowercase keys.
*/
[CLOUD_CHANNEL_DEVICE_INFO] = "device",
[CLOUD_CHANNEL_GPS] = CLOUD_CHANNEL_STR_GPS,
[CLOUD_CHANNEL_FLIP] = CLOUD_CHANNEL_STR_FLIP,
[CLOUD_CHANNEL_BUTTON] = CLOUD_CHANNEL_STR_BUTTON,
[CLOUD_CHANNEL_TEMP] = CLOUD_CHANNEL_STR_TEMP,
[CLOUD_CHANNEL_HUMID] = CLOUD_CHANNEL_STR_HUMID,
[CLOUD_CHANNEL_AIR_PRESS] = CLOUD_CHANNEL_STR_AIR_PRESS,
[CLOUD_CHANNEL_AIR_QUAL] = CLOUD_CHANNEL_STR_AIR_QUAL,
[CLOUD_CHANNEL_LTE_LINK_RSRP] = CLOUD_CHANNEL_STR_LTE_LINK_RSRP,
[CLOUD_CHANNEL_DEVICE_INFO] = CLOUD_CHANNEL_STR_DEVICE_INFO,
[CLOUD_CHANNEL_LIGHT_SENSOR] = CLOUD_CHANNEL_STR_LIGHT_SENSOR,
};

static cloud_cmd_cb_t cloud_command_cb;
Expand Down Expand Up @@ -460,3 +457,28 @@ int cloud_encode_env_sensors_data(const env_sensor_data_t *sensor_data,

return cloud_encode_data(&cloud_sensor, output);
}

#if CONFIG_LIGHT_SENSOR
/* 4 32-bit ints, 3 spaces, NULL */
#define LIGHT_SENSOR_DATA_STRING_MAX_LEN ((4 * 11) + 3 + 1)
int cloud_encode_light_sensor_data(const struct light_sensor_data *sensor_data,
struct cloud_msg *output)
{
char buf[LIGHT_SENSOR_DATA_STRING_MAX_LEN];
u8_t len;
struct cloud_channel_data cloud_sensor;

if ((sensor_data == NULL) || (output == NULL)) {
return -EINVAL;
}

len = snprintf(buf, sizeof(buf), "%d %d %d %d", sensor_data->red,
sensor_data->green, sensor_data->blue, sensor_data->ir);

cloud_sensor.data.buf = buf;
cloud_sensor.data.len = len;
cloud_sensor.type = CLOUD_CHANNEL_LIGHT_SENSOR;

return cloud_encode_data(&cloud_sensor, output);
}
#endif /* CONFIG_LIGHT_SENSOR */
24 changes: 23 additions & 1 deletion applications/asset_tracker/src/cloud_codec/cloud_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
#ifndef CLOUD_CODEC_H__
#define CLOUD_CODEC_H__

#include "env_sensors.h"
#include <net/cloud.h>
#include "env_sensors.h"
#include "light_sensor.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -48,8 +49,24 @@ enum cloud_channel {
CLOUD_CHANNEL_LTE_LINK_RSRP,
/** The descriptive DEVICE data indicating its status. */
CLOUD_CHANNEL_DEVICE_INFO,
/** The RBG IR light levels on the device. */
CLOUD_CHANNEL_LIGHT_SENSOR,
};

#define CLOUD_CHANNEL_STR_GPS "GPS"
#define CLOUD_CHANNEL_STR_FLIP "FLIP"
#define CLOUD_CHANNEL_STR_BUTTON "BUTTON"
#define CLOUD_CHANNEL_STR_TEMP "TEMP"
#define CLOUD_CHANNEL_STR_HUMID "HUMID"
#define CLOUD_CHANNEL_STR_AIR_PRESS "AIR_PRESS"
#define CLOUD_CHANNEL_STR_AIR_QUAL "AIR_QUAL"
#define CLOUD_CHANNEL_STR_LTE_LINK_RSRP "RSRP"
/* The "device" is intended for the shadow, which expects its objects
* to have lowercase keys.
*/
#define CLOUD_CHANNEL_STR_DEVICE_INFO "device"
#define CLOUD_CHANNEL_STR_LIGHT_SENSOR "LIGHT"

struct cloud_data {
char *buf;
size_t len;
Expand Down Expand Up @@ -164,6 +181,11 @@ static inline void cloud_release_data(struct cloud_msg *data)
int cloud_encode_env_sensors_data(const env_sensor_data_t *sensor_data,
struct cloud_msg *output);

#if CONFIG_LIGHT_SENSOR
int cloud_encode_light_sensor_data(const struct light_sensor_data *sensor_data,
struct cloud_msg *output);
#endif /* CONFIG_LIGHT_SENSOR */

/**
* @}
*/
Expand Down
88 changes: 88 additions & 0 deletions applications/asset_tracker/src/cloud_codec/service_info.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
*/
#include <stdio.h>
#include "service_info.h"

#define SERVICE_INFO_JSON_NAME "serviceInfo"
#define UI_JSON_NAME "ui"
#define FOTAS_JSON_NAME "fota_v"
#define FOTAS_JSON_NAME_SIZE (sizeof(FOTAS_JSON_NAME) + 5)

static int add_array_obj(const char * const items[], const u32_t item_cnt,
const char * const item_name, cJSON * const obj)
{
cJSON *obj_to_add = NULL;
cJSON *str = NULL;

if ((obj == NULL) || (item_name == NULL)) {
return -EINVAL;
}

obj_to_add = cJSON_CreateArray();
if (obj_to_add == NULL) {
return -ENOMEM;
}

for (u32_t cnt = 0; cnt < item_cnt; ++cnt) {
if (items[cnt] != NULL) {
str = cJSON_CreateString(items[cnt]);
if (str == NULL) {
cJSON_Delete(obj_to_add);
return -ENOMEM;
}
cJSON_AddItemToArray(obj_to_add, str);
}
}

/* if no strings were added, use NULL object */
if (cJSON_GetArraySize(obj_to_add) == 0) {
obj_to_add->type = cJSON_NULL;
}

cJSON_AddItemToObject(obj, item_name, obj_to_add);

return 0;
}

int service_info_json_object_encode(
const char * const ui[], const u32_t ui_count, const char * const fota[],
const u32_t fota_count, const u16_t fota_version, cJSON * const obj_out)
{
int err = 0;
cJSON *service_info_obj = NULL;
char fota_name[FOTAS_JSON_NAME_SIZE];

if ((obj_out == NULL) || ((ui == NULL) && ui_count) ||
((fota == NULL) && fota_count)) {
return -EINVAL;
}

service_info_obj = cJSON_CreateObject();
if (service_info_obj == NULL) {
return -ENOMEM;
}

if (!err) {
err = add_array_obj(ui, ui_count, UI_JSON_NAME,
service_info_obj);
}

if (!err) {
snprintf(fota_name, sizeof(fota_name), "%s%hu", FOTAS_JSON_NAME,
fota_version);
err = add_array_obj(fota, fota_count, fota_name,
service_info_obj);
}

if (!err) {
cJSON_AddItemToObject(obj_out, SERVICE_INFO_JSON_NAME,
service_info_obj);
} else {
cJSON_Delete(service_info_obj);
}

return err;
}
Loading