Skip to content

Commit 759d1d6

Browse files
mike-scottnashif
authored andcommitted
drivers: modem: introduce u-blox SARA-R4 modem driver
The u-blox SARA-R4 modem modules are Ultra-compact LTE Cat M1 / NB1 ready: - Configurable with a single hardware version - Flexible mode selection as LTE Cat M1, LTE Cat NB1, EGPRS - only/preferred - Low power consumption and longer battery life - Extended range in buildings, basements, and with NB1, underground This driver introduces support for basic AT commands to query modem information as well as socket connection for TCP/UDP communication. Signed-off-by: Michael Scott <[email protected]>
1 parent 769b65e commit 759d1d6

File tree

4 files changed

+1922
-0
lines changed

4 files changed

+1922
-0
lines changed

drivers/modem/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
zephyr_sources_ifdef(CONFIG_MODEM_RECEIVER modem_receiver.c)
44
zephyr_sources_ifdef(CONFIG_MODEM_SHELL modem_shell.c)
55

6+
if(CONFIG_MODEM_UBLOX_SARA_R4)
7+
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip)
8+
zephyr_library_sources(ublox-sara-r4.c)
9+
endif()
10+
611
if(CONFIG_MODEM_WNCM14A2A)
712
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip)
813
zephyr_library_sources(wncm14a2a.c)

drivers/modem/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ config MODEM_SHELL
4646
Activate shell module that provides modem utilities like
4747
sending a command to the modem UART.
4848

49+
source "drivers/modem/Kconfig.ublox-sara-r4"
4950
source "drivers/modem/Kconfig.wncm14a2a"
5051

5152
endif # MODEM
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Kconfig - u-blox SARA R4 driver options
2+
3+
#
4+
# Copyright (c) 2019 Foundries.io
5+
#
6+
# SPDX-License-Identifier: Apache-2.0
7+
#
8+
9+
config MODEM_UBLOX_SARA_R4
10+
bool "Enable u-blox SARA-R4 LTE-CatM1/NB-IoT modem driver"
11+
select MODEM_RECEIVER
12+
select NET_OFFLOAD
13+
imply GPIO
14+
help
15+
Choose this setting to enable u-blox SARA-R4 LTE-CatM1/NB-IoT modem
16+
driver.
17+
18+
if MODEM_UBLOX_SARA_R4
19+
20+
config MODEM_UBLOX_SARA_R4_RX_STACK_SIZE
21+
int "Stack size for the u-blox SARA-R4 modem driver RX thread"
22+
default 1028
23+
help
24+
This stack is used by the u-blox SARA-R4 RX thread.
25+
26+
config MODEM_UBLOX_SARA_R4_RX_WORKQ_STACK_SIZE
27+
int "Stack size for the u-blox SARA-R4 modem driver work queue"
28+
default 2048
29+
help
30+
This stack is used by the work queue to pass off net_pkt data
31+
to the rest of the network stack, letting the rx thread continue
32+
processing data.
33+
34+
config MODEM_UBLOX_SARA_R4_APN
35+
string "APN for establishing network connection"
36+
default "hologram"
37+
help
38+
This setting is used in the AT+CGDCONT command to set the APN name
39+
for the network connection context. This value is specific to
40+
the network provider and may need to be changed.
41+
42+
config MODEM_UBLOX_SARA_R4_MANUAL_MCCMNO
43+
string "MCC/MNOfor establishing network connection"
44+
help
45+
This setting is used in the AT+COPS command to set the MCC/MNO
46+
for the network connection context. This value is specific to
47+
the network provider and may need to be changed if auto is not
48+
selected.
49+
50+
config MODEM_UBLOX_SARA_R4_INIT_PRIORITY
51+
int "u-blox SARA-R4 driver init priority"
52+
default 80
53+
help
54+
u-blox SARA-R4 device driver initialization priority.
55+
Do not mess with it unless you know what you are doing.
56+
Note that the priority needs to be lower than the net stack
57+
so that it can start before the networking sub-system.
58+
59+
endif # MODEM_UBLOX_SARA_R4

0 commit comments

Comments
 (0)