diff --git a/assets/femtofox-config.txt b/assets/femtofox-config.txt index 22d3ca1..01e4d3c 100644 --- a/assets/femtofox-config.txt +++ b/assets/femtofox-config.txt @@ -21,6 +21,11 @@ ### Meshtastic settings +## 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 (https://meshtastic.org/docs/software/python/cli/) for more information. +#meshtastic_cli="--set lora.modem_preset LONG_FAST" +#meshtastic_cli="--set device.role CLIENT" + ## Radio module to use. Options are: ## "ebyte-e22-900m30s" ## "ebyte-e22-900m22s" diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-meshtasticd-config.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-meshtasticd-config.sh index d9c2fec..1e9c80e 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-meshtasticd-config.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-meshtasticd-config.sh @@ -47,9 +47,9 @@ meshtastic_update() { echo "${ref:+$ref}meshtastic --host $command" echo "Submitting to Meshtastic..." for retries in $(seq 1 $attempts); do - output=$(meshtastic --host --info | tee /dev/fd/2) + output=$(eval meshtastic --host $command 2>&1 | tee /dev/fd/2) # display the output on screen live. Use eval so quotes will be handled correctly in $command logger "$output" - if echo "$output" | grep -qiE "Abort|invalid|Error|refused|Errno|failed|Failed"; then + if echo "$output" | grep -qiE "Abort|invalid|Error|error|unrecognized|refused|Errno|failed|Failed"; then if [ "$retries" -lt $attempts ]; then local msg="${ref:+$ref}Meshtastic command failed, retrying ($(($retries + 1))/$attempts)..." echo "$msg"