Commit graph

39 commits

Author SHA1 Message Date
Jeff Welder 2f63bc7ac9 modem: modem_cellular: Telit ME910G1 Complete Modem Info
Add missing fields to complete info struct to
chat script for Telit ME910G1. Also for test
suite modem bg95.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2024-03-26 11:20:01 -05:00
Jeff Welder bf910873bc modem: modem_cellular: Add ICCID to Modem Info API
Added missing SIM ICCID case to
Modem Info API.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2024-03-26 11:20:01 -05:00
Emil Lindqvist b610312314 modem_cellular: add registration status API
This commit implements a network registration status API,
including return of reject cause in case of denial.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-03-14 16:30:57 +00:00
Ryan Erickson 06c62e4c17 modem: modem_cellular: fixes for hl7800
Add connect match for dialing PPP connection.
Ensure PDP authentication is disabled.
Request manufacturer, firmware version, and IMSI from the modem.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2024-03-13 13:05:51 -05:00
Lucas Denefle 08aa504e66 modem: modem_cellular: increase imsi size
Fixes an issue introduced with `080d51bb`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle b287ad70f8 modem: modem_cellular: increase imei size
Fixes an issue introduced with `b668296a`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle fe4f002eef modem: modem_cellular: increase model_id size
Fixes an issue introduced with `08a51bae`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle c36b1039be modem: modem_cellular: increase manufacturer size
Fixes an issue introduced with `ae951f5f`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Lucas Denefle 4cd0dee7cc modem: modem_cellular: increase fw_version size
Fixes an issue introduced with `adcdf64a`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2024-03-13 09:46:38 -05:00
Tomi Fontanilles fd5c76ddfd drivers: modem_cellular: allow leaving out the chat_filter parameter
Allow not specifying the chat_filter parameter in a device
definition, which is equivalent to setting it to "".

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-07 21:38:24 +00:00
Tomi Fontanilles 62d84fb322 drivers: modem_cellular: fine tune nRF91's shutdown_time
A shutdown lasting more than 5 seconds was experienced.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-04 22:13:14 +01:00
Tomi Fontanilles 9a3dbaf993 drivers: modem_cellular: add nRF91 series (w/ SLM)
The nRF91 series devices, when running the Serial LTE Modem (SLM)
application starting with nRF Connect SDK 2.6.0, can now be used as
standalone modems via the generic modem_cellular driver.

A configuration to run the cellular_modem sample on the nRF9160 DK
(plugged in to another nRF91 series device running SLM) is provided.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-03 18:59:22 +01:00
Tomi Fontanilles c6176b523a drivers: modem_cellular: make the buffer sizes configurable
To allow fine tuning and accommodate modem differences.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-03 18:59:22 +01:00
Tomi Fontanilles 0f5b3269df drivers: modem_cellular: allow variable length chat delimiter and filter
To allow for differences between modems.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-03-03 18:59:22 +01:00
Bjarki Arge Andreasen 080d51bb36 modem: modem_cellular: CID 338067
incorrect size passed to strncpy()

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-02-14 17:48:11 +01:00
Bjarki Arge Andreasen b668296a50 modem: modem_cellular: CID 338073
incorrect size passed to strncpy()

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-02-14 17:48:11 +01:00
Bjarki Arge Andreasen 08a51bae89 modem: modem_cellular: CID 338115
incorrect size passed to strncpy()

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-02-14 17:48:11 +01:00
Bjarki Arge Andreasen ae951f5f02 modem: modem_cellular: CID 338140
incorrect size passed to strncpy

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-02-14 17:48:11 +01:00
Bjarki Arge Andreasen adcdf64a0f modem: modem_cellular: CID 338164
strncpy() passed incorrect size

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-02-14 17:48:11 +01:00
Parthiban Nallathambi fd85021718 modem: change log level of events prints to debug
info level is printed always to console and it's noisy.
Change to debug level, which can be enabled with
CONFIG_MODEM_MODULES_LOG_LEVEL_DBG

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2024-02-06 13:00:05 +01:00
Bjarki Arge Andreasen 27b0d4e3fe modem: chat: remove receive and transmit timeouts
Remove receive and transmit timeouts which are no
longer useful as the RECEIVE_READY and
TRANSMIT_IDLE events will be used to efficiently
manage timeouts between transmit/receive calls.

Then update the the in-tree drivers using the
modem_chat module to omit the process timeout
parameter.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-25 11:22:42 +01:00
Emil Lindqvist 342e10b0b8 modem_cellular: add RSRP & RSRQ to U-blox SARA-R5 modem
This commit implements parsing of the CESQ extended signal quality AT
command, extracting RSRP and RSRQ which is relevant for LTE connections.
It's used in the U-blox SARA-R5 modem instance. Furthermore, the IMEI,
IMSI is extracted in the same modem.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-01-16 14:15:56 +00:00
Bjarki Arge Andreasen 1ee092673a modem: modem_cellular.c: Remove non standard QCCID handler
The QCCID handler is Quectel specific and as such may not be part
of the modem cellular driver which only supports commands defined
in 3GPP TS 27.007

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-03 10:21:18 +01:00
Bjarki Arge Andreasen 572c5e6d5a modem: modem_cellular: Rework cellular_get_signal implementation
The modem_cellular.c driver now uses a common script to get
signal strenght, which is run on demand. This is more efficient
than polling it, and simpler since every modem doesn't have to
define their own variant of the script.

