Skip to content
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

feat(nm): add managed GPS mode #5406

Merged

Conversation

mattdibi
Copy link
Contributor

@mattdibi mattdibi commented Oct 3, 2024

This PR adds a new mode for handling the modem's GPS, allowing ModemManager to take control of the serial port and thus open the way for us to create a new PositionProvider that retrieves the position information from ModemManager.

This new mode leverages the following two ModemManager location sources:

Once these two are enabled ModemManager will take control of the GPS communication and start parsing the data, allowing clients to retrieve the informations via the "GetLocation" DBus method.

Before this PR (see #4633) we were only using the MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED mode, which took care of setting up the GPS for the modem but left the serial connection free for other services to connect to (eg gpsd).

Note: to avoid breaking changes in the snapshot, instead of substituting the net.interface.[deviceId].config.gpsEnabled parameter with an enum, I left it untouched and added the net.interface.[deviceId].config.gpsMode parameter. It's a little bit more clunky to use but doesn't break snapshot compatibility with older versions. The gpsMode parameter is optional, when not specified it defaults to the UNMANAGED mode, preserving the current behaviour.

Since we added this new parameter, the isGpsSupported() method in Kura's API doesn't contain all the required informations anymore. We'll need to add to the APIs a new getSupportedGPSModes() method to know what mode we can set for the modem at hand. This new API will be introduced in a future separate PR.

@pierantoniomerlino pierantoniomerlino merged commit a847bfd into eclipse-kura:develop Oct 4, 2024
3 checks passed
eclipse-kura-bot pushed a commit that referenced this pull request Oct 4, 2024
* feat: update isGPSSupported method to correctly report support

* feat: add new managed GPS mode for modems

* test: add unit tests for the newly introduced modes

* refactor: more consistent enum convention

* style: add copyright header

* style: fix date

* docs: fix copyright headers

* style: fix copyright headers

(cherry picked from commit a847bfd)
@mattdibi mattdibi deleted the feat/MM_managed_gps branch October 4, 2024 12:30
MMaiero pushed a commit that referenced this pull request Oct 7, 2024
* feat: update isGPSSupported method to correctly report support

* feat: add new managed GPS mode for modems

* test: add unit tests for the newly introduced modes

* refactor: more consistent enum convention

* style: add copyright header

* style: fix date

* docs: fix copyright headers

* style: fix copyright headers

(cherry picked from commit a847bfd)
MMaiero pushed a commit that referenced this pull request Oct 7, 2024
feat(nm): add managed GPS mode (#5406)

* feat: update isGPSSupported method to correctly report support

* feat: add new managed GPS mode for modems

* test: add unit tests for the newly introduced modes

* refactor: more consistent enum convention

* style: add copyright header

* style: fix date

* docs: fix copyright headers

* style: fix copyright headers

(cherry picked from commit a847bfd)

Co-authored-by: Mattia Dal Ben <mattdibi@users.noreply.github.com>
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