Merge pull request #128 from noon92/new-working

preliminary meshing around installer support and updated pinouts
This commit is contained in:
noon92 2025-01-03 22:31:06 +02:00 • committed by GitHub
commit 75b86e5a2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 93 additions and 48 deletions

View file

@ -37,7 +37,7 @@ wifi_config() {
# Function to handle Wi-Fi settings
networking_settings() {
local title="Networking"
local title2="Wi-Fi Settings"
local title2="Wi-Fi (wlan0) Settings"
wpa_supplicant_conf="/etc/wpa_supplicant/wpa_supplicant.conf"
while true; do
local option=""
@ -58,7 +58,7 @@ networking_settings() {
case $option in
1)
echo "Getting Wi-Fi configuration..."
dialog --msgbox "$(femto-network-config.sh -w)" 0 0
dialog --title "$title2" --msgbox "$(femto-network-config.sh -w)" 0 0
;;
2)
wifi_config
@ -349,7 +349,7 @@ meshtasticd_settings() {
fi
;;
10) #check meshtasticd service status)
dialog --msgbox "$(systemctl status meshtasticd)" 0 0
dialog --title "Meshtasticd service status" --msgbox "$(systemctl status meshtasticd)" 0 0
;;
11) #start/restart meshtasticd)
dialog --title "$title" --yesno "Start/restart Meshtasticd service?" 0 0
@ -386,6 +386,49 @@ meshtasticd_settings() {
done
}
#Software menu
software_settings() {
while true; do
local title="Software"
local option=""
option=$(dialog --menu "$title" 0 0 6 \
1 "Meshing Around by Spudgudman" \
2 "The Comms Channel BBS (TC2BBS)" \
"" ""\
3 "Back to Main Menu" 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
break
fi
case $option in
1) #About Femtofox)
dialog --title "$software" --yesno "Meshing Around is a feature-rich bot is designed to enhance your Meshtastic network experience with a variety of powerful tools and fun features, connectivity and utility through text-based message delivery. Whether you're looking to perform network tests, send messages, or even play games, mesh_bot.py has you covered.\nInstallation requires internet connection.\n\nLearn more at https://github.com/SpudGunMan/meshing-around\n\nInstall?" 0 0
if [ $? -eq 0 ]; then #unless cancel/no
if git clone https://github.com/spudgunman/meshing-around /opt/meshing-around; then
/opt/meshing-around/install.sh #install script
dialog --title "$software" --cancel-label "Skip" --yesno "Installation complete!\n\nAdd Meshing Around as a system service?\nSystem services are run automatically on boot, and relaunched if they crash." 0 0
if [ $? -eq 0 ]; then #unless cancel/no
echo "this is where we'd put the service stuff."
pause
fi
dialog --title "$software" --msgbox "\nInstallation complete.\n\nRun \`sudo nano /opt/meshing-around/config.ini\` to configure, then relaunch the service with" 10 60
else
dialog --title "$software" --msgbox "\nCloning of Meshing Around git repo failed.\nCheck internet connectivity." 10 60
fi
fi
;;
2) #Display pinout)
femto_pinouts
;;
3)
return
;;
esac
done
}
#Help menu
help_menu() {
while true; do
@ -407,27 +450,28 @@ help_menu() {
fi
case $option in
1)
dialog --msgbox "$(femto-license.sh -a)" 0 0
1) #About Femtofox)
dialog --title "About Femtofox" --msgbox "$(femto-license.sh -a)" 0 0
;;
2)
2) #Display pinout)
femto_pinouts
;;
3)
dialog --msgbox "$(femto-license.sh -f)" 28 60
3) #Femtofox licensing info - short)
dialog --title "Femtofox license" --msgbox "$(femto-license.sh -f)" 28 60
;;
4)
4) #Femtofox licensing info - long)
clear
femto-license.sh -F
pause
;;
5)
dialog --msgbox "$(femto-license.sh -m)" 0 0
5) #Meshtastic licensing info)
dialog --title "Meshtastic license" --msgbox "$(femto-license.sh -m)" 0 0
;;
6)
dialog --msgbox "$(femto-license.sh -l)" 0 0
6) #About Luckfox)
dialog --title "About Luckfox" --msgbox "$(femto-license.sh -l)" 0 0
;;
7)
dialog --msgbox "$(femto-license.sh -u)" 0 0
7) #About Ubuntu)
dialog --title "About Ubuntu" --msgbox "$(femto-license.sh -u)" 0 0
;;
8)
return

View file

