From d47404db35c7cd0d0eebadecbf1d588c077fa54a Mon Sep 17 00:00:00 2001 From: nagumii Date: Fri, 3 Jan 2025 14:08:02 +0200 Subject: [PATCH 1/2] Increment foxbuntu release --- foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release index 91569d4..f610fbf 100644 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release @@ -1,6 +1,6 @@ major=0 minor=95 -patch=6 +patch=7 hotfix= # major, minor and patch must be numbers. hotfix must be letters. \ No newline at end of file From 7469af10e6095afa0a2b8581389b09e47547d882 Mon Sep 17 00:00:00 2001 From: nagumii Date: Fri, 3 Jan 2025 14:20:23 +0200 Subject: [PATCH 2/2] Fix small bugs in install wizard. --- .../usr/local/bin/femto-config | 20 +++++------ .../usr/local/bin/femto-install-wizard.sh | 11 +++--- .../usr/local/bin/femto-network-config.sh | 34 +++++++++---------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config index 95d42e5..0d036c4 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config @@ -27,24 +27,24 @@ wifi_config() { [ -n "$wifi_country" ] && cmd="$cmd -c \"$wifi_country\"" cmd="$cmd -r" if [ -z "$wifi_ssid" ]; then - dialog --title "$title2" --msgbox "\nSSID is required." 8 40 + dialog --title "$title2" --msgbox "\nSSID is required to configure Wi-Fi." 8 40 return fi eval $cmd - dialog --title "$title2" --msgbox "Wi-Fi Settings Saved:\nSSID: $wifi_ssid\nPassword: $wifi_psk\nCountry: $wifi_country\nMeshtastic wifi setting set to ON" 9 40 + dialog --title "$title2" --msgbox "Wi-Fi Settings Saved:\nSSID: $wifi_ssid\nPassword: $wifi_psk\nCountry: $wifi_country\nMeshtastic Wi-Fi setting set to ON" 9 40 } # Function to handle Wi-Fi settings networking_settings() { local title="Networking" - local title2="Wifi Settings" + local title2="Wi-Fi Settings" wpa_supplicant_conf="/etc/wpa_supplicant/wpa_supplicant.conf" while true; do local option="" option=$(dialog --menu "$title" 15 40 4 \ - 1 "View wifi settings" \ - 2 "Change wifi settings" \ - 3 "Restart wifi" \ + 1 "View Wi-Fi settings" \ + 2 "Change Wi-Fi settings" \ + 3 "Restart Wi-Fi" \ 4 "View ethernet settings" \ 5 "Set hostname" \ 6 "Test internet connection" \ @@ -57,14 +57,14 @@ networking_settings() { case $option in 1) - echo "Getting wifi configuration..." + echo "Getting Wi-Fi configuration..." dialog --msgbox "$(femto-network-config.sh -w)" 0 0 ;; 2) wifi_config ;; 3) - dialog --title "$title2" --yesno "Wifi and Ethernet will be restarted.\nMeshtastic wifi setting will be set to ON." 7 50 + dialog --title "$title2" --yesno "Wi-Fi and Ethernet will be restarted.\nMeshtastic Wi-Fi setting will be set to ON." 7 50 if [ $? -eq 0 ]; then #unless cancel/no femto-network-config.sh -r fi @@ -183,7 +183,7 @@ then \`depmod\` will be run. To remove support, those modules will be deleted.\n ;; 3) dialog --title "$title" --yesno "Rerunning the first-boot script will add support for RTC (real time clock), \ -set the eth0 MAC address and Meshtastic nodeID to a derivative of the CPU serial number and enable wifi in Meshtastic settings. \ +set the eth0 MAC address and Meshtastic nodeID to a derivative of the CPU serial number and enable Wi-Fi in Meshtastic settings. \ Rerunning the script will not cause any issues if these things are already in place. Femtofox will reboot after execution.\n\nConfirm?" 12 60 if [ $? -eq 0 ]; then #unless cancel/no runonce.sh @@ -442,7 +442,7 @@ while getopts ":lw" opt; do l) # Option -l (set lora radio) set_lora_radio ;; - w) # Option -w (wifi config) + w) # Option -w (Wi-Fi config) wifi_config ;; esac diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-install-wizard.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-install-wizard.sh index 52e5d58..9a954db 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-install-wizard.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-install-wizard.sh @@ -27,7 +27,7 @@ wizard() { dialog --title "$title" --msgbox "\nFemtofox is now reachable at\n$new_hostname.local" 8 40 fi - dialog --title "$title" --cancel-label "Skip" --yesno "\nConfigure wifi settings?" 8 40 + dialog --title "$title" --cancel-label "Skip" --yesno "\nConfigure Wi-Fi settings?" 8 40 if [ $? -eq 0 ]; then #unless cancel/no femto-config -w fi @@ -52,9 +52,10 @@ wizard() { fi while true; do - choice=$(dialog --title "$title" --cancel-label "Skip" --menu "Enable/disable Meshtastic Legacy admin channel?" 11 40 5 \ + choice=$(dialog --title "$title" --cancel-label "Skip" --menu "Enable/disable Meshtastic Legacy admin channel?" 12 40 5 \ 1 "Enable" \ 2 "Disable (default)" \ + "" "" \ 3 "Skip" 3>&1 1>&2 2>&3) exit_status=$? # This line checks the exit status of the dialog command @@ -64,9 +65,9 @@ wizard() { fi case $choice in - 1) femto-meshtasticd-config.sh -o "true" ;; - 2) femto-meshtasticd-config.sh -o "false" ;; - 3) return ;; + 1) femto-meshtasticd-config.sh -o "true" && break ;; + 2) femto-meshtasticd-config.sh -o "false" && break ;; + 3) break ;; *) dialog --msgbox "Invalid choice, please try again." 8 40 ;; esac done diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-network-config.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-network-config.sh index cc3c1b9..2ff189f 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-network-config.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-network-config.sh @@ -8,16 +8,16 @@ wpa_supplicant_conf="/etc/wpa_supplicant/wpa_supplicant.conf" help=$(cat </dev/null | grep -i 'ESSID' | awk -F 'ESSID:"' '{print $2}' | awk -F '"' '{print $1}')\n\ -Signal Strength: $(iwconfig 2>/dev/null | grep -i 'Signal level' | awk -F 'Signal level=' '{print $2}' | awk '{print $1}')\n\ -MAC address: $(ifconfig wlan0 | grep ether | awk '{print $2}')\n\ -Current IP: $(hostname -I | awk '{print $1}')\n\ -Hostname: $(hostname).local\n\ +Connected to: $(iwconfig 2>/dev/null | grep -i 'ESSID' | awk -F 'ESSID:"' '{print $2}' | awk -F '"' '{print $1}')\n\ +Signal Strength: $(iwconfig 2>/dev/null | grep -i 'Signal level' | awk -F 'Signal level=' '{print $2}' | awk '{print $1}')\n\ +MAC address: $(ifconfig wlan0 | grep ether | awk '{print $2}')\n\ +Current IP: $(hostname -I | awk '{print $1}')\n\ +Hostname: $(hostname).local\n\ For more details, enter \`iwconfig\`." ;; t) # Option -t (test internet connection) @@ -103,7 +103,7 @@ For more details, enter \`iwconfig\`." echo "Internet connection is up.\n\nPinged $(echo "${targets[*]}" | sed 's/ /, /g').\nReceived $successful/$total responses." fi ;; - r) # Option -r (restart wifi) + r) # Option -r (restart Wi-Fi) updated_wifi="true" ;; n) # Option -n (set hostname) @@ -128,7 +128,7 @@ if [ "$updated_wifi" = true ]; then systemctl restart wpa_supplicant wpa_cli -i wlan0 reconfigure # <-------- add watch for FAIL response, error out timeout 30s dhclient -v - echo " Wifi restarted. Enabling Meshtastic wifi setting." + echo " Wi-Fi restarted. Enabling Meshtastic Wi-Fi setting." femto-meshtasticd-config.sh -m "--set network.wifi_enabled true" 10 "USB config" #| tee -a /tmp/femtofox-config.log # if [ $? -eq 1 ]; then # echo "Update of Meshtastic FAILED."