Table of Contents
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Intro
It is easy to configure many basic Femtofox settings by simply inserting a USB flash drive containing a configuration file into the USB-C port of the Luckfox using an OTG adapter. On boot, the system will automatically recognize, mount and implement the settings you specify. The tool can also be re-run using the Utilities menu in the femto-config tool via the command line.
Configurable settings are:
- Wifi SSID
- Wifi PSK (password)
- Wifi country
- Timezone
- Activity LED (blinky light - disable for minor power savings)
- Meshtastic:
- CLI commands
- LoRa radio model
- Region, preset, channels via URL
- Security: Add Admin Key(s)
- Security: Clear Admin Key List
- Security: Legacy Admin Channel enable/disable
- Enable/disable Meshtastic i2c support
Instructions
The USB drive must be formatted with a single FAT32, exFAT, NTFS (read only - log will not be saved to drive) or ext4 partition. Add a file named femtofox-config.txt and whichever settings you would like to change.
Note
Many settings are CaSe sEnSiTiVe.
The USB configuration tool also blinks boot codes with the USER LED, which can help diagnose issues. Visit the Boot Codes page for more information.
Get an example USB configuration file here
wifi_ssid="Your SSID name"
wifi_psk="wifipassword"
wifi_country="US"
timezone="America/New_York"
meshtastic_cli="--set lora.modem_preset LONG_FAST"
meshtastic_lora_radio="ebyte-e22-900m30s"
meshtastic_url="https://meshtastic.org/e/#CgMSAQESCAgBOAFAA0gB"
meshtastic_admin_key="T/b8EGvi/Nqi6GyGefJt/jOQr+5uWHHZuBavkNcUwWQ="
meshtastic_legacy_admin="true"
software_install="packageA,packageB"
meshtastic_i2c="disable"
dont_run_if_log_exists="true"
Enter as many or as few settings as you like.
Wifi
For wifi_country, insert your country's ISO/IEC alpha2 two letter country code (such as US, GB, DE, IN, etc.) in capital letters.
Timezone
Use a timezone as it appears in the tz database.
Meshtastic
Multiple meshtastic_cli lines can be added. This is important, as the Meshtastic CLI requires that different settings categories (such as device and lora) be handled in separate commands. See Meshtastic CLI docs for more information.
For meshtastic_lora_radio, choose your radio from the supported hardware list.
Options are:
ebyte-e22-900m30sebyte-e22-900m22sebyte-e80-900m22s(experimental)heltec-ht-ra62seeed-wio-sx1262waveshare-sx126x-xxxmai-thinker-ra-01shsx1262_tcxo(for Ebyte E22-900M30SM, Ebyte E22-900M22S, Heltec HT-RA62, Seeed Wio SX1262)sx1262_xtal(for AiThinker RA01SH, and Waveshare Pi hat)lr1121_tcxo(experimental, for Ebyte E80-900M2213S)none(for simulated radio)
Clearing the meshtastic_admin_key list: The admin key list can contain up to three keys - if more are added they will be ignored. The USB configuration tool supports clearing the admin key list, after which you will need to re-add your admin key/s in a second operation. To clear the admin key list, enter meshtastic_admin_key="clear".
Software to install
Software package names are filenames (without .sh suffix) in /usr/local/bin/packages. Multiple packages can be installed by separating them with commas.
Note
Some software (such as Samba) normally requires user interaction to complete. In this case, a message will display on serial console and in the USB config log warning that you will need to run the "initialization" option in the software menu for that package. Internet connectivity is required for software installation.
Options for software to install include:
- Contact Client for Meshtastic (package name:
contact_client) - Meshing Around BBS (package name:
meshing_around) - Mosquitto MQTT Broker (package name:
mosquitto_mqtt_broker) - Mosquitto MQTT Client (package name:
mosquitto_mqtt_client) - The Comms Channel BBS (TC²-BBS) (package name:
tc2_bbs) - Samba file sharing server - installed by default but disabled (package name:
samba) - ttyd Web Terminal - installed by default (package name:
ttyd)
Note
dont_run_if_log_exists="true"will prevent the USB configuration tool from working if there's a log present on the USB drive, indicating it has already been run. There is also an LED boot code for this, described in Boot codes.
To apply your configuration, reboot the Femtofox with the USB drive plugged in. No other USB drives can be plugged in at the same time.
A log (femtofox-config.log) is saved to /home/femto and the USB drive (except on NTFS, which is read only).