mirror of
https://github.com/femtofox/femtofox.git
synced 2026-10-25 18:40:20 -04:00
commit
70ce2d8eb7
2 changed files with 7 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue