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?
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 !
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.
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.
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.
Jose
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).