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

Add geolocation support #121

Merged
merged 10 commits into from
Nov 29, 2024
Merged

Add geolocation support #121

merged 10 commits into from
Nov 29, 2024

Conversation

daniestevez
Copy link
Member

@daniestevez daniestevez commented Nov 18, 2024

This adds a geolocation to the maia-httpd REST API, which is used to set the recording metadata when a recording is done. maia-wasm uses the HTML5 geolocation API to update the geolocation of maia-httpd through the REST API. All of this is opt-in, and the geolocation can easily be inspected and cleared (or updated) at any time before downloading a SigMF recording.

See demo video: https://mastodon.social/@destevez/113545585796441387

This adds a geolocation entry to the REST API. The geolocation can
be set or cleared by a PUT request, and the current geolocation is
used to populate the "core:geolocation" SigMF key if it is available
at the start of the recording.

Signed-off-by: Daniel Estévez <[email protected]>
This adds a HTTPS server to maia-httpd. By default it listens on
port 443. It uses a self-signed certificate that is included in the
application binary. The main intended use of this feature is the
maia-wasm Geolocation API functionality, which browsers refuse to
use over HTTP connections.

Signed-off-by: Daniel Estévez <[email protected]>
If the app is using HTTPS, then the websocket should use wss://
instead of ws://

Signed-off-by: Daniel Estévez <[email protected]>
@daniestevez daniestevez linked an issue Nov 18, 2024 that may be closed by this pull request
Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

7 similar comments
Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

This adds support for setting the maia-httpd REST API geolocation
and recording metadata geolocation by using the HTML5 geolocation
API.

Signed-off-by: Daniel Estévez <[email protected]>
The recent addition of HTTPS support to maia-httpd has caused the
size of the binary to grow from ~4.9 MB to ~7 MB. This causes the
resulting plutosdr-fw image to no longer boot (probably an
out-of-memory error when copying the rootfs to ram). This enables
stripping of all the symbols, which decreases the binary size to
~6 MB.

Signed-off-by: Daniel Estévez <[email protected]>
Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

Instead of embedding a self-signed SSL certficate, provide command
line parameters to load certificates from files.

A certificate signed with a trusted CA is needed to install maia-wasm
as a PWA (Progressive Web App), because current web browsers require PWAs
to be accessed by SSL with a trusted certificate (not a self-signed
certificate). This opens up a way to install maia-wasm as a PWA, but
it requires the user to trust and add a CA certificate manually in
their device. A startup script will generate a suitable CA and web
server certificates on boot and store them in persistent JFFS flash.
The user can also replace these with their own (by doing scp or
similar).

Signed-off-by: Daniel Estévez <[email protected]>
Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

@daniestevez daniestevez added enhancement New feature or request maia-wasm Issues affecting maia-wasm maia-httpd Issues affecting maia-httpd labels Nov 25, 2024
@daniestevez daniestevez marked this pull request as ready for review November 25, 2024 20:54
@daniestevez daniestevez mentioned this pull request Nov 26, 2024
Add a couple of min-width: 0px; to make the settings dialog look
better in a very narrow viewport.

Signed-off-by: Daniel Estévez <[email protected]>
Add an "Other" tab with a link to the CA certificate and the
maia-wasm version. In the future this tab can also contain versions
of other components, but they need to be exposed in the maia-httpd
API.

Signed-off-by: Daniel Estévez <[email protected]>
Copy link

The Pluto SDR firmware image for this pull request is ready.

Find it under "Artifacts" in the action run.

@daniestevez daniestevez merged commit da39b87 into main Nov 29, 2024
26 checks passed
@daniestevez daniestevez deleted the geolocation branch November 29, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maia-httpd Issues affecting maia-httpd maia-wasm Issues affecting maia-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

geolocation in SGMF
1 participant