Skip to content

Commit a754256

Browse files
committed
drivers: modem: nrf91-slm socket offloaded driver
This commit adds a socket offloaded driver for the Nordic nRF91x Serial LTE Modem.
1 parent 26a43ca commit a754256

File tree

8 files changed

+2773
-0
lines changed

8 files changed

+2773
-0
lines changed

drivers/modem/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,7 @@ if (CONFIG_MODEM_SIM7080)
3535
zephyr_library_sources(simcom-sim7080.c)
3636
endif()
3737

38+
add_subdirectory_ifdef(CONFIG_MODEM_NRF91_SLM nordic)
39+
3840
zephyr_library_sources_ifdef(CONFIG_MODEM_CELLULAR modem_cellular.c)
3941
zephyr_library_sources_ifdef(CONFIG_MODEM_AT_SHELL modem_at_shell.c)

drivers/modem/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,6 @@ source "drivers/modem/Kconfig.at_shell"
195195

196196
source "drivers/modem/Kconfig.hl7800"
197197
source "drivers/modem/Kconfig.simcom-sim7080"
198+
source "drivers/modem/nordic/Kconfig"
198199

199200
endif # MODEM

drivers/modem/nordic/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
zephyr_library_sources(
4+
nrf91_slm_dns.c
5+
nrf91_slm_socket.c
6+
nrf91_slm.c
7+
)

drivers/modem/nordic/Kconfig

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Copyright 2025 Nova Dynamics LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config MODEM_NRF91_SLM
5+
bool "Nordic nRF91x SLM Driver"
6+
select MODEM_SOCKET
7+
select NET_OFFLOAD
8+
select NET_SOCKETS_OFFLOAD
9+
select MODEM_MODULES
10+
select MODEM_CHAT
11+
select MODEM_PIPE
12+
select MODEM_BACKEND_UART
13+
select RING_BUFFER
14+
depends on DT_HAS_NORDIC_NRF91_SLM_ENABLED
15+
imply GPIO
16+
help
17+
Enables the offloaded driver for the Nordic nRF91 Serial LTE Modem.
18+
19+
if MODEM_NRF91_SLM
20+
21+
config MODEM_NRF91_SLM_APN
22+
string "APN"
23+
default "internet"
24+
25+
config MODEM_NRF91_SLM_PERIODIC_SCRIPT_MS
26+
int "Periodic script interval in milliseconds"
27+
default 2000
28+
29+
config MODEM_NRF91_SLM_UART_BUFFER_SIZES
30+
int "The UART receive and transmit buffer sizes in bytes."
31+
default 512
32+
33+
config MODEM_NRF91_SLM_CMUX_MAX_FRAME_SIZE
34+
int "The maximum CMUX frame size in bytes."
35+
default 32 if DT_HAS_U_BLOX_LARA_R6_ENABLED
36+
default 128
37+
help
38+
This value affects the size of buffers used to receive and transmit CMUX frames.
39+
40+
config MODEM_NRF91_SLM_CHAT_BUFFER_SIZES
41+
int "The size of the buffers used for the chat scripts in bytes."
42+
default 128
43+
44+
config MODEM_NRF91_SLM_USER_PIPE_BUFFER_SIZES
45+
int "The size of the buffers used for each user pipe in bytes."
46+
default 128
47+
48+
config MODEM_NRF91_SLM_NEW_BAUDRATE
49+
int "New baudrate to configure modem to, if supported"
50+
range 9600 4000000
51+
default 3000000 if DT_HAS_U_BLOX_LARA_R6_ENABLED
52+
default 115200
53+
54+
config MODEM_NRF91_SLM_NEW_BAUDRATE_DELAY
55+
int "Time modem takes to change baudrate, in milliseconds"
56+
range 0 1000
57+
default 100 if DT_HAS_U_BLOX_LARA_R6_ENABLED
58+
default 300
59+
60+
endif

0 commit comments

Comments
 (0)