First try with Balena. So far I had been using Raspotify with no issue on the same board but was eager to have Airplay and BT as well.
The pi does not connect to my wifi. The green LED flashes 4 times (alternating with a longer led-ON, not a longer “pause” as described in the tutorial )
I am of course specifying the 2.4GHz SSID , not the 5GHz one. Yes I have double checked my credentials in resin-wifi-01
I don’t have a mini HDMI cable sadly so don’t know what the error message could be.
Is a log actually created by Balena that I could access on the SD CArd?
Hi, by default logging in BalenaOS is performed to memory, so before being able to access the logs from the SD card you need to enable persistent logging. You can do this by pre-configuring the image before flashing it to the device by using the balena CLI. For example from a Linux shell you can execute:
Please modify the device type (raspberrypi) above to your specific device type.
After flashing the image and booting, please leave it some type for the logs to be flushed into the card. You can then use a disk reader and access the logs in the resin-data partition of your SD card, under root-overlay/var/log/journal.
Please note that if the device manages to connect to BalenaCloud, the persistent logging setting will be synched to the cloud configuration which is off by default. If this happens you will see the device automatically rebooting after the remote setting is applied.
You will then be able to point a journalctl tool running on a Linux machine to read the logs with;
Could you please provide more details? I have a linux PC from which I Dowload the .img which I then dd to the micro sd card.
Installing Balena CLI seems beyond my reach.
PS: I have tried 2.54.2 and 2.48.0, “prod” or “dev”.
I have tried using my Guest Wifi SSID instead of my main one (both 2.4)
I have setup my router in wpa2 and wpa+wpa2
there is a folder with this name under resin-state but nothing inside
peter@X220:/media/peter/resin-state$ cd root-overlay/
peter@X220:/media/peter/resin-state/root-overlay$ ls -la
total 5
drwxr-xr-x 5 root root 1024 Jan 28 2020 .
drwxr-xr-x 4 root root 1024 Jan 28 2020 ..
drwxr-xr-x 8 root root 1024 Jan 28 2020 etc
drwxr-xr-x 3 root root 1024 Jan 28 2020 home
drwxr-xr-x 3 root root 1024 Jan 28 2020 var
peter@X220:/media/peter/resin-state/root-overlay$ cd var
peter@X220:/media/peter/resin-state/root-overlay/var$ ls -la
total 3
drwxr-xr-x 3 root root 1024 Jan 28 2020 .
drwxr-xr-x 5 root root 1024 Jan 28 2020 ..
drwxr-xr-x 6 root root 1024 Jan 28 2020 lib
peter@X220:/media/peter/resin-state/root-overlay/var$ cd lib/
peter@X220:/media/peter/resin-state/root-overlay/var/lib$ ls
bluetooth chrony NetworkManager systemd
peter@X220:/media/peter/resin-state/root-overlay/var/lib$ cd NetworkManager/
peter@X220:/media/peter/resin-state/root-overlay/var/lib/NetworkManager$ ls
NetworkManager-intern.conf timestamps
peter@X220:/media/peter/resin-state/root-overlay/var/lib/NetworkManager$ cat timestamps
[timestamps]
a8bb4cc8-7318-401a-a51f-03f3ab6994bd=1586968586
ca006e81-1b55-4c10-9298-1e74b427c948=1586969486
708d7284-c4e3-450b-a67f-c50b08bd04a3=1586968300
peter@X220:/media/peter/resin-state/root-overlay/var/lib/NetworkManager$ cat NetworkManager-intern.conf
# Internal configuration file. This file is written and read
# by NetworkManager and its configuration values are merged
# with the configuration from 'NetworkManager.conf'.
#
# Keys with a ".set." prefix specify the value to set.
# A corresponding key with a ".was." prefix records the value
# of the user configuration at the time of storing the file.
# The value from internal configuration is rejected if the corresponding
# ".was." key no longer matches the configuration from 'NetworkManager.conf'.
# That means, if you modify a value in 'NetworkManager.conf', the internal
# overwrite no longer matches and is ignored.
#
# Certain sections can only be overwritten whole, not on a per key basis.
# Such sections are marked with a ".was" key that records the user configuration
# at the time of writing.
#
# Internal sections of the form [.intern.*] cannot
# be set by user configuration.
#
# CHANGES TO THIS FILE WILL BE OVERWRITTEN
peter@X220:/media/peter/resin-state/root-overlay/var/lib/NetworkManager$
the rpi zero W only supports 2.4GHz networks - just to make sure this is not the issue, can you make sure you are not configuring it against a 5GHz access point?
Now that you have persistent logging enabled, I think we can start the debugging process for the wifi. Once you have kept the device on for a bit, it will have tried to connect to the configured wifi. When it fails, it will have logs written to file that you can access by connecting the SD card to your laptop/PC.
Can you share those logs? They should be in the /var/log/journal folder
So I compared the logs you shared with one of my devices which connects to wifi.
This is the part where the logs for NetworkManager service diverged -
Sep 09 04:21:20 21512a8 NetworkManager[1362]: <info> [1599625280.2909] manager: NetworkManager state is now CONNECTED_LOCAL
Sep 09 04:21:20 21512a8 NetworkManager[1362]: <info> [1599625280.2952] policy: set-hostname: set hostname to '21512a8' (from system configuration)
Sep 09 04:21:20 21512a8 NetworkManager[1362]: <info> [1599625280.2955] device (supervisor0): Activation: successful, device activated.
Sep 09 04:21:20 21512a8 NetworkManager[1362]: <info> [1599625280.8320] policy: auto-activating connection 'resin-wifi-01' (a58e405d-fdc2-3649-9339-5bbaea740c76)
Sep 09 04:21:20 21512a8 NetworkManager[1362]: <info> [1599625280.8346] device (wlan0): Activation: starting connection 'resin-wifi-01' (a58e405d-fdc2-3649-9339-5bbaea740c76)
Sep 09 04:21:20 21512a8 NetworkManager[1362]: <info> [1599625280.8352] device (wlan0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Sep 09 04:21:20 21512a8 NetworkManager[1362]: <info> [1599625280.8369] manager: NetworkManager state is now CONNECTING
Sep 09 04:21:20 21512a8 NetworkManager[1362]: <info> [1599625280.8685] device (wlan0): set-hw-addr: reset MAC address to 48:A4:93:04:99:9A (preserve)
So looks like network manager is having trouble finding the creds in resin-wifi-1. Your logs show no mention of that at all - which is suspect. Can you see if your resin-boot partition has indeed the requisite file?