That’s a good video, all the tricky info is between 10:00 - 11:30, this is explaining the enabling of the serial port and setting the right port and getting control over this port using root privilege (sudo -s).
There are many variation but basically, you need to check the devices using ls /dev/tty* and select an active port. Sometime it might be simpler to connect a usb-serial FTDI converter on the RPI because it is generally mapping as ttyUSB0 and it is pretty easy to see looking at the /dev you can see appear and dieappears as you connect and disconnect the USB converter.
Another simple test you can do is to read on the serial port using screen
sudo screen “port_name” 57600
You should see funny characters appears, thtas because MavLink send binary messages.
To exit GNU screen, type Control-A k.
Once you can confirm you read datat on the port, MavProxy should start on the port assigned.
There is no magic, just simple tools and logic…good luck
With the Pi3 you need to make sure that you’ve disabled bluetooth and are using the real ttyAMA0 device - the docs on the ardupilot wiki need updating. Make sure you have ‘dtoverlay=pi3-disable-bt’ set in /boot/config.txt and reboot.
@fnoop can you explain a little bit about why we would enable/disable RTS/CTS? I’m running some Pi3’s and having some mission syncing issues. I’m thinking disabling that would fix the issue?
@Kevin_K raspberry doesn’t have flow control pins, so you only connect gnd,rx,tx to the telemetry port. Ardupilot should detect if flow control is present or not, but it often gets it wrong so better to turn it off explicitly in the parameters. If you don’t, it’s known to cause problems.
If you’re using ttyS0 instead of ttyAMA0 then you may see intermittent data issues depending on the current clock/core speed of the cpu.
@fnoop Thank you as well for chiming in. I still seem to be having issues on making the serial work. Is there a recent and step by step source that gears more for the RPI3? Also, how were you able to accomplish the wiring from telemetry 2 to your RPI3? I basically am using a similar telemetry cable that I’m also using with my RFD telemetry radio. I’m only connecting the rx, tx and gnd. See attached img. I’m hoping my issues is not related to how I’m wiring to the Pi3. I’ve decided to do a fresh install of Pi since I’ve done so many tweaks. Lastly, is there a specific Pi OS I need to be using? I’m on the most recent. How about Ardupilot firmware? Plane, copter?
Thank you again for your help on this! I’m downloading it now and will install. What are your thoughts on the cable setup I sent earlier? Do you see any issues on establishing a serial connection on how I have it?
@ppoirier Just an update. I re-flashed to the R Pi3 with the Jesse OS distro. Followed the steps in the ArduPilot wiki with the exception of specifying ‘serial0’ instead of ‘ttyAMA0’. Second, be sure to include in the boot/config.txt file the following: ‘dtoverlay=pi3-disable-bt’.
With careful rechecks of my wiring setup I was able to successfully connect!! Thank you every for your help and input. This interaction is what makes ArduPilot an amazing community.
Now i want to control the Pix-hawk using my Raspberry Pi3. e.x. I want to stop/start the drone, by sending the command to the Pix-hawk over the Mavlink protocol.
Can someone give me the idea on how can i achieve that?
I am working on very similar project as yours. But I am one step behind. I am yet to establish communication between flight controller and rpi3. I am following
I am stuck at point where I need to install package on rpi3. When I try “sudo pip install pymavlink” the console of Rpi3 was getting stuck. I am totally unaware of what can be done. Any suggestions or solutions for this please?
Or could you let me know the procedure you did to have connection between flight controller and rpi?
Thanks in advance