nymea / nymea-networkmanager

This daemon allows to set up the wireless network using a Bluetooth LE connection.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Berrylan only works with a fresh SD card install. 2nd boot, get "error occurred trying to start advertising"

ericmigi opened this issue · comments

Slightly custom pi build https://gitlab.com/nova/pi-gen running arm64 on pi 4

everything works fine during the first boot but if I reboot (without having set up berrylan via Bluetooth), I get this error

image

hmmm also issuing sudo systemctl restart nymea-networkmanager.service also fixes it fwiw

Hi @ericmigi
This looks to me like a race condition during boot. Can you show me the exact version of the nymea-networkmanager?

apt policy nymea-networkmanager

We had such an issue in the past, but it should be fixed theoretically. There is also a bluez dbus error, which could indicate that bluez has not been started yet or something went wrong.

Apparently on the RPi the hciuart.service takes quite long to start. The issue seems to be that bluetooth.target doesn't wait for that. The first boot seems to work fine indeed because the other services take longer initializing things so there's a good chance that hciuart.service is finished by then.

To my current understanding that seems to be a bug in the rpi startup scripts and the attached branch works around this fine for me by adding hciuart.service to the After section in /lib/systemd/system/nymea-networkmanager.service.

Does that work for you too?

Left a comment in #37 which you could try too.

please try the latest experimental images which should fix this:

BerryLan image: https://downloads.nymea.io/images/berrylan/experimental/
nymea image: https://downloads.nymea.io/images/raspberrypi/experimental/

This now fixed with todays stable release