Receiving duplicated ack on single wfb tx with single wfb rx #449
Unanswered
Craftech001
asked this question in
Questions
Replies: 1 comment
|
Do you use multiple drone with single gs simultaneously? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, i am brand new user of WFB-ng. I want to use WFb-ng to build a tri-drone managing system. I use this script to open up the wfb service on ground
#!/usr/bin/env bash
set -euo pipefail
echo "[GS] stop wfb"
sudo systemctl stop wifibroadcast@gs.service 2>/dev/null || true
echo "[GS] kill leftover wfb processes"
sudo pkill -9 -f 'wfb_(rx|tx)|wfb-server|wifibroadcast' || true
sleep 2
echo "[GS] start wfb-ng (gs profile)"
sudo systemctl reset-failed wifibroadcast@gs.service 2>/dev/null || true
sudo systemctl start wifibroadcast@gs.service
echo "[GS] quick status"
sudo systemctl --no-pager --full status wifibroadcast@gs.service | sed -n '1,25p' || true
echo "[GS] tail logs (mavlink lines)"
sudo journalctl -u wifibroadcast@gs -n 80 --no-pager | egrep -i 'mavlink|14550|wfb_(rx|tx)|key|session|decrypt|listen|udp' || true
echo
And the following wifibraodcast.cfg
[common]
wifi_channel = 165
wifi_region = 'BO'
[gs_mavlink]
peer = 'connect://127.0.0.1:14550'
Howeve, when I send a long command using python I obtain ack twice with two seq in message header.
from pymavlink import mavutil
import time
m = mavutil.mavlink_connection("udpin:127.0.0.1:14550", dialect="common")
hb = m.wait_heartbeat(timeout=10)
print("HB:", hb)
tx = mavutil.mavlink_connection("udpout:127.0.0.1:14551", dialect="common")
tx.mav.srcSystem = 255
tx.mav.srcComponent = 190
print("Send ARM...")
tx.mav.command_long_send(
m.target_system, 1,
mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM,
0, 1,0,0,0,0,0,0
)
t0 = time.time()
acks = []
while time.time() - t0 < 5:
msg = m.recv_match(type="COMMAND_ACK", blocking=True, timeout=1)
if not msg:
continue
h = msg.get_header()
print(f"ACK: seq={h.seq} from {h.srcSystem}:{h.srcComponent} cmd={msg.command} result={msg.result}")
acks.append(h.seq)
print("ACK count:", len(acks), "seqs:", acks)
may any one help me to point out some issues.

Thanks!
All reactions