I want to study the mavlink protocol link via radio, using 3DR 433/900 MHz radio kit.
I have thought about using the SITL simulator to capture frames and to study the link more easily without having to use a real drone.
I know how to use the SITL via USP and TCP but I do not know if it is possible to use as a command input a serial port.
Can I read MAVLink packages with wireshark? Do you know any similar study that I can use as a reference?
I’ve been looking but I can not find anything. Could you help me?
Thanks in advance
There’s a good reference on the Mavlink protocol here: http://qgroundcontrol.org/mavlink/start
As far as I can see, Wireshark doesn’t support the 900/433 MHz telemetry radios.
You could use Wireshark to look at the TCP/UDP connections - that would be possible.
If you use sitl with mavproxy (by default when using sim_vehicle.py) you can add --out=/dev/ttyUSB0,57600 to the command line to say to mavproxy to output drone mavlink to /dev/ttyUSB0 . Then plug your 3dr radio on your pc, find on which port and adapt /dev/ttyUSB0 to your port and 57600 to the baurate you have set on radio (default to 57600) . And done ! You can control sitl with 3dr radio !
I will try it.
This is my stage:
Do you think that i can reproduce it?
My current status is as follows:
Launch STIL with the following command:
sudo ~/ardupilot/Tools/autotest/sim_vehicle.py -j4 -L SEV --out=/dev/ttyUSB0 --map --console
I connect MAVlink to SITL, everything seems to go well
After a few minutes the connection is ronped and SITL stops working
Any idea what may be going on?
Thanks in advance
You shouldn’t need to use sudo to launch SITL. I suspect your doing this as your user doesn’t have access to the dialout group which is needed to accss ttyUSB0. Better just to add your user to that group via
sudo adduser dialout
Just to confirm the GCS on the left in your picture above is connecting to the SITL instance running on the right initially and working and then after a while the connection drops out?
Which GCS are you running? MAVProxy? If so once its started type
set moddebug 2
and when the link drops out you should get some more information that might help.
Thanks for your answer!
The situation is the following:
I can connect my GCS (MissionPlanner running in Windows) to SITL. 3DR led status: Green LED solid - link is established with another radio & Red LED flashing - transmitting data. The GCS downloads the parameters, but after a few seconds the radio connected to SITL stops responding. The red LED is off and although the gcs continues to send data SITL doesn’t respond.
Now, I have discovered that the problem is in SITL or in Ubuntu. In the same scenario, I have turned off the gcs and have re-launched SITL.
(Attached terminal capture)
The problem is the same, I can use SITL vía MAVLink ok radio led red and green blinking, afer a few seconds red led off, green blinking and the SITL doesn´t work… if I type mode auto for example it does nothing.
What can i do now??
thanks in advance! Sorry for my english, I know it’s not the best.
Can it be virtual machine problem?
I’m using VM VirtualBox
It could be !
Did you have install Extension Pack and guest additionals ?
I have everything installed but virtual machine is an option…
It is very strange that it works well for a time and suddenly stops transmitting
Do you know who has developed SITL? Maybe he can help me
Could you help me?
thanks in advance
Have you tried to test this outside of a virtual machine?
I’m waiting for anoder laptop. I think I’ll have it this week.
Have you ever worked with SITL using real radios? Just to know if it is possible the environment that I intend to build to my study.
I’m from spain. I am doing my thesis on UAV communications.
I am very grateful for your help Francisco. Thanks!
No, I haven’t used it but people from the dev team have, so I’m sure that it worked (there can be some recent bug that we aren’t aware of, but as far as I know nothing changed there recently).
Once you get your new laptop test it without the virtual machine so that we are sure the issue isn’t there (I use them a lot and I know sometimes it is a pain to get network issues fixed).
Thank you Francisco, I will write as soon as I have any progress.
I appreciate your help