nymea-networkmanager
nymea-networkmanager copied to clipboard
Service hangs/stop responding after connecting to network
Hi all! Very often it happens that after successfully connecting to a wireless network, the nymea service does not receive its IP configuration and sits into a strange loop... (it says "no active accesspoint" but the wifi connection is up). In this state the bluetooth device is not discoverable anymore, only thing to do is to restart nymea-networkmanager service. Don't know what's happening here..I'm on Ubuntu Server 22.04 with Kernel 5.17 and onboard wifi+bluetooth chip.
Any ideas? Below the journalctl with the service log...

But the device is connected to wifi as per:


Hi! Which client are you using to connect to the bluetooth server?
Hello! I am using the Flutter (Dart) version of the client (which uses flutter_blue internally): https://pub.dev/packages/nymea_network_manager
The strange thing is that I already used the nymea package successfully on a Raspbian system, the problems I mention here started when I installed the whole stuff on a regular Intel-based PC.
Btw, the repetitions you are seeing in the logs are because my app "polls" for IP configuration every 2 seconds
Can you reproduce the issue using our berrylan app or nymea-app? I'm not sure what happend before your snipplet or what your client library is doing there, since it's not from us.
I tried with BerryLan...the first two times I used it it gave me the IP correctly, then I tried my app and it worked correctly too. I then did a cold restart (rebooted the device), run BerryLan again and then it connected to the wifi but gave no IP (same "no active accesspoints" message in the service) and the Bluetooth service was not discoverable anymore. Below screenshot of last step of BerryLan (notice empty IP address):

The problem seems to happen more often (almost always) when the Wi-Fi network is "forgotten" (eg. by issuing the command "nmcli connection delete..." ). If I try with an already-remembered (or already-connected) network it seems to work more often...maybe because it takes less time to connect? Don't know....it's only an idea :-)