What happens when a user changes their SSID password down the road?


I’m very interested in deploying BerryLan with some Pi hardware that we want to ship to customers. At first our process was going to be to ask the user for their SSID and password and hardcode into wpa_supplicant, however there are a lot of issues with that. BerryLan would solve this!

One question I have is if the user changes their SSID or SSID password down the road, can they just open the app and go through the process again?


Hi! Thanks for your interest in Berrylan :slight_smile:

Berrylan is actually just a small abstract from our product portfolio and was always meant to help with the initial setup without any further requirements.
In order to make this whole wireless setup really secure and nice to use, a push button would solve your problem. We have in our stack a version which starts the Bluetooth server only if you press a button for 3 seconds (so it requires physical access for the person who wants to bring the device online). In this way the setup can be started at any time and allows to reconfigure the network, start an access point or connect to a different wireless network. Since we don’t have a button on a plan Raspberry Pi, we implemented different modes, in which the daemon can be started:

  • always: the Bluetooth server runs the whole time, this is very insecure since someone could force the device to connect into a different network. This mode exists only for debug purposes
  • once: this mode starts the Bluetooth only until you have a configured a network. Afterwards the Bluetooth server does not start ever again.
  • offline: this mode starts the Bluetooth server whenever the device is not connected to any network (LAN or WLAN). This is the default mode for Berrylan.
  • start: this mode starts the Bluetooth server after booting for 3 min. Restart the device and you have 3 min to configure your network.

You can configure these modes with the -m parameter of the nymea-networkmanager. You can configure the mode in the systemd service file which can be found in /lib/systemd/system/nymea-networkmanager.service. Detailed description can also be found in the help section: nymea-networkmanager --help.

If you are interested in version which supports the push button control, please let us know, maybe we can help you out.



Oh, I forgot to mention: you can also change the mode in the /etc/nymea/nymea-networkmanager.conf file, which keeps the settings even if you update the package. This is the way how you should configure the behavior.


As to the initial question, if the device was previously associated to an SSID/PSW that was no longer available (it was changed by the router owner), would the device attempt to connect to the previously known SSID, fail and then restart the BT server listening (assuming mode==offline)? In this case, would BerryLan detect and allow another SSID to be associated in the list of wifis?


Hi casahome2000! The nymea-networkmanager is basically a DBus client to the original network-manager.
In the offline mode, the nymea-networkmanager checks if the host is connected to any wired or wireless network, if no connection is available, the Bluetooth server starts.
If, for example, your device was previously connected to a wifi A, then switched to a new network B, and the new network B goes down, the network-manager would pick theoretically the other known network and tries to connect to it. If successfully connected, the nymea-networkmanager would not start the bluetooth server in offline mode, since you are not offline any more. You can check the available connection with the nmcli connection command. I hope this helps :slight_smile:


Got it.
Additionally is there a way to remove previously known wifi networks? For example, connected up to SSID1 and now would like to remove reference/traces of SSID1 from wifi connection manager.

Similar to
$wpa_cli remove_network 0


You can use nmcli for that. First list your known connections

nmcli connection 
NAME                      UUID                                  TYPE      DEVICE 
foo                       5cbe0765-b5fe-4448-90da-15826b2b1e4f  wifi      wlp3s0 

Then you can remove a connection using

nmcli connection delete foo
Connection 'foo' (5cbe0765-b5fe-4448-90da-15826b2b1e4f) successfully deleted.