Skip to content

Commit 3010686

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 b423c00 commit 3010686

File tree

7 files changed

+104
-0
lines changed

7 files changed

+104
-0
lines changed

MAINTAINERS.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5364,6 +5364,15 @@ West:
53645364
labels:
53655365
- "area: Storage"
53665366

5367+
"West project: lora-basics-modem":
5368+
status: maintained
5369+
maintainers:
5370+
- JordanYates
5371+
files:
5372+
- modules/lora-basics-modem/
5373+
labels:
5374+
- "area: LoRa"
5375+
53675376
"West project: loramac-node":
53685377
status: maintained
53695378
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ manifest:
298298
groups:
299299
- fs
300300
revision: 8f5ca347843363882619d8f96c00d8dbd88a8e79
301+
- name: lora-basics-modem
302+
revision: 9a14f6772c1d6e303bacb2d594c8063bb804b6ee
303+
path: modules/lib/lora-basics-modem
301304
- name: loramac-node
302305
revision: fb00b383072518c918e2258b0916c996f2d4eebe
303306
path: modules/lib/loramac-node

0 commit comments

Comments
 (0)