mirror of
https://github.com/femtofox/femtofox.git
synced 2026-12-03 13:20:33 -05:00
Ongoing improvements to femto-config
This commit is contained in:
parent
fd756298da
commit
1ac5e2dc35
3 changed files with 47 additions and 9 deletions
|
|
@ -68,7 +68,7 @@ networking_settings() {
|
|||
wpa_supplicant_conf="/etc/wpa_supplicant/wpa_supplicant.conf"
|
||||
while true; do
|
||||
local option=""
|
||||
option=$(dialog --cancel-label "Back" --menu "$title" 15 40 4 \
|
||||
option=$(dialog --cancel-label "Back" --menu "$title" 16 40 4 \
|
||||
1 "Turn Wi-Fi on/off" \
|
||||
2 "View Wi-Fi settings" \
|
||||
3 "Change Wi-Fi settings" \
|
||||
|
|
@ -76,6 +76,7 @@ networking_settings() {
|
|||
5 "Restart networking" \
|
||||
6 "Set hostname" \
|
||||
7 "Test internet connection" \
|
||||
"" "" \
|
||||
8 "Back to Main Menu" 3>&1 1>&2 2>&3)
|
||||
|
||||
exit_status=$? # This line checks the exit status of the dialog command
|
||||
|
|
@ -99,7 +100,6 @@ networking_settings() {
|
|||
case $choice in
|
||||
1) femto-network-config.sh -x "up" && break ;;
|
||||
2) femto-network-config.sh -x "down" && break ;;
|
||||
*) dialog --msgbox "Invalid choice, please try again." 8 40 ;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
|
@ -148,6 +148,7 @@ femto_pinouts() {
|
|||
2 "Femtofox Zero" \
|
||||
3 "Femtofox Tiny" \
|
||||
4 "Luckfox Pico Mini" \
|
||||
"" "" \
|
||||
5 "Back to Help Menu" 3>&1 1>&2 2>&3)
|
||||
|
||||
exit_status=$? # This line checks the exit status of the dialog command
|
||||
|
|
@ -162,7 +163,6 @@ femto_pinouts() {
|
|||
3) dialog --title "Femtofox Tiny" --msgbox "$(femto-pinout.sh -t)" 38 70 ;;
|
||||
4) dialog --title "Luckfox Pico Mini" --msgbox "$(femto-pinout.sh -l)" 23 63 ;;
|
||||
5) return ;;
|
||||
*) echo "Invalid option selected!" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
|
@ -177,6 +177,7 @@ misc_settings() {
|
|||
2 "Ham radio support" \
|
||||
3 "Re-run first-boot script" \
|
||||
4 "Run OEM luckfox-config" \
|
||||
"" "" \
|
||||
5 "Back to Main Menu" 3>&1 1>&2 2>&3)
|
||||
|
||||
exit_status=$? # This line checks the exit status of the dialog command
|
||||
|
|
@ -258,7 +259,8 @@ set_lora_radio() {
|
|||
9 "sx1262_xtal" \
|
||||
10 "lr1121_tcxo" \
|
||||
11 "none (simulated radio)" \
|
||||
12 "Skip radio selection" 3>&1 1>&2 2>&3)
|
||||
"" "" \
|
||||
12 "Skip" 3>&1 1>&2 2>&3)
|
||||
|
||||
exit_status=$? # This line checks the exit status of the dialog command
|
||||
if [ $exit_status -ne 0 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog
|
||||
|
|
@ -316,7 +318,7 @@ meshtasticd_settings() {
|
|||
local title="Meshtasticd Settings"
|
||||
while true; do
|
||||
local option=""
|
||||
option=$(dialog --cancel-label "Back" --menu "$title" 22 50 4 \
|
||||
option=$(dialog --cancel-label "Back" --menu "$title" 23 50 4 \
|
||||
1 "View current configuration URL & QR code" \
|
||||
2 "Set new configuration URL" \
|
||||
3 "View current lora radio selection" \
|
||||
|
|
@ -331,6 +333,7 @@ meshtasticd_settings() {
|
|||
12 "Stop Meshtasticd service" \
|
||||
13 "Upgrade/install Meshtasticd" \
|
||||
14 "Uninstall Meshtasticd" \
|
||||
"" "" \
|
||||
15 "Back to Main Menu" 3>&1 1>&2 2>&3)
|
||||
|
||||
exit_status=$? # This line checks the exit status of the dialog command
|
||||
|
|
@ -392,6 +395,7 @@ meshtasticd_settings() {
|
|||
fi
|
||||
;;
|
||||
10) #check meshtasticd service status)
|
||||
echo "Getting Meshtasticd service status..."
|
||||
dialog --title "Meshtasticd service status" --msgbox "$(systemctl status meshtasticd)" 0 0
|
||||
;;
|
||||
11) #start/restart meshtasticd)
|
||||
|
|
@ -465,6 +469,7 @@ software_settings() {
|
|||
;;
|
||||
2) #Install TC2BBS)
|
||||
echo "coming soon"
|
||||
pause
|
||||
;;
|
||||
3)
|
||||
return
|
||||
|
|
@ -478,7 +483,7 @@ help_menu() {
|
|||
while true; do
|
||||
local title="Help / About"
|
||||
local option=""
|
||||
option=$(dialog --cancel-label "Back" --menu "$title" 0 0 6 \
|
||||
option=$(dialog --cancel-label "Back" --menu "$title" 0 0 7 \
|
||||
1 "About Femtofox" \
|
||||
2 "Display pinout" \
|
||||
3 "Femtofox licensing info - short" \
|
||||
|
|
@ -486,6 +491,7 @@ help_menu() {
|
|||
5 "Meshtastic licensing info" \
|
||||
6 "About Luckfox" \
|
||||
7 "About Ubuntu" \
|
||||
"" "" \
|
||||
8 "Back to Main Menu" 3>&1 1>&2 2>&3)
|
||||
|
||||
exit_status=$? # This line checks the exit status of the dialog command
|
||||
|
|
@ -495,7 +501,7 @@ help_menu() {
|
|||
|
||||
case $option in
|
||||
1) #About Femtofox)
|
||||
dialog --title "About Femtofox" --msgbox "$(femto-license.sh -a)" 0 0
|
||||
dialog --title "About Femtofox" --backtitle "Foxbuntu $(grep -oP 'major=\K[0-9]+' /etc/foxbuntu-release).$(grep -oP 'minor=\K[0-9]+' /etc/foxbuntu-release).$(grep -oP 'patch=\K[0-9]+' /etc/foxbuntu-release)$(grep -oP 'hotfix=\K[a-z]+' /etc/foxbuntu-release)" --msgbox "$(femto-license.sh -a)" 18 65
|
||||
;;
|
||||
2) #Display pinout)
|
||||
femto_pinouts
|
||||
|
|
@ -547,6 +553,7 @@ while true; do
|
|||
4 "Misc" \
|
||||
5 "Software" \
|
||||
6 "Help" \
|
||||
"" "" \
|
||||
7 "Exit" 3>&1 1>&2 2>&3)
|
||||
|
||||
exit_status=$? # This line checks the exit status of the dialog command
|
||||
|
|
@ -563,6 +570,5 @@ while true; do
|
|||
5) software_settings ;;
|
||||
6) help_menu ;;
|
||||
7) break ;;
|
||||
*) dialog --msgbox "Invalid choice, please try again." 8 40 ;;
|
||||
esac
|
||||
done
|
||||
|
|
@ -43,7 +43,38 @@ while getopts ":hafFmlu" opt; do
|
|||
echo -e "$help"
|
||||
;;
|
||||
a) # Option -a (about)
|
||||
echo "The Luckfox Pico Mini is a compact and power efficient Linux capable board, capable of running Ubuntu. Femtofox is an expansion of the Luckfox's capabilities, combining a customized Ubuntu image with a custom PCB, integrating it with a LoRa radio to create a power efficient, cheap and small Meshtastic Linux node."
|
||||
echo "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.\n\
|
||||
\n\
|
||||
The Luckfox Pico Mini is the postage stamp sized heart of the Femtofox - a compact and power efficient Linux board, running a 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.\n\
|
||||
\n\
|
||||
https://www.femtofox.com\n\
|
||||
\n\
|
||||
.=*#%@@@%%@@%%#+:. \n\
|
||||
.:+%%*-. .:=#@#-. \n\
|
||||
.#@*. .-@@- \n\
|
||||
.-%#-:: .=*%-. .+%+. \n\
|
||||
:##:+@@@@@+:. ..-#@@@@@*. .+@=. \n\
|
||||
.+@-.=@@@@@@@@@= .=@@@@@@#:%%: .#%. \n\
|
||||
.##. :@#..-*@@@@@%+++*#@@@@@+. :@-#@*-. .+%- \n\
|
||||
.%#. .*@=. .-@@@@@@@@@@@%- .#-*@@@@*..-@: \n\
|
||||
.*%. .%%: :#@@@@@@@@@@@@@@#:. .+=*@@@@@@+.+@: \n\
|
||||
:%: .%+ :#@@@@@@@@@@@@@@@%*=: ==#@@@@@@@%:##.\n\
|
||||
**. .#. ....=@@@@@@@@@@=.. --@@@@@@@@@@.%-\n\
|
||||
%=. -+- .-@@@@@@*. .+@@@@@@@@@@@*#\n\
|
||||
@- .#@#. ... .#@@@- ... *@@@@@@@@@@%#\n\
|
||||
@- :%@= .-%@@@#- .%@+. .+%@@@#: :@@@@@@@@@@%:\n\
|
||||
%=..=@*. .*@@@@#: -%. :@@@@@=. .%@@@@@@@@@@@:\n\
|
||||
*+.+.:%- .+@@# : .%@%- -%@@@@@@@@@@@@-\n\
|
||||
:=.+#..*#. .-% -#. :#@@@@@@@@@@@@@%:\n\
|
||||
.:.:%@*..*#:. .+%@%=+-. ..=%@@@@@@@@@@@@@@@#.\n\
|
||||
.:@@@%=.:+%*-.:@@@@@@*. .=%@@@@@@@@@@@@@@@@@@- \n\
|
||||
.+@@@@@#=-:.. :=++=+#@@@@@@@@@@@@@@@@@@@@@- \n\
|
||||
:. -%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- \n\
|
||||
.-%*-. ..:=+#%@@@@@@@@@@@@@@@@@@@@@@@@@@@*. \n\
|
||||
.+%#%@@%%###%@@@@@@@@@@@@@@@@@@@@@@@@#:. \n\
|
||||
.:##-#@@@@@@@@@@@@@@@@@@@@@@@@@@@=. \n\
|
||||
:=*+--=+*######**#@@@@@@@*-. \n\
|
||||
.:+%#****#@@@%%#*-. "
|
||||
;;
|
||||
f) # Option -f (Femtofox short-form license)
|
||||
echo "$femtofox_short_license"
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ while getopts ":hgkl:q:va:cedo:struxm" opt; do
|
|||
g) # Option -g (get config URL)
|
||||
echo "Getting current Meshtastic QR code and URL..."
|
||||
url=$(meshtastic --host --qr-all | grep -oP '(?<=Complete URL \(includes all channels\): )https://[^ ]+')
|
||||
clear
|
||||
echo "$url" | qrencode -o - -t UTF8 -s 1
|
||||
echo "Meshtastic configuration URL:"
|
||||
echo $url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue