- Configure a UART TX buffer; the backend would otherwise assert in
its configuration or (if the asserts are off) miserably fail when
trying to send anything to the GNSS modem.
- Fine tune the UART RX buffer size and make it depend on whether
satellite data is received.
- Remove unused k_spinlock.
- Make declaration of Kconfig items dependent on GNSS_NMEA_GENERIC
conditional.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
As of now only the resume action is supported, and doesn't perform
any power action on the GNSS modem.
It allows to initialize the GNSS driver later than it would otherwise
be.
Also, the driver now runs a modem-specific chat script on resumption.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Those helpers allow to define some typical kinds of chat matches and
scripts with more ease/less boilerplate.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
The valid range of hdop (horizontal diffusion of precision) goes
from 0-100000, but because we are using a uint16_t, we truncate
anything above UINT16_MAX.
This fix changes the size of the hdop member to a uint32_t, which
allows us to capture valid (but admittedly very poor) readings.
Signed-off-by: Rob Newberry <rob@zenomoto.com>
MODEM_UBX: Adds Support for UBX Messages in Modem Subsystem.
GNSS API Supported: get_supported_systems, set_fix_rate, get_fix_rate,
set_enabled_systems, get_enabled_systems, set_navigation_mode,
get_navigation_mode.
Boards Tested: MIMXRT1062_FMURT6, VMU_RT1170.
Note: Partial support for U-BLOX Messages is provided as of now.
Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com>
Added Kconfigs to define the size of:
- UART backend receive buffer
- UART backend transmit buffer
- Satellites array size
and increased the UART RX buffer size a default to 256 as 128
is just on the edge of to small at a baudrate of 115200.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The pipe should be closed when suspended, both to save ressources
and to flush it. Without flushing the pipe, the driver may fail
to either resume or suspend the GNSS as the chat module starts
processing old data, which can contain acks to commands, breaking
the scripts.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The implementation of power management did not account for
being on a power domain when initializing, and handling being
powered on and off at runtime.
The GNSS requires time to start up, which it always does when
powered on, before accepting commands. It also requires time
after resuming and suspending before accepting commands.
This commit implements this timeout, and improves logging to
make the power management more transparent, and removes some
redundant parenthesis for better readability.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
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>
Fixes a compilation error in quectel_lcx6g driver when CONFIG_PM_DEVICE=y.
Corrects the function call in quectel_lcx6g_suspend from
'modem_chat_run_script_run' to 'modem_chat_run_script'.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Change the synchronization of RMC and GGA NMEA messages from a
timeout to matching their UTC timestamps.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Printing fractionals currently put the sign on integer values on the
fractional part, for example:
longitude : -6.-207483333
Run an extra abs to get rid of the sign there for latitude, longitude
and altitude, compute the sign separately so it works for numbers
between -1 and 0 as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit adds a GNSS driver for the Quectel LCX6G
series of GNSS modems (LC26G, LC76G, LC86G). It is
based on the modem subsystem, and the GNSS utilities
added in the two previous commits.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds generic matches and handlers for the RMC,
GGA and GSV messages to be implemented as part of all
NMEA0183 based GNSS modems.
NMEA0183 based GNSS modems must place the
struct gnss_nmea0183_match_data struct as the first struct
in their data struct. Their data struct shall then be set
as the user_data for the modem_chat instance.
Lastly, the gnss_nmea0183_match callbacks must be included
in the unsolicited matches for the modem_chat instance.
The GNSS modems will initialize the NMEA0183 match instance
using gnss_nmea0183_match_init.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds utilites to parse the RMC and GGA
NMEA0183 messages, which contain all data which shall be
published using the struct gnss_data.
It also adds a test suite for the added utilities.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds parsing utilites for common string
representations of values contained in GNSS messages.
These utilites both parse and validate the integrity of
the data.
Unit tests are also added to validate the parsing
utilities.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds dumping of GNSS data and satellites to
the log if CONFIG_GNSS_DUMP_TO_LOG is selected
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds a library which dumps the contents of the
gnss structures gnss_info, navigation_data, gnss_time and
gnss_satellite as a string.
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit adds the public header for the GNSS API, along
with the initial GNSS Kconfig file and an entry in the
common linker file for registered GNSS data callbacks.
A very naive implementation of the GNSS data callback is
provided as well in drivers/gnss/gnss_publish.c
Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>