zephyr/subsys/modem
Luis Ubieda 94a7f028ef ubx: Refactor codebase in order to improve usability
During testing and code inspection, there were various anti-patterns
on this (and U-Blox driver) codebase(s), including obfuscation, and
lack of data validation. This made it increasingly difficult to
introduce further variants of u-blox GNSS modems.

With this patch, both the UBX modem and the M8 driver have been
refactored to ease the reliability and maintainability of these
codebases. Here are some highlights:

WRT UBX modem:
- Helper macros to easily create UBX frames, (including checksum
calculation), at compile time; thus, making it easier to extend UBX
commands.
- Logic validation by the inclusion of the modem_ubx testsuite, used to
refactor the code through TDD.
- Ability to receive unsolicited messages, in order to enable U-Blox
drivers to rely on modem_ubx to transceive all commands, and avoid
hopping between modem_ubx and modem_chat.

WRT M8 driver:
- Remove GNSS specific protocol header files. Instead, unify them under
modem/ubx/protocol.h. Background: After a survey and looking at ubxlib
SDK I conclude the UBX protocol is by definition a GNSS protocol (there
are non-GNSS u-blox modems, but they're not interfaced through UBX
protocol).
- Establish pattern to create and send/receive commands using new
foundations on modem ubx.
- Remove dependency of Modem chat, and instead use UBX unsolicited
messages to get Navigation and Satellites data.
- Switch from the auto-baudrate detection pattern to a pattern of
transitioning between an initial known baudrate to a desired baudrate,
in order to improve initialization time.
- Add dts property to configure default fix-rate.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-30 19:40:19 +02:00
..
backends modem: backend: uart: Alignment check to recv buf 2025-05-21 12:34:44 +02:00
CMakeLists.txt modem: add modem_pipelink module 2024-06-10 15:12:34 -05:00
Kconfig modem_cellular: Add support for the simcom a76xx modem 2025-05-28 16:37:53 +02:00
modem_chat.c modem: chat: patch unintended behavior in modem_chat_run_script() 2024-06-13 17:49:23 +02:00
modem_cmux.c modem: backend: uart: Add hw-flow-control for UART 2025-05-05 14:24:49 +02:00
modem_pipe.c modem: pipe: Add explicit timeout to sync APIs 2024-07-29 14:14:42 +02:00
modem_pipelink.c modem: add modem_pipelink module 2024-06-10 15:12:34 -05:00
modem_ppp.c modem: ppp: coverity 330618: explicitly ignore retval 2024-06-24 14:25:46 +02:00
modem_stats.c drivers: modem: initialize variables to avoid warn 2024-11-19 10:04:58 -05:00
modem_ubx.c ubx: Refactor codebase in order to improve usability 2025-05-30 19:40:19 +02:00