Additionally, the CSQ handler now stores the "raw" rssi value
returned from AT+CSQ to be parsed by the cellular_modem_get_signal
implementation.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-03 10:21:18 +01:00
Bjarki Arge Andreasen f9491034be modem: modem_cellular: Update driver to implement cellular API
Move the implementations of the cellular API in modem_cellular.c
to an cellular_driver_structure, and implement this API structure
withing the device drivers.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-03 10:21:18 +01:00
Lucas Denefle d1ba79a070 drivers: cellular: add signal and modem_info API
Implement modem info pulling using the init and periodic chat scripts

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2023-12-12 19:09:33 +01:00
Emil Lindqvist 1cd7c55af9 modem: modem_cellular: add U-blox SARA-R5 as modem
U-blox SARA-R4 already exists but the behavior is different,
requiring a separate driver instance. For instance, R5 autostarts,
so this commit also adds support for skipping power on pulse.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2023-12-05 16:29:55 -06:00
Lucas Denefle f9d0a4c5cf drivers: modem: add Quectel EG25-G
This commit introduces support for the modem EG25-G from Quectel.

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2023-11-13 10:10:15 -06:00
Bjarki Arge Andreasen 5639bc0330 modem: modem_cellular: Fix build errors
Build errors where introduced by
c76d5b882c and are fixed with this
commit. They are trivial fixes of malformed lines.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-11-06 16:06:36 +01:00
Bjarki Arge Andreasen c76d5b882c drivers: modem: modem_cellular: Patch init scripts
The init scripts need a missing wait for OK after sending
AT+CGMM and the AT+CMUX command specifies more parameters
than nessesary, and in some cases incorrectly.

This commit adds the missing wait for OK and fixes the AT+CMUX
commands in the init scripts.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-11-06 10:09:48 +01:00
Jeff Welder 372216a3ea drivers: modem: modem_cellular: add Telit ME910G1
Added chat script and initial config to support Telit ME910G1.
Needed to edit power_pulse pin timing in accordance to datasheet.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2023-11-02 08:34:50 +00:00
Jeff Welder ed8f0bc985 drivers: modem: Individualize Modem Device Macros
Refactor device macro to be custom for each modem
to allow custom configurations.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2023-11-02 08:34:50 +00:00
Andrei Emeltchenko d661c86e35 drivers: modem_cellular: Fix missing break
There is no fallthrough statement or comment so I assume break is
missing.

Fixes build time warning from some tools.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-10-13 17:42:40 +03:00
Bjarki Arge Andreasen 0339f2d41f modem: modem_cellular: Adjust chat scripts
This commit adjust the chat scripts for the simcom
sim7080 and gsm_ppp compatibles to fix an issue found
when trying to use a sim7080 modem. The CMUX command
includes optional parameters which are not identical
for all modems, so the AT+CMUX command has been adjusted
to only contain the mandatory parameters.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-10-11 18:57:11 +03:00
Bjarki Arge Andreasen 7cac905e57 drivers: modem: modem_cellular: extend CMUX timeout
This commit adds a timeout of 300ms to the generic (gsm_ppp) init
chat script. This delay is required for some modems (discovered on
a Telit ME910G1-WW) to allow it to enter CMUX mode. Without this
delay, the modem simply refuses to respond to any CMUX commands.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-03 15:13:47 +01:00
Bjarki Arge Andreasen 328b588ceb drivers: modem: modem_cellular: Update script run function
This commit updates the modem_cellular driver to use the
new naming scheme for the modem_chat functions.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-09-18 14:11:40 +01:00
Bjarki Arge Andreasen 2d2d3ececd drivers/modem/modem_cellular.c: Improve bus pipe usage
This commit improves the usage of the bus pipe (connected
to UART) to only open it when the modem is actually
powered and ready, not when leaving the idle state. This
ensures the pipe is flushed before sending the init script,
and re-enables the UART driver if it is disabled due to
errors.

While building a test platform based on the nRF9160 and a
Quectel BG95, it was discovered that the nRF9160 correctly
throws UART errors if the RX is enabled while the UART RX
line is low (which was due to the modem being powered
down).

The improvements should also help help remove the
"<wrn> modem_chat: receive buffer overrun" warning which
would occur during startup as the pipe was opened, but
nothing was receiving the data, causing the buffer to
overflow.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-09-06 09:35:34 +02:00
Fabio Baltieri 5f0efb94fa modem: modem_chat,modem_cmux: fix mismatched CONTAINER_OF
Add a missing k_work_delayable_from_work to go from k_work to
k_work_delayable.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-04 16:54:56 +02:00
Bjarki Arge Andreasen b14c39f2c1 drivers/modem: Add generic cellular modem driver
The added cellular modem driver is a naive driver, which
shall serve as a template for implementing tailored
drivers for modems like the UBLOX-R4. It uses only
generic at commands, described in 3gpp, and protocols,
like CMUX and PPP.

A binding for the BG95 has been added, which replaces
the quectel,bg9x. This is neccesary since the BG95 does
not have a usable reset pin, the reset and powerkey are
internally connected to each other.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-08-30 13:48:51 +02:00