From 0d9f92a41526f79a6576b1e51609c72bce69d49a Mon Sep 17 00:00:00 2001 From: noon92 <40807970+noon92@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:33:53 +0200 Subject: [PATCH 1/9] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a33c4b..4a61dd0 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The Luckfox Pico Mini is the postage stamp sized heart of the Femtofox - a compa - [x] USB mass storage - [x] Real time clock (RTC) support (see [supported hardware](supported_hardware.md)) - [x] Activity LED disabled. User LED will blink for 5 seconds when boot is complete -- [x] Pressing the "BOOT" button triggers reboot +- [x] Short pressing the "BOOT" button toggles wifi, 2-5 second press triggers reboot, 5+ second press shuts system down - [x] Ability to reconfigure wifi via USB flash drive - [x] Meshtasticd to run LoRa radio over SPI (accomplished, updated image and instructions coming soon) - [x] Allow editing of config files by plugging in thumb drive @@ -79,4 +79,4 @@ In Meshtasticd's config.yaml we use GPIO bank 1, and subtract 32 from the pin nu > Meshtastic® is a registered trademark of Meshtastic LLC. Meshtastic software components are released under various licenses, see GitHub for details. No warranty is provided - use at your own risk. \ No newline at end of file +--> From 8cb161744c2b87376d2ea7046d24c78138d24b9d Mon Sep 17 00:00:00 2001 From: nagumii Date: Mon, 13 Jan 2025 20:16:28 +0200 Subject: [PATCH 2/9] Improve pinout --- .../usr/local/bin/femto-pinout.sh | 135 ++++++++---------- 1 file changed, 59 insertions(+), 76 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-pinout.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-pinout.sh index ca8455a..05fcadb 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-pinout.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-pinout.sh @@ -16,84 +16,47 @@ if [ $# -eq 0 ]; then exit 1 fi -# luckfox="\ -# |Pin #|Pin ID |Function | Luckfox |Pin #|Pin ID |Function |\n\ -# |-----|-------|--------------|---------|-----|-------|--------------|\n\ -# |1 |VBus |5V in/out | USB |22 |1V8 |1.8V out |\n\ -# |2 |GND | | |21 |GND | |\n\ -# |3 |3V3 |3.3V out | |20 |4C1 |1v8 IO, SARADC|\n\ -# |4/42 |1B2 |Debug UART2-TX| |19 |4C0 |1v8 IO, SARADC|\n\ -# |5/43 |1B3 |Debug UART2-RX| [b] |18/4 |0A4 |3v3 IO |\n\ -# |6/48 |1C0 |CS0, IO | |17/55|1C7 |IRQ, IO |\n\ -# |7/49 |1C1 |CLK, IO | |16/54|1C6 |BUSY, IO |\n\ -# |8/50 |1C2 |MOSI, IO | |15/59|1D3 |i2c SCL |\n\ -# |9/51 |1C3 |MISO, IO | |14/58|1D2 |i2c SDA |\n\ -# |10/52|1C4 |UART4-TX | |13/57|1D1 |UART3-RX, NRST|\n\ -# |11/53|1C5 |UART4-RX | ETH |12/56|1D0 |UART3-TX, RXEN|\n\ -# |-----|-------|--------------|---------|-----|-------|--------------|\n\ -# R R G T T\n\ -# X X N X X\n\ -# - + D - +" - -luckfox="\ - ┌────┬───────┬────┐ \n\ - VBUS 3.3-5V ●│● │ USB-C │ ●│● 1V8 OUT \n\ - GND ●│● │ │ ●│● GND \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\ - CLK, 49 ●│● ●│● 54, BUSY \n\ - MOSI, 50 ●│● ●│● 59, I2C SCL \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\ - R R G T T \n\ - X X N X X \n\ - - + D - + \n\ -GPIO BANK 0 (3.3v): 4 \n\ -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\ -│ ● │GND ●│● FOXHOLE ●│● │ 2 │ │ │ │\n\ -│ ● │3V3 ●│● ●│● │ 2 │ E22-900M22S │ │ │\n\ -│ ● │TX4 ●│● ●│● │ | │ │ │ │\n\ -│ ● │RX4 ●│● ●│● │ 9 │ │ │ │\n\ -├───┘ ●│● ●│● │ 0 └─────────────┘ │ │\n\ -│⚪ └───●─●─●─●─●───┘ │ 0 ┌───────────┐ │ │\n\ -├──────────────────┐ │ M │ │ │ │\n\ -│ ● RX- │ I2C GROVE │ 3 │ SEEED │ │ │\n\ -│ ● RX+ │ ┌───────┐ │ 0 │WIO SX1262│ │ │\n\ -│ ● GND ETHERNET │ │● ● ● ●│ │ S │ │ │ │\n\ -│ ● TX- │ ├───────┤ │ └───────────┘ │ │\n\ -│ ● TX+ │ │● ● ● ●│ │ │ │\n\ -├──────────────────┘ └───────┘ └─────────────────────────────┘ │\n\ -│ ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● │\n\ -│⚪ ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ⚪│\n\ -└────────────────────────────────────────────────────────────────┘\n\ - \n\ - R M M \n\ - G X G C O I 3 G S S 3 \n\ - N E N L S S V N C D V \n\ - D N D K I O 3 D L A 3 \n\ - ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● \n\ - ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● \n\ - C B I G G G G R R T G 5 5 \n\ - 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 community. \n\ - KILL pins available on Femtofox Pro only. Add power switch or \n\ - thermal fuse/cutoff here and remove resistor. " +┌──────────┬────┬─────┬────┬───────────────┬───┬───────────────┐\n\ +│⚪:⛊KILL ●│● │USB-C│ ●│● PWR-IN │✚ ▬│ 3.3-5V ⚪│\n\ +├───────┐ ●│● └─────┘ ●│● └───┘ │\n\ +│ USB-C │ ●│● ●│● ┌─────────────────────────────┐ │\n\ +│ PWR ⛊ │ ●│● LUCKFOX ●│● │ ┌─────────────┐ │ │\n\ +│ DEBUG │ ●│● PICO MINI ●│● │ │ │ │ │\n\ +├───────┘ ●│● ●│● │ │ │ │ │\n\ +├───┐ ●│● FOXHOLE ●│● │ E │ │ │ │\n\ +│ ● │GND ●│● ●│● │ 2 │ E22-900M22S │ │ │\n\ +│ ● │3V3 ●│● ●│● │ 2 │ │ │ │\n\ +│ ● │TX4 ●│● ●│● │ | │ │ │ │\n\ +│ ● │RX4 ●│● ●│● │ 9 │ │ │ │\n\ +├───┘ └───●─●─●─●─●───┘ │ 0 └─────────────┘ │ │\n\ +│⚪ │ 0 ┌───────────┐ │ │\n\ +├──────────────────┐ │ M │ │ │ │\n\ +│ ● RX- │ I2C GROVE │ 3 │ SEEED │ │ │\n\ +│ ● RX+ │ ┌───────┐ │ 0 │WIO SX1262│ │ │\n\ +│ ● GND ETHERNET │ │● ● ● ●│ │ S │ │ │ │\n\ +│ ● TX- │ ├───────┤ │ └───────────┘ │ │\n\ +│ ● TX+ │ │● ● ● ●│ │ │ │\n\ +├──────────────────┘ └───────┘ └─────────────────────────────┘ │\n\ +│ ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ■ │\n\ +│⚪● ● ● ● ● ● ⛊ ⛊ ⛊ ● ⛊ ⛊ ● ● ● ● ● ● ● ●⚪│\n\ +└──────────────────────────────────────────────────────────────┘\n\ + \n\ + R M M \n\ + G X G C I O 3 G S S 3 \n\ + N E N L S S V N C D V \n\ + D N D K O I 3 D L A 3 \n\ + ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ■ \n\ + ● ● ● ● ● ● ⛊ ⛊ ⛊ ● ● ⛊ ⛊ ● ● ● ● ● ● ● \n\ + C B I G G G G S S G R T G R R T G 5 5 \n\ + S U R N P N P R R N X X N S X X N V V \n\ + 0 S Q D I D I A A D 2 2 D T 4 4 D \n\ + Y O O 1 0 \n\ +⛊ Denotes Pro features: \n\ +On Community Edition, PWR/DEBUG USB-C replaced by 4pin UART2. \n\ +PWR/DEBUG USB-C also carries serial with no added adapter. \n\ +KILL: add PWR switch or thermal cutoff/fuse & remove resistor. " femtofox_zero="\ ┌────┐ ┌────┐ \n\ @@ -129,6 +92,26 @@ UART4-TX │ ● │ │ │ WIO │ │ │ ● │ I2C SCL \n\ femtofox_tiny="coming soon" +luckfox="\ + ┌────┬───────┬────┐ \n\ + VBUS 3.3-5V ●│● │ USB-C │ ●│● 1V8 OUT \n\ + GND ●│● │ │ ●│● GND \n\ + 3V3 IN/OUT ●│● └───────┘ ●│● 145, SARADC-IN1 1.8V\n\ +UART2-TX DEBUG, 42 ●│● ●│● 144, SARADC-IN0 1.8V\n\ +UART2-RX DEBUG, 43 ●│● [BTN] ●│● 4 \n\ + CS0, 48 ●│● ●│● 55, IRQ \n\ + CLK, 49 ●│● ●│● 54, BUSY \n\ + MOSI, 50 ●│● ●│● 59, I2C SCL \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\ + R R G T T \n\ + X X N X X \n\ + - + D - + \n\ +GPIO BANK 0 (3.3v): 4 \n\ +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 " # Parse options while getopts "hlfzt" opt; do From e898caaf5be602420f4ced7ee9b0964137bb799d Mon Sep 17 00:00:00 2001 From: Ruledo Date: Mon, 13 Jan 2025 15:04:54 -0800 Subject: [PATCH 3/9] Added luma packaged for oled. For i2C oled screens. --- environment-setup/femtofox.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-setup/femtofox.chroot b/environment-setup/femtofox.chroot index e2a3a4e..a0e612d 100644 --- a/environment-setup/femtofox.chroot +++ b/environment-setup/femtofox.chroot @@ -27,7 +27,7 @@ ln -sf /usr/share/zoneinfo/UTC /etc/localtime echo "Installing packages..." apt update -DEBIAN_FRONTEND=noninteractive apt install -y --option Dpkg::Options::="--force-confold" linux-firmware wireless-tools git python3.10-venv libgpiod-dev libyaml-cpp-dev libbluetooth-dev openssl libssl-dev libulfius-dev liborcania-dev evtest screen avahi-daemon protobuf-compiler telnet fonts-noto-color-emoji ninja-build chrony qrencode software-properties-common python-is-python3 python3.10-venv lsof spi-tools +DEBIAN_FRONTEND=noninteractive apt install -y --option Dpkg::Options::="--force-confold" linux-firmware wireless-tools git python3.10-venv libgpiod-dev libyaml-cpp-dev libbluetooth-dev openssl libssl-dev libulfius-dev liborcania-dev evtest screen avahi-daemon protobuf-compiler telnet fonts-noto-color-emoji ninja-build chrony qrencode software-properties-common python-is-python3 python3.10-venv lsof spi-tools python3-luma.oled if [[ $? -eq 2 ]]; then echo "Error, step failed..."; fi DEBIAN_FRONTEND=noninteractive apt upgrade -y --option Dpkg::Options::="--force-confold" From e5af7590db43652ef25c5a076508fa3c7fe42a68 Mon Sep 17 00:00:00 2001 From: joshbowyer <37744796+joshbowyer@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:43:55 -0600 Subject: [PATCH 4/9] Update femtofox.chroot Remove meshtastic deb after install --- environment-setup/femtofox.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-setup/femtofox.chroot b/environment-setup/femtofox.chroot index a0e612d..6168a8c 100644 --- a/environment-setup/femtofox.chroot +++ b/environment-setup/femtofox.chroot @@ -34,7 +34,7 @@ DEBIAN_FRONTEND=noninteractive apt upgrade -y --option Dpkg::Options::="--force- # Tempfix for SEGFAULT wget https://github.com/meshtastic/firmware/releases/download/v2.5.11.8e2a3e5/meshtasticd_2.5.11.8e2a3e5_armhf.deb DEBIAN_FRONTEND=noninteractive apt install -y --option Dpkg::Options::="--force-confold" ./meshtasticd_2.5.11.8e2a3e5_armhf.deb - +rm ./meshtasticd_2.5.11.8e2a3e5_armhf.deb echo "Installing dependencies for meshing-around and meshtastic cli..." #pip config set global.extra-index-url https://www.piwheels.org/simple From 567e8eb36fcb8191aba9d37ffd81fc592f3f636c Mon Sep 17 00:00:00 2001 From: Tom <116762865+Nestpebble@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:40:15 +0000 Subject: [PATCH 5/9] foxbuntu_install.md updated from https://stackedit.io/ --- foxbuntu_install.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/foxbuntu_install.md b/foxbuntu_install.md index 0807a58..a2f3d22 100644 --- a/foxbuntu_install.md +++ b/foxbuntu_install.md @@ -20,4 +20,9 @@ To install Foxbuntu, you'll need the following: 8. The Femtofox will perform its first boot. This can take up to 5 minutes (subsequent boots ~40 seconds). When boot is complete, the USR LED will blink 5 times, 1/2 a second each. At this point, Meshtastic should be running and if you plug in a wifi adapter it should work. 9. To connect to your Femtofox via SSH, open [PuTTY](https://www.putty.org/) or your favorite SSH client and connect to your Femtofox via `femtofox.local` or its IP (check your router). * Username: `femto` - * Password: `fox` + * Password: `femto` + +You will be prompted to change this on first login. + \ No newline at end of file From c31a8ac4725e20afddaaf981a2b7cc20c558c80c Mon Sep 17 00:00:00 2001 From: pdxlocations Date: Tue, 14 Jan 2025 21:36:47 -0800 Subject: [PATCH 6/9] Avahi meshtastic service 4403 --- .../etc/avahi/services/meshtasticd.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/avahi/services/meshtasticd.service b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/avahi/services/meshtasticd.service index ec56664..e0e3ece 100644 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/avahi/services/meshtasticd.service +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/avahi/services/meshtasticd.service @@ -3,7 +3,7 @@ Meshtastic - _http._tcp - 80 + _meshtastic._tcp + 4403 \ No newline at end of file From 2d94c39be998a745b17f443a0cda40054a89b72d Mon Sep 17 00:00:00 2001 From: pdxlocations Date: Tue, 14 Jan 2025 21:44:55 -0800 Subject: [PATCH 7/9] change curses client to contact --- .../usr/local/bin/femto-software.sh | 4 ++-- .../{curses_client.sh => contact_client.sh} | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) rename foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/{curses_client.sh => contact_client.sh} (83%) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh index 7c75d94..8539c96 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh @@ -121,7 +121,7 @@ title="$title" option="" option=$(dialog --cancel-label "Back" --menu "$title" 0 0 6 \ 1 "The Comms Channel BBS, TC²BBS" \ - 2 "Curses Client for Meshtastic" \ + 2 "Contact" \ 3 "Meshing Around by Spud" \ 4 "Mosquitto MQTT Broker" \ 5 "Mosquitto MQTT Client" \ @@ -135,7 +135,7 @@ title="$title" case $option in 1) package_intro "tc2_bbs" ;; - 2) package_intro "curses_client" ;; + 2) package_intro "contact_client" ;; 3) package_intro "meshing_around" ;; 4) package_intro "mosquitto_mqtt_broker" ;; 5) package_intro "mosquitto_mqtt_client" ;; diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/curses_client.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/contact_client.sh similarity index 83% rename from foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/curses_client.sh rename to foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/contact_client.sh index 137cb00..4e18dd0 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/curses_client.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/contact_client.sh @@ -44,14 +44,14 @@ EOF # Everything following `user_message: ` will be displayed prominently to the user, so it must the last thing echoed -name="Curses Client for Meshtastic" # software name +name="Contact" # software name author="pdxlocations" # software author - OPTIONAL -description="Command line client using the curses library, powered by Meshtastic.org.\nAfter install, run \`curses\` to launch." # software description - OPTIONAL (but strongly recommended!) -URL="https://github.com/pdxlocations/curses-client-for-meshtastic/" # software URL. Can contain multiple URLs - OPTIONAL +description="A Text-Based Console UI for Meshtastic Nodes.\nAfter install, run \`contact\` to launch." # software description - OPTIONAL (but strongly recommended!) +URL="https://github.com/pdxlocations/contact/" # software URL. Can contain multiple URLs - OPTIONAL options="xiuglNADUOLIto" # script options in use by software package. For example, for a package with no service, exclude `edsr` -launch="python /opt/curses-client-for-meshtastic/main.py --host" # command to launch software, if applicable +launch="python /opt/contact/main.py --host" # command to launch software, if applicable service_name="" # the name of the service/s, such as `chrony`. REQUIRED if service options are in use. If multiple services, separate by spaces "service1 service2" -location="/opt/curses-client-for-meshtastic" # install location REQUIRED if not apt installed. Generally, we use `/opt/software-name` +location="/opt/contact" # install location REQUIRED if not apt installed. Generally, we use `/opt/software-name` conflicts="" # comma delineated plain-text list of packages with which this package conflicts. Blank if none. Use the name as it appears in the $name field of the other package. Extra plaintext is allowed, such as "packageA, packageB, any other software that uses the Meshtastic CLI" @@ -64,20 +64,20 @@ fi # install script install() { - if ! git clone https://github.com/pdxlocations/curses-client-for-meshtastic.git /opt/curses-client-for-meshtastic; then + if ! git clone https://github.com/pdxlocations/contact.git /opt/contact; then echo "user_message: Git clone failed. Is internet connected?" exit 1 fi chown -R femto $location #give ownership of installation directory to $user git config --global --add safe.directory $location # prevents git error when updating - echo "Creating \`curses\` shortcut." + echo "Creating \`contact\` shortcut." echo -e "#!/bin/bash\n\ export NCURSES_NO_UTF8_ACS=1\n\ export TERM=xterm-256color\n\ export LANG=C.UTF-8\n\ -$launch" | sudo tee /usr/local/bin/curses > /dev/null - chmod +x /usr/local/bin/curses - echo "user_message: To launch, run \`curses\`." +$launch" | sudo tee /usr/local/bin/contact > /dev/null + chmod +x /usr/local/bin/contact + echo "user_message: To launch, run \`contact\`." exit 0 # should be `exit 1` if the installation failed } @@ -85,7 +85,7 @@ $launch" | sudo tee /usr/local/bin/curses > /dev/null # uninstall script uninstall() { rm -rf $location - rm /usr/local/bin/curses + rm /usr/local/bin/contact echo "user_message: All files removed." exit 0 # should be `exit 1` if the installation failed } From 23ac394d2a4df32a394763730ecbef0773ccdc2d Mon Sep 17 00:00:00 2001 From: noon92 <40807970+noon92@users.noreply.github.com> Date: Wed, 15 Jan 2025 08:33:12 +0200 Subject: [PATCH 8/9] Update femto-software.sh --- .../out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh index 8539c96..ac32818 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh @@ -121,7 +121,7 @@ title="$title" option="" option=$(dialog --cancel-label "Back" --menu "$title" 0 0 6 \ 1 "The Comms Channel BBS, TC²BBS" \ - 2 "Contact" \ + 2 "Contact (Meshtastic client)" \ 3 "Meshing Around by Spud" \ 4 "Mosquitto MQTT Broker" \ 5 "Mosquitto MQTT Client" \ @@ -150,4 +150,4 @@ exit 0 # 5 "GPS and Telemetry" \ # 4) mosquitto ;; - # 5) gpsd ;; \ No newline at end of file + # 5) gpsd ;; From bd9a6c4dc2d98fd52bbda0c2d1a327353378bf1b Mon Sep 17 00:00:00 2001 From: Ruledo Date: Thu, 16 Jan 2025 01:50:10 -0800 Subject: [PATCH 9/9] Wifi Mesh Control Interface State Changes ip link considers wifi disconnected as interface down. moved to using oper to get administrative interface state. --- .../rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh index 4757a4f..0ff79a6 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/wifi-mesh-control.sh @@ -53,7 +53,7 @@ sync_states() { log "Synced mobile Wi-Fi state to $text_state." fi - current_wlan_state=$(ip link show wlan0 | grep -q 'state UP' && echo "up" || echo "down") + current_wlan_state=$(cat /sys/class/net/wlan0/operstate) if [[ "$text_state" != "$current_wlan_state" ]]; then set_wlan_state "$text_state" log "Synced wlan0 state to $text_state." @@ -63,7 +63,7 @@ sync_states() { monitor_changes() { local previous_mobile_state previous_wlan_state previous_mobile_state=$(get_mobile_wifi_state) - previous_wlan_state=$(ip link show wlan0 | grep -q 'state UP' && echo "up" || echo "down") + previous_wlan_state=$(cat /sys/class/net/wlan0/operstate) while true; do PID=$(ps -C meshtasticd -o pid= | tr -d ' ') @@ -71,7 +71,7 @@ monitor_changes() { #if sudo lsof /dev/spidev0.0 | grep -q "meshtasticd"; then local current_mobile_state current_wlan_state current_mobile_state=$(get_mobile_wifi_state) - current_wlan_state=$(ip link show wlan0 | grep -q 'state UP' && echo "up" || echo "down") + current_wlan_state=$(cat /sys/class/net/wlan0/operstate) if [[ "$current_mobile_state" != "$previous_mobile_state" ]]; then log "Detected mobile Wi-Fi state change: $previous_mobile_state -> $current_mobile_state"