Resin Wifi Connect writes connections into HostOS?

Hello,

I am using Resin-wifi-connect for my Intel NUC.
I noticed something that the tool writes the connections into the HostOS /etc/NetworkManager/system-connections. I thought it is not possible to do that?

When I am connected to a wifi and call ./wifi-connect to reset to open up a hotspot and reboot the system, it will still connect to the old wifi settings. I was thinking it should delete everything when calling ./wifi-connect.

Then I checked via SSH HostOS and saw all the connections persistent inside /etc/NetworkManager/system-connections.

So this means using the path /mnt/state/root-overlay/etc/NetworkManager/system-connections inside app-containers will lead to persistent connections inside the HostOS and using rm /mnt/state/root-overlay/etc/NetworkManager/system-connections/mywifi (from app container) will lead to deleting /etc/NetworkManager/system-connections/mywifi (HostOS)?
or do I have to go through dbus interface and delete the connections?

Thanks for clarification.

/mnt/state/root-overlay/etc/NetworkManager/system-connections is bind mounted to /etc/NetworkManager/system-connections, so changing files on either side will be immediately reflected on the other.

More documentation on that here after the example: https://docs.resin.io/reference/resinOS/network/2.x/#changing-the-network-at-runtime

If you are doing this one time, you may do it from the hostOS, but if you intend to do it from an app container you need to use the D-Bus API or an application that uses it like nmcli.

Please let me know if that answers your questions.

Also please note that in versions 2 and 3 of WiFi Connect it had the feature of deleting existing connection profiles. Version 4 does not have this anymore, since usually you won’t have to delete a connection profile to existing network. Although version 4 will recreate a connection profile if a password is changed, etc.

1 Like

Thank you very much. This is what I wanted to hear. And it confirmed that something changed in version 4.

Understood! Thanks a lot for the references and support Majorz :slight_smile: I appreciate your time.

Vikas Kundu
Showbox Tutuapp