-
Notifications
You must be signed in to change notification settings - Fork 48
Multiple Clients TCP & UDP Treatment
In AP mode, MavToPass will advertise a hotspot and invite remote WiFi connections.
In STA mode, MavToPass will connect to any access point.
GCS Side:
The MavToPass translator is essentially a server. When the TCP protocol is selected, up to 5 simultaneous incoming remote client sessions may connect to receive & send Mavlink telemetry. Examples are ground control stations like QGC or Mission Planner, or possibly trackers or similar appliances.
Flight Controller Side:
With TCP/IP, a single local client outgoing session is initiated on MavToPass when Flight Controller side WiFi is selected. More than one FC side WiFi session is never needed because we only ever expect one source of Mavlink telemetry for translation.
User Datagram Protocol (UDP)
UDP is often termed a "fire and forget" protocol. Client sessions are informal. UDP is set to broadcast on the /24 segment of the nominated IP address. For example, 192.168.4./24, or all 255 IPs of the /24 segment. AP mode will issue IPs in that segment upon physical connection, and all connected devices will receive traffic. Similarly, in STA mode, all IPs in the /24 segment will receive traffic. Return traffic will be routed back to the host IP. So, in effect, multiple clients are being serviced.
If broadcast is not selected in config.h, every IP reply from the initial broadcast is entered into a table of unique client IPs, and from then on only those clients are targeted.
NOTE: It may be necessary to create in inbound UDP rule on your PC firewall.
Similarly, in UDP, a single local connection is initiated on the Flight Controller side when selected.