nymea-networkmanager icon indicating copy to clipboard operation
nymea-networkmanager copied to clipboard

Service hangs/stop responding after connecting to network

Open epaterlini opened this issue 2 years ago • 5 comments

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...

image

But the device is connected to wifi as per:

image image

epaterlini avatar May 18 '22 09:05 epaterlini

Hi! Which client are you using to connect to the bluetooth server?

t-mon avatar May 18 '22 09:05 t-mon

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

epaterlini avatar May 18 '22 10:05 epaterlini

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.

t-mon avatar May 18 '22 10:05 t-mon

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):

image

epaterlini avatar May 18 '22 10:05 epaterlini

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 :-)

epaterlini avatar May 18 '22 13:05 epaterlini