Hi everyone, I was looking for a way to use mavproxy to connect to a specific ip address within a wifi network.
For example my drone has the ip address : 192.168.1.20
And I would like to connect in this way : mavproxy.exe --master=udp:192.168.1.20:14550
I have already tried the above command but obviously it didn’t work , and I was wondering if any of you had any ideas . My main goal is to create a routine to download logs from a specific drone in the network .
It would be great if you could share more details on how your drone is connected to the network - info on the hardware you’re using to connect to WiFi, any companion computer, any parameters that you might have changed, how you’ve done the wiring, any documentation pages you’re following, etc.
In any case, for your GCS to connect:
The drone and your GCS needs to be connected to the same WiFi network.
The flight controller’s telemetry needs to be streaming over the TELEM1 or TELEM2 port into the WiFi adapter
The WiFi adapter/device on your drone needs to be forwarding the MAVLink stream to your GCS IP address and port
If your drone is connecting to a router, then you’ll have to either ensure it gets a static IP address or you’ll have find the DHCP assigned address.
One thing comes to mind, you could try it out:
Since you’re connecting using the drone’s IP address you will probably have to use this format. I’m not too sure about this, though. I don’t use this method.
mavproxy.exe --master=udpout:IP:PORT
Alternatively, if your drone is already forwarding MAVLink packets(number 3 above is already set up) you could try changing the command and see if you have any luck:
mavproxy.exe --master=udp:127.0.0.1:14550
To check if basic connectivity is there between GCS and drone over the network, you could try pinging the drone’s IP address. Type the following into a command prompt, assuming you have the correct IP address:
First of all, I am Davide Lentini. I work for an Italian startup called “Luminous Bees” that designs and builds luminous drones for outdoor (and also indoor) shows, here is a video of us, where we tested a fleet of drones in Budapest : Vimeo
Our firmware is obviously based on Ardupilot
Moving on to your questions :
Our drones are connected to a wifi network through an ESP8266 that has as firmware a version based on the latest commit of mavesp8266
No , our drones don’t have any companion computer
Well we changed a lot of parameters based on our model of drones . But the esp8266 works as a normal esp8266 with the mavesp8266 firmware
Normal wiring . We use as FC an STM32 and esp8266 is connected with the tx and rx on TELEM1
Our drones are connected to the same network as GCS
The FC is streaming over the TELEM1 port into the WIFI adapter
The GCS in the network has a fixed IP so the esp8266 knows which IP to connect to.
Our drones are connected to an access point network provided by an ubiquiti mesh which itself does not have a dchp server . So the drones have already saved a static ip based on their id, for example the drone 12 has the ip 192.168.1.12, the 13 192.168.1.13 and so on.
Let’s say the ip station set from the mavlink setup page
Returning to the question of MavProxy . is very simple .
Normally MavProxy connects to the localhost if it is connected to the AP network of the drone , so : mavproxy.exe --master=udp:0.0.0.0:14550
What I want to do is to connect directly to the IP address and then to the drone, which interests me :
Let’s say that I want to connect to the drone 15 to download logs using MavProxy, here’s what I want to do is : udp:192.168.1.15:14550
and then connect via mavlink to the drone
Yes thank you ! I already used the ping command to check that the drones were connected to the network.
I hope you understand my goal . Thanks for the help
@spitkowsky
Hi ! Well , yes and no .
You can’t connect to the singular IP address , but if you’re connected to an WiFi network and there are drones inside of this network , they will be automatically see from mavproxy as separate link/vehicle.
You have to base it on the sysid of drone , but it’s usually the same number device of the IP:
Drone 50 = 192.168.1.50
Simple type :
vehicle [sysid]
Please try following commands which I think it should solve the question as @Arunabha42 said, I also get the guide from Quickstart — MAVProxy documentation
e.g. Drone 50 = 192.168.1.50
Try method B:
$ mavproxy --master=udpin:192.168.1.50:14550 --out=udp:127.0.0.1:14550
Maybe mavproxy --master=udpin:192.168.1.50:14550 also works (I don’t know)
Hell @lida2003 !
Yes , your picture represents what I wanted to do initially and how my idea of operation was . But using udp or master commands to connect to a single IP/Drone in my network , never worked .
The concept on which the method I found working , is also visible using Mission Planner , in fact the latter is able to display on the map multiple vehicles at the same time and if you open the vehicles menu , you can select and create a link to a specific vehicle , search for “Mission Planner multiple vehicles” .
Mavproxy in the end is the same thing , if you start it within a network to which 10 drones are connected (for example) , from the command line you will see messages like this :
Decteted link on vehicle 01
Decteted link on vehicle 02
Decteted link on vehicle 03
Decteted link on vehicle 04
Where the last digit corresponds to the sys id of your drone . To answer your question , I have never tried with more than 10 drones linked at the same time , but my theory is that you can link 254 drones .
Started Mavproxy it will automatically connect to the first vehicle that reaches the server . Next to connect to a drone you will have to type:
vehicle {sysid}
Where sysid corresponds to the sysid parameter of your vehicle : SYSID_THISMAV
Once you make the connection , you are connected to that specific drone , so you will be able to see its parameters , restart it , arm it , fly it …
I have used this method to create some very useful routines . So I would say it is pretty well established . If I have not explained myself well , or there is any doubt , please tell me ! Thanks
I have the same system as shown in the diagram, but with only one drone. I can see the heartbeat packets coming from the drone on port 14550 in Wireshark, but Mavproxy does not see them. Also, Mission Planner and QGround control with not connect.
Thank you for the feedback. This is what I get with that command (notice I’m using Linux so no .exe)
~/.local/bin$ mavproxy.py --console --master=udpin:192.168.0.133:14550 --out=udp:127.0.0.1:14550
Connect udpin:192.168.0.133:14550 source_system=255
Failed to connect to udpin:192.168.0.133:14550 : [Errno 99] Cannot assign requested address
if mavproxy --master=udp:192.168.169.1:14550, I have been receiving ‘Link 1 down’
if mavproxy --master=tcp:192.168.169.1:14550 I have been receiving ‘Connection refused’
My drone is a generic model and I’m trying to connect it to create a Deep Learning script that autonomously guides it.
I connected my PC with the Wifi connection that the Drone generates (FLOW_17F56C) and I can also control it through the UAV drone application (its name is wifi uav).
Please, can anyone help me?
I’m about to take it apart and create a drone from scratch, with any development board.