Skip to content
Permalink
Browse files

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 <mike@foundries.io>
  • Loading branch information...
mike-scott authored and nashif committed May 17, 2019
1 parent 769b65e commit 759d1d64080543920b82ba800d7016cd20f13b73
Showing with 1,922 additions and 0 deletions.
  1. +5 −0 drivers/modem/CMakeLists.txt
  2. +1 −0 drivers/modem/Kconfig
  3. +59 −0 drivers/modem/Kconfig.ublox-sara-r4
  4. +1,857 −0 drivers/modem/ublox-sara-r4.c
@@ -3,6 +3,11 @@
zephyr_sources_ifdef(CONFIG_MODEM_RECEIVER modem_receiver.c)
zephyr_sources_ifdef(CONFIG_MODEM_SHELL modem_shell.c)

if(CONFIG_MODEM_UBLOX_SARA_R4)
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip)
zephyr_library_sources(ublox-sara-r4.c)
endif()

if(CONFIG_MODEM_WNCM14A2A)
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip)
zephyr_library_sources(wncm14a2a.c)
@@ -46,6 +46,7 @@ config MODEM_SHELL
Activate shell module that provides modem utilities like
sending a command to the modem UART.

source "drivers/modem/Kconfig.ublox-sara-r4"
source "drivers/modem/Kconfig.wncm14a2a"

endif # MODEM
@@ -0,0 +1,59 @@
# Kconfig - u-blox SARA R4 driver options

#
# Copyright (c) 2019 Foundries.io
#
# SPDX-License-Identifier: Apache-2.0
#

config MODEM_UBLOX_SARA_R4
bool "Enable u-blox SARA-R4 LTE-CatM1/NB-IoT modem driver"
select MODEM_RECEIVER
select NET_OFFLOAD
imply GPIO
help
Choose this setting to enable u-blox SARA-R4 LTE-CatM1/NB-IoT modem
driver.

if MODEM_UBLOX_SARA_R4

config MODEM_UBLOX_SARA_R4_RX_STACK_SIZE
int "Stack size for the u-blox SARA-R4 modem driver RX thread"
default 1028
help
This stack is used by the u-blox SARA-R4 RX thread.

config MODEM_UBLOX_SARA_R4_RX_WORKQ_STACK_SIZE
int "Stack size for the u-blox SARA-R4 modem driver work queue"
default 2048
help
This stack is used by the work queue to pass off net_pkt data
to the rest of the network stack, letting the rx thread continue
processing data.

config MODEM_UBLOX_SARA_R4_APN
string "APN for establishing network connection"
default "hologram"
help
This setting is used in the AT+CGDCONT command to set the APN name
for the network connection context. This value is specific to
the network provider and may need to be changed.

config MODEM_UBLOX_SARA_R4_MANUAL_MCCMNO
string "MCC/MNOfor establishing network connection"
help
This setting is used in the AT+COPS command to set the MCC/MNO
for the network connection context. This value is specific to
the network provider and may need to be changed if auto is not
selected.

config MODEM_UBLOX_SARA_R4_INIT_PRIORITY
int "u-blox SARA-R4 driver init priority"
default 80
help
u-blox SARA-R4 device driver initialization priority.
Do not mess with it unless you know what you are doing.
Note that the priority needs to be lower than the net stack
so that it can start before the networking sub-system.

endif # MODEM_UBLOX_SARA_R4

0 comments on commit 759d1d6

Please sign in to comment.
You can’t perform that action at this time.