Disable Comitup for fresh installation.
Failed to start comitup WiFi management.
OpenHab Image Version: 4.0.1
Hardware: Raspberry Pi 4
RAM: 4GB
SD Card: 16GB
Background:
I want a fresh OpenHab 4 installation and burn the image on SD Card. I inserted SD Card in RPi 4 and started the system. OH exposed a Hotspot to configure the WiFi. However, after providing the correct details, after reboot, an error is thrown “Failed to start comitup WiFi management”. Initially, I thought that there was some error while entering the WiFi password and I burn the image again. However, I again experienced the same behavior for around 5 times on RPi4 and RPi 3b+. I tried searching the internet and realized that the issue is quite common with many users.
Error:
While searching the logs I figured that comitup was not able to find the NetworkManager service after WiFi configuration.
Solution:
I changed the following lines in my first-boot.bash file:
- Line # 88
if [[ "$hotspot" == "enable" ]] && ! [[ -x $(command -v ) ]]; then
To
if [[ "$hotspot" == "enable1" ]] && ! [[ -x $(command -v ) ]]; then
- Line # 113
if [[ "$hotspot" == "enable" ]] && ! [[ -x $(command -v comitup) ]]; then
To
if [[ "$hotspot" == "enable1" ]] && ! [[ -x $(command -v comitup) ]]; then
Basically, I just changed the condition to always return false and do not start the comitup hotspot.
Thereafter, I supplied the wpa_supplicant.conf file in the SD card with the following details:
country=IN
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid="<<Your WiFi SSID>>"
psk="<<Your WiFi Password>>"
}
Make sure that you make all these changes before inserting the SD card to the RPi for the first time.
Result:
Bingo!
My RPi connects to the network in first attempt and all setup continues as usual without any issues.