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 Network Settings #3155

Open
benfrancis opened this issue Aug 21, 2024 · 3 comments · May be fixed by #3168
Open

[Snap] Implement Network Settings #3155

benfrancis opened this issue Aug 21, 2024 · 3 comments · May be fixed by #3168
Labels
snap Issues relating to the snap package story
Milestone

Comments

@benfrancis
Copy link
Member

As a user I want to be able to configure my network settings when using the snap package so that I can connect my gateway to a network.

Currently clicking on Network Settings in the web interface when using the snap package on Ubuntu displays a message which says "Network settings are not supported for this platform." This is because network settings are not implemented for Ubuntu, or Ubuntu Core.

This will require implementing network settings using NetworkManager in linux-ubuntu.ts and/or creating a linux-ubuntu-core.ts in /src/platforms.

See https://github.com/krellian/kiosk/blob/master/services/models/network.js for inspiration.

This will likely also require the snap to be permitted to use an additional interface.

@benfrancis benfrancis added story snap Issues relating to the snap package labels Aug 21, 2024
@benfrancis benfrancis added this to the 2.0 milestone Aug 21, 2024
@benfrancis benfrancis changed the title [Snap] Implement Network Settings for snap package [Snap] Implement Network Settings Aug 22, 2024
@benfrancis
Copy link
Member Author

@ogra1 The way I have been planning to implement this is to request the network-manager interface and configure networking by communicating with NetworkManager over D-Bus from Node.js. I previously did something similar for Krellian Kiosk, but it's quite low level and fiddly to implement and I found the documentation of the NetworkManager D-Bus API quite difficult to understand.

I note that there appear to be multiple interfaces for modifying network settings so before I make a start on this, is there a simpler approach I should be considering?

The WebThings Gateway user manual should give you an idea of the kinds of settings which need to be modified from Node.js.

There are other settings that will need implementing later including configuring mDNS, and a Wi-Fi hotspot during first time setup.

@benfrancis
Copy link
Member Author

Potential approaches to implementing networking on Ubuntu Core:

@benfrancis
Copy link
Member Author

  • network-manager interface "enables access to NetworkManager, providing privileged access to configure and observe networking." - Does this just mean via DBus, or also the nmcli command line interface?
    • dbus npm module to provide raw access to dbus

FYI I've made a start using this approach in #3168 so we'll see how it goes.

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: Product Backlog
Development

Successfully merging a pull request may close this issue.

1 participant