mirror of
https://github.com/femtofox/femtofox.git
synced 2026-10-26 02:49:05 -04:00
commit
a049938134
7 changed files with 29 additions and 24 deletions
|
|
@ -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.
|
||||
<!--stackedit_data:
|
||||
eyJoaXN0b3J5IjpbMTAyOTUxODA1MywtODA3NjYxMjY1XX0=
|
||||
-->
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -27,14 +27,14 @@ 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"
|
||||
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<service-group>
|
||||
<name>Meshtastic</name>
|
||||
<service protocol="ipv4">
|
||||
<type>_http._tcp</type>
|
||||
<port>80</port>
|
||||
<type>_meshtastic._tcp</type>
|
||||
<port>4403</port>
|
||||
</service>
|
||||
</service-group>
|
||||
|
|
@ -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 (Meshtastic client)" \
|
||||
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" ;;
|
||||
|
|
@ -150,4 +150,4 @@ exit 0
|
|||
# 5 "GPS and Telemetry" \
|
||||
|
||||
# 4) mosquitto ;;
|
||||
# 5) gpsd ;;
|
||||
# 5) gpsd ;;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
<!--stackedit_data:
|
||||
eyJoaXN0b3J5IjpbMTM3NzgzMjcyNF19
|
||||
-->
|
||||
Loading…
Add table
Add a link
Reference in a new issue