-
Notifications
You must be signed in to change notification settings - Fork 62
Hello i have a pixhawk 6x connected to my raspbery pi 4 via ethernet.
How to route mavlink to the wifi connection (the raspberry is connected to a wifi routeur) ? I need to connect 2 computers (on the same wifi network than the raspbery is connected) with qground control to my pixhawk, is it possible ?
Thanks for your help
All reactions
Replies: 1 comment
Hello, you can do this by starting mavp2p with two endpoints, one for the Pixhawk through ethernet, and the other one for any client connected to the WiFi. If the ethernet IP of the Pixhawk is 192.168.4.10 and the wifi IP of the raspberry is 192.168.5.10, you may try
./mavp2p udpc:192.168.4.10:9999 udps:192.168.5.10:9999
WiFi clients will be able to connect to 192.168.5.10:9999, assuming that they support client mode, otherwise, if they support server mode only (i.e. they are expecting incoming packets) you have to add them manually as endpoints:
./mavp2p udpc:192.168.4.10:9999 udpc:192.168.5.20:9999 udpc:192.168.5.21:9999
Where 192.168.5.20 and 192.168.5.21 are the IPs of the clients. I've used 9999 as ports for everything, but every client has its own port. My advice is to try to find out the IPs, ports, protocols and reception modes (client or server) of every component of your network, write them down and then configure mavp2p accordingly.