From 6c3b0da71f9eb0537ff6509ea4b0d159893e9c02 Mon Sep 17 00:00:00 2001 From: Tom <116762865+NomDeTom@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:35:04 +0000 Subject: [PATCH 1/7] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 27b1d63..5445dde 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Find out more in the sections below, or in the [Wiki](https://github.com/femtofo - How to order - [Etsy (USA)](https://www.etsy.com/listing/1861858340/femtofox-pro-v1-kit-compact-arm-linux) - [Tindie (UK)](https://www.tindie.com/products/nomdetom/femtofox-pro-v1-kit-linux-meshtastic-node/) + - [Etsy (UK)](https://www.etsy.com/uk/listing/1866094154/femtofox-pro-v1-kit-linux-meshtastic) - [DIY instructions](https://github.com/femtofox/Femtofox_Community_Hardware) - [USB configuration tool](https://github.com/femtofox/femtofox/wiki/USB-Configuration-Tool) - [Building your own Foxbuntu image](https://github.com/femtofox/femtofox/wiki/Building-Foxbuntu-%28WSL%29) From 2b1ffd0d9049d39a27ae78f83d787c77271468f4 Mon Sep 17 00:00:00 2001 From: nagumii Date: Sat, 15 Mar 2025 19:51:40 +0200 Subject: [PATCH 2/7] Prettify runounce output --- .../usr/local/bin/femto-runonce.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh index 0968a57..2dd10c9 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh @@ -53,7 +53,7 @@ log_message "Resizing filesystem..." resize2fs /dev/mmcblk1p5 resize2fs /dev/mmcblk1p6 resize2fs /dev/mmcblk1p7 -log_message "Resizing filesystem complete" +log_message "Resizing filesystem complete." # allocate swap file if [ ! -f /swapfile ]; then # check if swap file already exists @@ -65,21 +65,21 @@ if [ ! -f /swapfile ]; then # check if swap file already exists echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab > /dev/null log_message "Swap file allocated." else - log_message "Swap file already allocated, skipping" + log_message "Swap file already allocated, skipping..." fi # prevent randomized mac address for eth0. If `eth0`` is already present in /etc/network/interfaces, skip mac="$(awk '/Serial/ {print $3}' /proc/cpuinfo | tail -c 11 | sed 's/^\(.*\)/a2\1/' | sed 's/\(..\)/\1:/g;s/:$//')" file="/etc/network/interfaces" if ! grep -q " hwaddress ether $mac" "$file"; then - log_message "Setting eth0 MAC address to $mac (derivative of CPU s/n)" + log_message "Setting eth0 MAC address to $mac (derivative of CPU s/n)..." awk -v mac="$mac" ' { print } /allow-hotplug eth0/ { count=5 } count && --count == 0 { print " hwaddress ether " mac } ' "$file" > "$file.tmp" && mv "$file.tmp" "$file" else - log_message "eth0 mac address already set in /etc/network/interfaces, skipping" + log_message "eth0 mac address already set in /etc/network/interfaces, skipping..." fi # Add term stuff to .bashrc @@ -87,25 +87,25 @@ lines="export NCURSES_NO_UTF8_ACS=1 export TERM=xterm-256color export LANG=C.UTF-8" if ! grep -Fxq "$lines" /home/femto/.bashrc; then # Check if the lines are already in .bashrc + log_message "Adding TERM, LANG and NCURSES_NO_UTF8_ACS to .bashrc..." echo "$lines" >> /home/femto/.bashrc - log_message "Added TERM, LANG and NCURSES_NO_UTF8_ACS to .bashrc" else - log_message "TERM, LANG and NCURSES_NO_UTF8_ACS already present in .bashrc, skipping" + log_message "TERM, LANG and NCURSES_NO_UTF8_ACS already present in .bashrc, skipping..." fi # Fix Compiler +log_message "Adding compiler support..." cp /usr/lib/arm-linux-gnueabihf/libc_nonshared.a.keep /usr/lib/arm-linux-gnueabihf/libc_nonshared.a -log_message "Added compiler support" # Add a cheeky alias to .bash_aliases if ! grep -Fxq "alias sfc='sudo femto-config'" /home/femto/.bashrc; then # Check if the lines are already in .bash_aliases echo "alias sfc='sudo femto-config'" >> /home/femto/.bashrc log_message "Added \`alias sfc='sudo femto-config'\` to .bashrc" else - log_message "\`alias sfc='sudo femto-config'\` already present in .bashrc, skipping" + log_message "\`alias sfc='sudo femto-config'\` already present in .bashrc, skipping..." fi -log_message "Enabling meshtasticd service" +log_message "Enabling meshtasticd service..." systemctl enable meshtasticd #generate SSH keys From ccdb98a1136ee2a12bcd0159fc89c6a5247c598c Mon Sep 17 00:00:00 2001 From: Tom <116762865+NomDeTom@users.noreply.github.com> Date: Mon, 24 Mar 2025 00:35:38 +0000 Subject: [PATCH 3/7] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5445dde..5835d9f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ + + # Femtofox    The tiny, low power Linux Meshtastic node +###          [Click here for the Femtofox store](https://www.etsy.com/listing/1861858340/femtofox-pro-v1-kit-compact-arm-linux) + **Femtofox is a Linux-based mesh development platform - a Raspberry Pi sized computer with onboard LoRa radio, capable of being run with only 0.3w, making it *ideal* for solar powered nodes.** The Luckfox Pico Mini is the postage stamp sized heart of the Femtofox - a compact and power efficient Linux board, running Foxbuntu, our own customized version of Ubuntu. Femtofox is an expansion of the Luckfox's capabilities, utilizing a custom PCB with a 30db LoRa radio (over 6x the transmit power of a RAK Wisblock or Heltec V3) to create a power efficient, tiny and highly capable Meshtastic Linux node. From 419f203f57b3b5b3444859d1bf4aeccdcdd985e4 Mon Sep 17 00:00:00 2001 From: Jeremy Asher Date: Fri, 18 Apr 2025 11:21:40 -0700 Subject: [PATCH 4/7] add tun module dependency This adds `NET_CORE` which is a dependency for `TUN`. --- .../configs/luckfox_rv1106_linux_defconfig | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/foxbuntu/sysdrv/source/kernel/arch/arm/configs/luckfox_rv1106_linux_defconfig b/foxbuntu/sysdrv/source/kernel/arch/arm/configs/luckfox_rv1106_linux_defconfig index 5d91701..2c77d1b 100644 --- a/foxbuntu/sysdrv/source/kernel/arch/arm/configs/luckfox_rv1106_linux_defconfig +++ b/foxbuntu/sysdrv/source/kernel/arch/arm/configs/luckfox_rv1106_linux_defconfig @@ -1326,8 +1326,6 @@ CONFIG_SCSI_LOWLEVEL=y # CONFIG_SCSI_MPT2SAS is not set # CONFIG_SCSI_SMARTPQI is not set CONFIG_SCSI_UFSHCD=y -CONFIG_NETDEVICES=y -CONFIG_TUN=m # CONFIG_SCSI_UFSHCD_PCI is not set # CONFIG_SCSI_UFSHCD_PLATFORM is not set # CONFIG_SCSI_UFS_BSG is not set @@ -1370,7 +1368,25 @@ CONFIG_TUN=m CONFIG_NETDEVICES=y CONFIG_MII=y -# CONFIG_NET_CORE is not set +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_WIREGUARD is not set +# CONFIG_EQUALIZER is not set +# CONFIG_NET_FC is not set +# CONFIG_NET_TEAM is not set +# CONFIG_MACVLAN is not set +# CONFIG_IPVLAN is not set +# CONFIG_VXLAN is not set +# CONFIG_GENEVE is not set +# CONFIG_BAREUDP is not set +# CONFIG_GTP is not set +# CONFIG_MACSEC is not set +# CONFIG_NETCONSOLE is not set +CONFIG_TUN=m +# CONFIG_TUN_VNET_CROSS_LE is not set +# CONFIG_VETH is not set +# CONFIG_NLMON is not set # CONFIG_ARCNET is not set # @@ -2988,6 +3004,7 @@ CONFIG_VIDEO_RK_IRCUT=y # CONFIG_VIDEO_VS6624 is not set # CONFIG_VIDEO_MIS2031 is not set # CONFIG_VIDEO_MIS4001 is not set +# CONFIG_VIDEO_MIS5001 is not set # CONFIG_VIDEO_MT9M001 is not set # CONFIG_VIDEO_MT9M032 is not set # CONFIG_VIDEO_MT9M111 is not set From 2a3f96ed70a5d1289bfcd63e67884d2808460403 Mon Sep 17 00:00:00 2001 From: nagumii Date: Fri, 25 Apr 2025 16:00:02 +0300 Subject: [PATCH 5/7] Add avahi-daemon toggle to networking menu --- .../usr/local/bin/femto-config | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) 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 2462f15..d196e05 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 @@ -122,8 +122,9 @@ networking_settings() { 6 "Set hostname" "" \ 7 "Test internet connection" "" \ 8 "Manage Meshtastic wifi sync" "" \ + 9 "Manage Avahi-Daemon service" "" \ " " "" "" \ - 9 "Back to main menu" "" 3>&1 1>&2 2>&3) + 10 "Back to main menu" "" 3>&1 1>&2 2>&3) [ $? -eq 1 ] && break # Exit the loop if the user selects "Cancel" or closes the dialog case $networking_choice in 1) # Turn Wi-Fi on/off) @@ -235,6 +236,68 @@ networking_settings() { done ;; 9) + choice="" # zero the choice before loading the submenu + while true; do + local name="avahi-daemon" + echo "Checking $name service state..." + local service_state="$(femto-utils.sh -R "$(femto-utils.sh -C "$name")")" + choice=$(dialog --no-collapse --colors --help-button --cancel-label "Back" --title "$name Service" --default-item "$choice" --menu "Avahi-Daemon service is $service_state" 16 60 5 \ + "View detailed service status" "x" \ + " " "" \ + "Start/restart service" "x" \ + $(if ! echo "$service_state" | grep -q 'not running'; then echo "Stop service x"; fi) \ + " " "" \ + $(if echo "$service_state" | grep -q 'disabled'; then echo "Enable service x"; fi) \ + $(if echo "$service_state" | grep -q 'enabled'; then echo "Disable service x"; fi) \ + " " "" \ + "Back to previous menu" "x" 3>&1 1>&2 2>&3) + exit_status=$? # This line checks the exit status of the dialog command + if [ $exit_status -eq 1 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog + break + elif [ $exit_status -eq 2 ]; then # Help ("extra") button + dialog --no-collapse --colors --title "$name service help" --msgbox "The $name service advertises the Meshtastic node on the local LAN, allowing the Android app to detect it. Without Avahi, you will need to manually enter the Femtofox's IP address in the app to connect.\n" 0 0 + else + case $choice in + "View detailed service status") + echo "Getting $name service status..." + dialog --no-collapse --title "$name service status" --msgbox "$(systemctl status $name)" 0 0 + ;; + "Start/restart service") + dialog --no-collapse --title "$title" --yesno "Start/restart $name service?" 7 45 + if [ $? -eq 0 ]; then #unless cancel/no + systemctl restart $name + dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl restart $name\Zn\` command to system.\n\n$name should be running." 10 60 + fi + ;; + "Stop service") + dialog --no-collapse --colors --title "$title" --yesno "Stop $name service?\n\nThis will take the node \Zu\Z1OFFLINE\Zn.\n\n$name will automatically restart on boot service if enabled." 11 50 + if [ $? -eq 0 ]; then #unless cancel/no + systemctl stop $name + dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl stop $name\Zn\` command to system.\n\n$name should be stopped." 9 60 + fi + ;; + "Enable service") + dialog --no-collapse --title "$title" --yesno "Enable $name service?" 6 45 + if [ $? -eq 0 ]; then #unless cancel/no + systemctl enable $name + systemctl start $name + dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl enable $name\Zn\` and \`\Zusystemctl start $name\Zn\` commands to system.\n\n$name should be running." 10 60 + fi + ;; + "Disable service") + dialog --no-collapse --colors --title "$title" --yesno "Disable $name service?\n\nThis will take the node \Zu\Z1OFFLINE\Zn and will not restart!" 9 50 + if [ $? -eq 0 ]; then #unless cancel/no + systemctl disable $name + systemctl stop $name + dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl disable $name\Zn\` and \`\Zusystemctl stop $name\Zn\` commands to system.\n\n$name should be disabled and stopped." 10 60 + fi + ;; + "Back to previous menu") break ;; + esac + fi + done + ;; + 10) return ;; esac From df8cb489838eb217650ca10c2eb72b895fdd2f99 Mon Sep 17 00:00:00 2001 From: nagumii Date: Fri, 25 Apr 2025 21:06:26 +0300 Subject: [PATCH 6/7] Combined meshtastic wifi sync and avahi daemon service managers into a single function --- .../usr/local/bin/femto-config | 188 +++++++----------- 1 file changed, 68 insertions(+), 120 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 d196e05..64ac042 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 @@ -79,6 +79,71 @@ check_meshtasticd_running() { fi } +service_manager() { + choice="" # zero the choice before loading the submenu + while true; do + local service_name=$1 + local readable_name=$2 + local help=$3 + echo "Checking $readable_name service state..." + local service_state="$(femto-utils.sh -R "$(femto-utils.sh -C "$service_name")")" + choice=$(dialog --no-collapse --colors --help-button --cancel-label "Back" --title "$readable_name Service" --default-item "$choice" --menu "Avahi-Daemon service is $service_state" 16 60 5 \ + "View detailed service status" "x" \ + " " "" \ + "Start/restart service" "x" \ + $(if ! echo "$service_state" | grep -q 'not running'; then echo "Stop service x"; fi) \ + " " "" \ + $(if echo "$service_state" | grep -q 'disabled'; then echo "Enable service x"; fi) \ + $(if echo "$service_state" | grep -q 'enabled'; then echo "Disable service x"; fi) \ + " " "" \ + "Back to previous menu" "x" 3>&1 1>&2 2>&3) + exit_status=$? # This line checks the exit status of the dialog command + if [ $exit_status -eq 1 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog + break + elif [ $exit_status -eq 2 ]; then # Help ("extra") button + dialog --no-collapse --colors --title "$readable_name service help" --msgbox "$3" 0 0 + else + case $choice in + "View detailed service status") + echo "Getting $readable_name service status..." + dialog --no-collapse --title "$readable_name service status" --msgbox "$(systemctl status $service_name)" 0 0 + ;; + "Start/restart service") + dialog --no-collapse --title "$title" --yesno "Start/restart $readable_name service?" 7 45 + if [ $? -eq 0 ]; then #unless cancel/no + systemctl restart $service_name + dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl restart $service_name\Zn\` command to system.\n\n$readable_name should be running." 10 60 + fi + ;; + "Stop service") + dialog --no-collapse --colors --title "$title" --yesno "Stop $readable_name service?\n\nThis will take the node \Zu\Z1OFFLINE\Zn.\n\n$readable_name will automatically restart on boot service if enabled." 11 50 + if [ $? -eq 0 ]; then #unless cancel/no + systemctl stop $service_name + dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl stop $service_name\Zn\` command to system.\n\n$readable_name should be stopped." 9 60 + fi + ;; + "Enable service") + dialog --no-collapse --title "$title" --yesno "Enable $readable_name service?" 6 45 + if [ $? -eq 0 ]; then #unless cancel/no + systemctl enable $service_name + systemctl start $service_name + dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl enable $service_name\Zn\` and \`\Zusystemctl start $service_name\Zn\` commands to system.\n\n$readable_name should be running." 10 60 + fi + ;; + "Disable service") + dialog --no-collapse --colors --title "$title" --yesno "Disable $readable_name service?\n\nThis will take the node \Zu\Z1OFFLINE\Zn and will not restart!" 9 50 + if [ $? -eq 0 ]; then #unless cancel/no + systemctl disable $service_name + systemctl stop $service_name + dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl disable $service_name\Zn\` and \`\Zusystemctl stop $service_name\Zn\` commands to system.\n\n$readable_name should be disabled and stopped." 10 60 + fi + ;; + "Back to previous menu") break ;; + esac + fi + done +} + wifi_config() { local title2="Wi-Fi (wlan0) Settings" local config=$(dialog --no-collapse --title "$title2" --form "↑ ↓ to navigate, [ESC] to cancel." 10 45 0 \ @@ -175,127 +240,10 @@ networking_settings() { dialog --no-collapse --title "Internet connectivity test" --colors --msgbox "$(femto-utils.sh -R "$(femto-network-config.sh -t)")" 9 40 ;; 8) # Manage Meshtastic wifi sync) - choice="" # zero the choice before loading the submenu - while true; do - echo "Checking Meshtastic wifi sync service state..." - local service_state="$(femto-utils.sh -R "$(femto-utils.sh -C "femto-wifi-mesh-control")")" - choice=$(dialog --no-collapse --colors --help-button --cancel-label "Back" --title "Meshtastic wifi sync Service" --default-item "$choice" --menu "Meshtastic wifi sync service is $service_state" 16 60 5 \ - "View detailed service status" "x" \ - " " "" \ - "Start/restart service" "x" \ - $(if ! echo "$service_state" | grep -q 'not running'; then echo "Stop service x"; fi) \ - " " "" \ - $(if echo "$service_state" | grep -q 'disabled'; then echo "Enable service x"; fi) \ - $(if echo "$service_state" | grep -q 'enabled'; then echo "Disable service x"; fi) \ - " " "" \ - "Back to previous menu" "x" 3>&1 1>&2 2>&3) - exit_status=$? # This line checks the exit status of the dialog command - if [ $exit_status -eq 1 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog - break - elif [ $exit_status -eq 2 ]; then # Help ("extra") button - dialog --no-collapse --colors --title "Meshtastic wifi sync service help" --msgbox "The Meshtastic wifi sync service synchronizes system wifi settings with Meshtastic wifi settings. This allows you to use Meshtastic's remote node administration feature to enable/disable wifi.\n\nIn future, this will also allow you to reconfigure SSID and password.\n" 0 0 - else - case $choice in - "View detailed service status") - echo "Getting Meshtastic wifi sync service status..." - dialog --no-collapse --title "Meshtastic wifi sync service status" --msgbox "$(systemctl status femto-wifi-mesh-control)" 0 0 - ;; - "Start/restart service") - dialog --no-collapse --title "$title" --yesno "Start/restart Meshtastic wifi sync service?" 7 45 - if [ $? -eq 0 ]; then #unless cancel/no - systemctl restart femto-wifi-mesh-control - dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl restart femto-wifi-mesh-control wifi sync\Zn\` command to system.\n\nMeshtastic wifi sync should be running." 10 60 - fi - ;; - "Stop service") - dialog --no-collapse --colors --title "$title" --yesno "Stop Meshtastic wifi sync service?\n\nThis will take the node \Zu\Z1OFFLINE\Zn.\n\nMeshtastic wifi sync will automatically restart on boot service if enabled." 11 50 - if [ $? -eq 0 ]; then #unless cancel/no - systemctl stop femto-wifi-mesh-control - dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl stop femto-wifi-mesh-control\Zn\` command to system.\n\nMeshtastic wifi sync should be stopped." 9 60 - fi - ;; - "Enable service") - dialog --no-collapse --title "$title" --yesno "Enable Meshtastic wifi sync service?" 6 45 - if [ $? -eq 0 ]; then #unless cancel/no - systemctl enable femto-wifi-mesh-control - systemctl start femto-wifi-mesh-control - dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl enable femto-wifi-mesh-control\Zn\` and \`\Zusystemctl start femto-wifi-mesh-control\Zn\` commands to system.\n\nMeshtastic wifi sync should be running." 10 60 - fi - ;; - "Disable service") - dialog --no-collapse --colors --title "$title" --yesno "Disable Meshtastic wifi sync service?\n\nThis will take the node \Zu\Z1OFFLINE\Zn and will not restart!" 9 50 - if [ $? -eq 0 ]; then #unless cancel/no - systemctl disable femto-wifi-mesh-control - systemctl stop femto-wifi-mesh-control - dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl disable femto-wifi-mesh-control\Zn\` and \`\Zusystemctl stop femto-wifi-mesh-control\Zn\` commands to system.\n\nMeshtastic wifi sync should be disabled and stopped." 10 60 - fi - ;; - "Back to previous menu") break ;; - esac - fi - done + service_manager "femto-wifi-mesh-control" "Meshtastic wifi sync" "The Meshtastic wifi sync service synchronizes system wifi settings with Meshtastic wifi settings. This allows you to use Meshtastic's remote node administration feature to enable/disable wifi.\n\nIn future, this will also allow you to reconfigure SSID and password.\n" ;; - 9) - choice="" # zero the choice before loading the submenu - while true; do - local name="avahi-daemon" - echo "Checking $name service state..." - local service_state="$(femto-utils.sh -R "$(femto-utils.sh -C "$name")")" - choice=$(dialog --no-collapse --colors --help-button --cancel-label "Back" --title "$name Service" --default-item "$choice" --menu "Avahi-Daemon service is $service_state" 16 60 5 \ - "View detailed service status" "x" \ - " " "" \ - "Start/restart service" "x" \ - $(if ! echo "$service_state" | grep -q 'not running'; then echo "Stop service x"; fi) \ - " " "" \ - $(if echo "$service_state" | grep -q 'disabled'; then echo "Enable service x"; fi) \ - $(if echo "$service_state" | grep -q 'enabled'; then echo "Disable service x"; fi) \ - " " "" \ - "Back to previous menu" "x" 3>&1 1>&2 2>&3) - exit_status=$? # This line checks the exit status of the dialog command - if [ $exit_status -eq 1 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog - break - elif [ $exit_status -eq 2 ]; then # Help ("extra") button - dialog --no-collapse --colors --title "$name service help" --msgbox "The $name service advertises the Meshtastic node on the local LAN, allowing the Android app to detect it. Without Avahi, you will need to manually enter the Femtofox's IP address in the app to connect.\n" 0 0 - else - case $choice in - "View detailed service status") - echo "Getting $name service status..." - dialog --no-collapse --title "$name service status" --msgbox "$(systemctl status $name)" 0 0 - ;; - "Start/restart service") - dialog --no-collapse --title "$title" --yesno "Start/restart $name service?" 7 45 - if [ $? -eq 0 ]; then #unless cancel/no - systemctl restart $name - dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl restart $name\Zn\` command to system.\n\n$name should be running." 10 60 - fi - ;; - "Stop service") - dialog --no-collapse --colors --title "$title" --yesno "Stop $name service?\n\nThis will take the node \Zu\Z1OFFLINE\Zn.\n\n$name will automatically restart on boot service if enabled." 11 50 - if [ $? -eq 0 ]; then #unless cancel/no - systemctl stop $name - dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl stop $name\Zn\` command to system.\n\n$name should be stopped." 9 60 - fi - ;; - "Enable service") - dialog --no-collapse --title "$title" --yesno "Enable $name service?" 6 45 - if [ $? -eq 0 ]; then #unless cancel/no - systemctl enable $name - systemctl start $name - dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl enable $name\Zn\` and \`\Zusystemctl start $name\Zn\` commands to system.\n\n$name should be running." 10 60 - fi - ;; - "Disable service") - dialog --no-collapse --colors --title "$title" --yesno "Disable $name service?\n\nThis will take the node \Zu\Z1OFFLINE\Zn and will not restart!" 9 50 - if [ $? -eq 0 ]; then #unless cancel/no - systemctl disable $name - systemctl stop $name - dialog --no-collapse --colors --msgbox "Sent \`\Zusystemctl disable $name\Zn\` and \`\Zusystemctl stop $name\Zn\` commands to system.\n\n$name should be disabled and stopped." 10 60 - fi - ;; - "Back to previous menu") break ;; - esac - fi - done + 9) # Manage avahi) + service_manager "avahi-daemon" "Avahi Daemon" "The Avahi-Daemon service advertises the Meshtastic node on the local LAN (often called a Bonjour service), allowing the Android app to detect it. Without Avahi, you will need to manually enter the Femtofox's IP address in the app to connect.\n" ;; 10) return From 11d6d3deda07dbf6d4b7e5e392c43b031e5fda0d Mon Sep 17 00:00:00 2001 From: Ruledo Date: Wed, 14 May 2025 00:32:15 -0700 Subject: [PATCH 7/7] Update foxbuntu-builder.sh Moved pico repo --- environment-setup/foxbuntu-builder.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment-setup/foxbuntu-builder.sh b/environment-setup/foxbuntu-builder.sh index 3cb4063..136b3c0 100644 --- a/environment-setup/foxbuntu-builder.sh +++ b/environment-setup/foxbuntu-builder.sh @@ -57,7 +57,8 @@ clone_repos() { fi } - clone_with_retries "https://github.com/LuckfoxTECH/luckfox-pico.git" || return 1 + #clone_with_retries "https://github.com/LuckfoxTECH/luckfox-pico.git" || return 1 + clone_with_retries "https://github.com/Ruledo/luckfox-pico.git" || return 1 clone_with_retries "https://github.com/femtofox/femtofox.git" || return 1 return 0