@ -36,10 +36,10 @@ fi
# - + D - +"
luckfox="\
───────────────── \n\
┌────┬───────┬────┐ \n\
VBUS 5V ●│● │ USB-C │ ●│● 1V8 OUT \n\
GND ●│● │ │ ●│● GND \n\
3V3 IN/OUT ●│● ─────── ●│● 145 (1.8V) \n\
3V3 IN/OUT ●│● └───────┘ ●│● 145 (1.8V) \n\
UART2-TX DEBUG, 42 ●│● ●│● 144 (1.8V) \n\
UART2-RX DEBUG, 43 ●│● [BTN] ●│● 4 \n\
CS0, 48 ●│● ●│● 55, IRQ \n\
@ -48,7 +48,7 @@ UART2-RX DEBUG, 43 ●│● [BTN] ●│● 4 \n\
MISO, 51 ●│● ●│● 58, I2C SDA \n\
UART4-RX, 52 ●│● ●│● 57, NRST, UART3-RX \n\
UART4-TX, 53 ●│● ETH ●│● 56, RXEN, UART3-TX \n\
──●──●──●──●──●── \n\
└──●──●──●──●──●──┘ \n\
R R G T T \n\
X X N X X \n\
- + D - + \n\
@ -57,29 +57,29 @@ GPIO BANK 1 (3.3v): 42 43 48 49 50 51 52 53 54 55 56 57 58 59\n\
GPIO BANK 4 (1.8v): 144 145 "
femtofox="\
──────────────────────────────────────────────────────────────── \n\
│()⦂︎KILL ●│● USB-C ●│● PWR-IN |+ -| 3.3-5V ()│\n\
│─────── ●│● ●│● ─── │\n\
│ USB-C │ ●│● ●│● ───────────────────────────── │\n\
│ POWER │ ●│● LUCKFOX ●│● │ _____________ │ │\n\
│─────── ●│● PICO MINI ●│● │ │ │ │ │\n\
│─── ●│● ●│● │ E │ │ │ │\n\
┌──────────┬────┬─────┬────┬─────────────────┬───┬───────────────┐\n\
│⚪⦂︎KILL ●│● │USB-C│ ●│● PWR-IN │✚ ▬│ 3.3-5V ⚪│\n\
├───────┐ ●│● └─────┘ ●│● └───┘ │\n\
│ USB-C │ ●│● ●│● ┌─────────────────────────────┐ │\n\
│ POWER │ ●│● LUCKFOX ●│● │ ┌─────────────┐ │ │\n\
├───────┘ ●│● PICO MINI ●│● │ │ │ │ │\n\
├───┐ ●│● ●│● │ E │ │ │ │\n\
│ ● │GND ●│● FOXHOLE ●│● │ 2 │ │ │ │\n\
│ ● │3V3 ●│● ●│● │ 2 │ E22 900M22S │ │ │\n\
│ ● │3V3 ●│● ●│● │ 2 │ E22-900M22S │ │ │\n\
│ ● │TX4 ●│● ●│● │ | │ │ │ │\n\
│ ● │RX4 ●│● ●│● │ 9 │ │ │ │\n\
│─── ●│● ●│● │ 0 │_____________│ │ │\n\
│() ───●─●─●─●─●─── │ 0 ___________ │ │\n\
│────────────────── │ M │ │ │ │\n\
├───┘ ●│● ●│● │ 0 └─────────────┘ │ │\n\
│⚪ └───●─●─●─●─●───┘ │ 0 ┌───────────┐ │ │\n\
├──────────────────┐ │ M │ │ │ │\n\
│ ● RX- │ I2C GROVE │ 3 │ SEEED │ │ │\n\
│ ● RX+ │ ─────── │ 0 │WIO SX1262│ │ │\n\
│ ● RX+ │ ┌───────┐ │ 0 │WIO SX1262│ │ │\n\
│ ● GND ETHERNET │ │● ● ● ●│ │ S │ │ │ │\n\
│ ● TX- │ │───────│ │ │___________│ │ │\n\
│ ● TX- │ ├───────┤ │ └───────────┘ │ │\n\
│ ● TX+ │ │● ● ● ●│ │ │ │\n\
│────────────────── ─────── ───────────────────────────── │\n\
├──────────────────┘ └───────┘ └─────────────────────────────┘ │\n\
│ ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● │\n\
│() ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ()│\n\
──────────────────────────────────────────────────────────────── \n\
│⚪ ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ⚪│\n\
└────────────────────────────────────────────────────────────────┘\n\
\n\
R M M \n\
G X G C O I 3 G S S 3 \n\
@ -91,17 +91,18 @@ femtofox="\
S U R N N N N S X X N V V \n\
0 S Q D D D D T 4 4 D \n\
Y \n\
ꙩ︎ pins available on Femtofox Pro. Unused on Femtofox basic model. \n\
ꙩ︎ pins available on Femtofox Pro. Unused on Femtofox community. \n\
KILL pins available on Femtofox Pro only. Add power switch or \n\
thermal fuse/cutoff here and remove resistor. "
┌ ┐
└ ┘
femtofox_zero="\
_____ _____ \n\
│() \ / ()│ \n\
┌────┐ ┌────┐ \n\
│⚪ \ / ⚪│ \n\
│ \ / │ \n\
│ ───────── │ \n\
│ ───────────────── │ \n\
│ └─────────┘ │ \n\
│ ┌─────────────────┐ │ \n\
│ ●│● USB-C ●│● │ \n\
│ ●│● ●│● │ \n\
│ ●│● ●│● │ \n\
@ -113,17 +114,17 @@ femtofox_zero="\
│ ●│● ●│● │ \n\
│ ●│● ●│● │ \n\
│ ●│● ●│● │ \n\
│ ────●─●─●─●─●──── │ \n\
│─── ───────────── ───│ \n\
│ └────●─●─●─●─●────┘ │ \n\
├───┐ ┌─────────────┐ ┌───┤ \n\
GND │ ● │ │ HT-RA62 │ │ ● │ GND \n\
3V3 │ ● │ │ _______ │ │ ● │ 3V3 \n\
3V3 │ ● │ │ ┌───────┐ │ │ ● │ 3V3 \n\
UART4-RX │ ● │ │ │ │ │ │ ● │ I2C SDA \n\
UART4-TX │ ● │ │ │ WIO │ │ │ ● │ I2C SCL \n\
│─── │ │SX 1262│ │ ───│ \n\
│ │ │_______│ │ ● │ UNUSED \n\
│ ───────────── ● │ GND \n\
│() ETH ()│ \n\
────────●─●─●─●─●──────── \n\
├───┘ │ │SX 1262│ │ └───┤ \n\
│ │ └───────┘ │ ● │ UNUSED \n\
│ └─────────────┘ ● │ GND \n\
│⚪ ETH ⚪│ \n\
└────────●─●─●─●─●────────┘ \n\
R R G T T \n\
X X N X X \n\
- + D - + \n"