Skip to content

Add Quectel lx6 GNSS driver #92310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nixward
Copy link
Member

@nixward nixward commented Jun 27, 2025

Add Quectel I2C modem backend
Add Quectel lx6 GNSS driver
Add I2C and UART lx6 variants to GNSS build_all test
Add build warning when building untested UART build variant (I only have I2C lx6 hardware)

Copy link
Contributor

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work! Could you add the new driver to the https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/gnss/gnss_api test suite and run it as well?

nixward added 4 commits June 28, 2025 01:31
To be used by the Quectel lx6 GNSS driver.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
Add Quectel lx6 driver, tested with L96 on I2C bus.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
I2C build of driver tested but UART build untested and experimental.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
Add I2C and UART build variants.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
@nixward
Copy link
Member Author

nixward commented Jun 27, 2025

Fantastic work! Could you add the new driver to the https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/gnss/gnss_api test suite and run it as well?

Awesome, I ran the test suite on my out of tree board and made a change to now make the driver pass:

I: Turn on
*** Booting Zephyr OS build v4.1.0-7117-gdd0409b4a6b5 ***
Running TESTSUITE gnss_api
===================================================================
START - test_enabled_systems
 SKIP - test_enabled_systems in 0.001 seconds
===================================================================
START - test_fix_rate
 SKIP - test_fix_rate in 0.001 seconds
===================================================================
START - test_navigation_mode
 PASS - test_navigation_mode in 4.189 seconds
===================================================================
TESTSUITE gnss_api succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [gnss_api]: pass = 1, fail = 0, skip = 2, total = 3 duration = 4.191 seconds
 - SKIP - [gnss_api.test_enabled_systems] duration = 0.001 seconds
 - SKIP - [gnss_api.test_fix_rate] duration = 0.001 seconds
 - PASS - [gnss_api.test_navigation_mode] duration = 4.189 seconds

------ TESTSUITE SUMMARY END ------

=============================================

Copy link

#include "gnss_nmea0183_match.h"
#include "gnss_parse.h"

#include <stdio.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why include stdio?

}
}

return modem_pipe_close(data->pipe, K_SECONDS(10));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to close the pipe before disconnecting vcc, if that actually powers down the modem you could get garbage data on the UART or frame errors as the UART bus may be "floating"

@bjarki-andreasen
Copy link
Contributor

bjarki-andreasen commented Jun 27, 2025

For the GNSS API test suite, you may want to add CONFIG_GNSS_SATELLITES=y and configure some valid GNSS system combinations to test, see

# Copyright (c) 2024 Trackunit Corporation
# SPDX-License-Identifier: Apache-2.0
CONFIG_GNSS_SATELLITES=y
# GPS
CONFIG_TEST_ENABLED_SYSTEMS_0=1
# GPS + GLONASS
CONFIG_TEST_ENABLED_SYSTEMS_1=3
# GPS + GLONASS + QZSS
CONFIG_TEST_ENABLED_SYSTEMS_2=19
# GPS + GLONASS + GALILEO + BEIDOU + QZSS + SBAS
CONFIG_TEST_ENABLED_SYSTEMS_3=95
for example :) Its not the most stable test in the world since it requires at least one satellite of enabled systems to be visible, but it is really good at detecting visible satellites which should not be :)

@tomi-font tomi-font removed their request for review June 30, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants