Skip to content

Commit d44ea05

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 c7b939d commit d44ea05

File tree

7 files changed

+108
-0
lines changed

7 files changed

+108
-0
lines changed

MAINTAINERS.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5276,6 +5276,15 @@ West:
52765276
labels:
52775277
- "area: Storage"
52785278

5279+
"West project: lora-basics-modem":
5280+
status: maintained
5281+
maintainers:
5282+
- JordanYates
5283+
files:
5284+
- modules/lora-basics-modem/
5285+
labels:
5286+
- "area: LoRa"
5287+
52795288
"West project: loramac-node":
52805289
status: maintained
52815290
maintainers:

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

@@ -296,6 +298,11 @@ manifest:
296298
groups:
297299
- fs
298300
revision: ed0531d59ee37f5fb2762bcf2fc8ba4efaf82656
301+
- name: lora-basics-modem
302+
remote: lora-net
303+
repo-path: SWL2001
304+
revision: v4.8.0
305+
path: modules/lib/lora-basics-modem
299306
- name: loramac-node
300307
revision: fb00b383072518c918e2258b0916c996f2d4eebe
301308
path: modules/lib/loramac-node

0 commit comments

Comments
 (0)