No network_rx/tx when on Wifi
Hello, fresh install on RPi5.
Initially, I was setup over hardwire so eth0 was setup and running. Then I setup the wifi and found that the LCD display was not updating the Rx and Tx bytes correctly (listed as d0 and u0) like it did for eth0. So I decided to investigate...
To setup the wifi, I added the wpa_supplicant.conf file to /boot/firmware (subsequently deleted by _bootstrap.sh line 226). I found I had to add wpa_supplicant.conf to /etc/wpa_supplicant/ directory manually after rebooting as internet.sh starting at line 91 checks for its presence. Maybe after _bootstrap.sh sets up the wifi, it should copy the .conf for the user into /etc/wpa_supplicant/ and then delete the /boot/firmware version of the file?
The reason I was tracing in internet.sh was because this is where network_rx/tx get set (and subsequently displayed on the LCD) starting at line 50. networkDevice was set correctly as wlan0 but the first if condition (multiple instances of Debian in os-release) was triggering a true, and thus no ${networkDevice} was being passed to ifconfig so it defaulted to the first interface (eth0) which had 0 bytes as I was now only operating on wifi (wlan0). Not sure the best fix as this check was obviously put in place for some reason. I just modified the code to add ${networkDevice} line 57 and 58 but surely there is a better way?
Off to see why RTL is saying bad gateway and then to fix the touchscreen errors.. very cool project!
Follow up... after playing around with docker (and having more interfaces added), the LCD display broke again. This time it was displaying docker0 interface IPv6 address instead of wlan0 IPv4. Commenting out the part after line 75 in internet.sh fixed the issue. wlan0 IPv4 is displayed. maybe we don't always prefer the first interface over all others?
Hi. Regarding the setting the wifi by file - this is the logic at the moment:
It first checks whether one of the two files, wifi or wpa_supplicant.conf, exists on the sd card.
If the wifi file exists, the script reads the first line of the file as the SSID (name of the WiFi network) and the second line as the password. Both values are cleaned of whitespace.
If the wpa_supplicant.conf file exists, the script extracts the SSID and password from this file. This file is a conventional method for configuring WiFi on Raspberry Pi devices.
After the SSID and password are extracted, the script attempts to configure the WiFi connection with these values. If an error occurs the script writes an error message to the log file and displays "errorWIFI" on the LCD display for a minute, and then performs a system shutdown.
If the WiFi configuration is successful, the wifi and wpa_supplicant.conf files are removed from the sd card root directory.
So the wpa_supplicant.conf is basically just there for backwards compatibility - RaspiOS changed that for the RaspberryPi with the latest release. The wifi file is the new way to do it on RaspiBlitz - keeping it simple - just SSID & Password.