Skip to content

Commit

Permalink
samples: cellular: Add nRF Cloud gateway sample
Browse files Browse the repository at this point in the history
Migrate sample from nRF Cloud repo to nRF Connect SDK.

Replace old cloud interface from ATv1 with MSS.

Get to run on NCS 2.9.0.

Jira: IRIS-9993

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
  • Loading branch information
plskeggs committed Jan 15, 2025
1 parent 370d0e2 commit e4ba118
Show file tree
Hide file tree
Showing 112 changed files with 16,812 additions and 0 deletions.
1 change: 1 addition & 0 deletions samples/cellular/nrf_cloud_ble_gateway/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
certs
67 changes: 67 additions & 0 deletions samples/cellular/nrf_cloud_ble_gateway/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

cmake_minimum_required(VERSION 3.20.0)

set(BOARD_ROOT ${CMAKE_CURRENT_LIST_DIR})

set(spm_CONF_FILE
prj.conf
${CMAKE_CURRENT_SOURCE_DIR}/${BOARD}_spm.conf)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(nrf_cloud_ble_gateway)
zephyr_compile_definitions(PROJECT_NAME=${PROJECT_NAME})

# Include certs files if enabled.
zephyr_include_directories_ifdef(CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES certs)

# NORDIC SDK APP START
target_sources(app PRIVATE src/main.c)
target_sources(app PRIVATE src/application.c)
target_sources(app PRIVATE src/cloud_connection.c)
target_sources(app PRIVATE src/message_queue.c)
target_sources(app PRIVATE src/temperature.c)
target_sources(app PRIVATE src/fota_support.c)
target_sources(app PRIVATE src/led_control.c)
target_sources(app PRIVATE src/sample_reboot.c)
target_sources(app PRIVATE src/shadow_config.c)

if(CONFIG_LOCATION_TRACKING)
target_sources(app PRIVATE src/location_tracking.c)
endif()

if(CONFIG_COAP_SHADOW)
target_sources(app PRIVATE src/shadow_support_coap.c)
endif()

if(CONFIG_COAP_FOTA)
target_sources(app PRIVATE src/fota_support_coap.c)
endif()

if(CONFIG_NRF_PROVISIONING)
target_sources(app PRIVATE src/provisioning_support.c)
endif()

# Include modem-specific features if supported
if(CONFIG_NRF_MODEM_LIB)
target_sources(app PRIVATE src/at_commands.c)
endif()

if (CONFIG_NRF_CLOUD_GATEWAY)
target_sources(app PRIVATE src/ble/ble.c)
target_sources(app PRIVATE src/ble/ble_codec.c)
target_sources(app PRIVATE src/ble/ble_conn_mgr.c)
target_sources(app PRIVATE src/ble/gateway.c)
target_sources_ifdef(CONFIG_SHELL app PRIVATE src/ble/cli.c)
target_sources_ifdef(CONFIG_GATEWAY_BLE_FOTA app PRIVATE src/ble/dfu/peripheral_dfu.c)
target_sources_ifdef(CONFIG_FLASH_TEST, app PRIVATE src/ble/flash/flash_test.c)
zephyr_include_directories(src src/ble src/ble/flash src/ble/dfu)
#add_subdirectory(src/ble/dfu)
add_subdirectory(src/ble/flash)
endif()

# NORDIC SDK APP END
Loading

0 comments on commit e4ba118

Please sign in to comment.