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

[Snap] Implement Wi-Fi hotspot on first boot #3156

Open
benfrancis opened this issue Aug 21, 2024 · 3 comments
Open

[Snap] Implement Wi-Fi hotspot on first boot #3156

benfrancis opened this issue Aug 21, 2024 · 3 comments
Labels
snap Issues relating to the snap package story
Milestone

Comments

@benfrancis
Copy link
Member

As a user I want to connect to the gateway as a Wi-Fi hotspot when it first boots, so that I can connect the gateway to a network of my choosing.

Currently with Raspbian-based images when the gateway first boots it acts as a Wi-Fi hotspot with a captive portal which a user can connect to from another device (e.g. smartphone/tablet/laptop) in order to connect the gateway to a Wi-Fi network.

This will need implementing separately for the snap package when bundled with a custom Ubuntu Core OS image. This could be part of the gateway snap, or possibly a separate one.

For inspiration see:

@benfrancis benfrancis added this to the 2.0 milestone Aug 21, 2024
@benfrancis benfrancis added the snap Issues relating to the snap package label Aug 21, 2024
@benfrancis
Copy link
Member Author

See wifi-setup.ts for the Wi-Fi hotspot implementation used when running on Raspbian.

@ogra1
Copy link
Contributor

ogra1 commented Oct 23, 2024

Have you yet tried to simply turn on this feature as-is and capture all errors/denials from the snap env. ? As long as it uses standard features in the backend it should work similar to the examples you listed in the initial post, we'd just need a list of interfaces (from snappy-debug) and add potentially missing binaries to the snap as long as it uses standard features and tools at least.

@benfrancis
Copy link
Member Author

@ogra1 wrote:

Have you yet tried to simply turn on this feature as-is and capture all errors/denials from the snap env. ?

No I haven't tried that to be honest, I just know it doesn't currently work.

Looking at the source code in a bit more detail, wifi-setup.ts calls the same Platform implementation as Network Settings on the back end, which I've been porting to use Network Manager via DBus in #3168 *. Whilst the Raspbian implementation does use some command line tools like wpa_cli and systemctl, it does also manually read and write config files in /etc/, which I assumed wouldn't work in snap confinement.

I will play with this and try to figure out what doesn't work. There are some platform features (like ap mode) which weren't needed for network settings but are needed for first time setup.

* In retrospect it may have been easier to use nmcli rather than consume the DBus API, but I hadnt realised that was an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snap Issues relating to the snap package story
Projects
Status: Sprint Backlog
Development

No branches or pull requests

2 participants