Skip to content

Commit de44c0f

Browse files
committed
manifest: add lora-basics-modem module
Import the lora-basics-modem module as an alternate backend for LoRa and LoRaWAN, since loramac-node has been deprecated. Support is currently limited and experimental. Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent 1ba380a commit de44c0f

File tree

6 files changed

+99
-0
lines changed

6 files changed

+99
-0
lines changed

modules/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ comment "Lz4 module not available."
9999
comment "loramac-node module not available."
100100
depends on !ZEPHYR_LORAMAC_NODE_MODULE
101101

102+
comment "LoRa Basics Modem module not available."
103+
depends on !ZEPHYR_LORA_BASICS_MODEM_MODULE
104+
102105
comment "CANopenNode module not available."
103106
depends on !ZEPHYR_CANOPENNODE_MODULE
104107

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2025 Embeint Inc
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if(CONFIG_USE_LORA_BASICS_MODEM_DRIVERS)
5+
6+
set(LORA_BASICS_MODEM_DIR ${ZEPHYR_CURRENT_MODULE_DIR})
7+
set(LBM_LIB_DIR ${LORA_BASICS_MODEM_DIR}/lbm_lib)
8+
set(LBM_SMTC_MODEM_CORE_DIR ${LBM_LIB_DIR}/smtc_modem_core)
9+
set(LBM_RADIO_DRIVERS_DIR ${LBM_LIB_DIR}/smtc_modem_core/radio_drivers)
10+
11+
if(TARGET lora_basics_modem)
12+
set(ZEPHYR_CURRENT_LIBRARY lora_basics_modem)
13+
else()
14+
zephyr_library_named(lora_basics_modem)
15+
endif()
16+
17+
zephyr_library_include_directories(${LBM_SMTC_MODEM_CORE_DIR}/smtc_ral/src)
18+
zephyr_library_include_directories(${LBM_SMTC_MODEM_CORE_DIR}/smtc_ralf/src)
19+
20+
if(CONFIG_LORA_SX126X)
21+
include(sx126x.cmake)
22+
endif()
23+
if(CONFIG_LORA_SX127X)
24+
include(sx127x.cmake)
25+
endif()
26+
endif()

modules/lora_basics_modem/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2024 Semtech Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Top-level configuration file for LoRa Basics Modem containing LoRa
5+
# transceiver drivers and LBM LoRaWAN stack
6+
7+
config ZEPHYR_LORA_BASICS_MODEM_MODULE
8+
bool
9+
10+
config USE_LORA_BASICS_MODEM_DRIVERS
11+
bool
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2024 Semtech Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Used by LBM
5+
zephyr_library_compile_definitions(SX126X)
6+
zephyr_library_compile_definitions(SX126X_TRANSCEIVER)
7+
8+
# Allow modem options
9+
set(ALLOW_CSMA_BUILD true)
10+
11+
set(LBM_SX126X_LIB_DIR ${LBM_RADIO_DRIVERS_DIR}/sx126x_driver/src)
12+
zephyr_include_directories(${LBM_SX126X_LIB_DIR})
13+
14+
#-----------------------------------------------------------------------------
15+
# Radio specific sources
16+
#-----------------------------------------------------------------------------
17+
zephyr_library_sources(
18+
${LBM_SX126X_LIB_DIR}/lr_fhss_mac.c
19+
${LBM_SX126X_LIB_DIR}/sx126x.c
20+
${LBM_SX126X_LIB_DIR}/sx126x_driver_version.c
21+
${LBM_SX126X_LIB_DIR}/sx126x_lr_fhss.c
22+
${LBM_SMTC_MODEM_CORE_DIR}/smtc_ral/src/ral_sx126x.c
23+
${LBM_SMTC_MODEM_CORE_DIR}/smtc_ralf/src/ralf_sx126x.c
24+
)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (c) 2024 Semtech Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Used by LBM
5+
zephyr_library_compile_definitions(SX127X)
6+
zephyr_library_compile_definitions(SX127X_TRANSCEIVER)
7+
8+
if(CONFIG_DT_HAS_SEMTECH_SX1272_ENABLED)
9+
zephyr_library_compile_definitions(SX1272)
10+
endif()
11+
if(CONFIG_DT_HAS_SEMTECH_SX1276_ENABLED)
12+
zephyr_library_compile_definitions(SX1276)
13+
endif()
14+
15+
# Allow modem options
16+
set(ALLOW_CSMA_BUILD true)
17+
18+
set(LBM_SX127X_LIB_DIR ${LBM_RADIO_DRIVERS_DIR}/sx127x_driver/src)
19+
zephyr_include_directories(${LBM_SX127X_LIB_DIR})
20+
21+
#-----------------------------------------------------------------------------
22+
# Radio specific sources
23+
#-----------------------------------------------------------------------------
24+
zephyr_library_sources(
25+
${LBM_SX127X_LIB_DIR}/sx127x.c
26+
${LBM_SMTC_MODEM_CORE_DIR}/smtc_ral/src/ral_sx127x.c
27+
${LBM_SMTC_MODEM_CORE_DIR}/smtc_ralf/src/ralf_sx127x.c
28+
)

west.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ manifest:
2323
url-base: https://github.com/zephyrproject-rtos
2424
- name: babblesim
2525
url-base: https://github.com/BabbleSim
26+
- name: lora-net
27+
url-base: https://github.com/lora-net
2628

2729
group-filter: [-babblesim, -optional]
2830

@@ -299,6 +301,11 @@ manifest:
299301
- name: loramac-node
300302
revision: fb00b383072518c918e2258b0916c996f2d4eebe
301303
path: modules/lib/loramac-node
304+
- name: lora-basics-modem
305+
remote: lora-net
306+
repo-path: SWL2001
307+
revision: v4.8.0
308+
path: modules/lib/lora_basics_modem
302309
- name: lvgl
303310
revision: 1ed1ddd881c3784049a92bb9fe37c38c6c74d998
304311
path: modules/lib/gui/lvgl

0 commit comments

Comments
 (0)