Use the USB port on Parrot Drones

From PaparazziUAV
Jump to: navigation, search

USE USB port on Parrot Drones

There are many used for the USB port on a Parrot Drone. The first kickof of the page is about using serial devices via USB, the most common scenario. Ofcourse there are more, feel free to add you solutions on this page

Serial modem on Parrot

Add a external modem Bebop, Bebop 2 or Disco and maybe even others...


Wherever you read /lib/modules/3.4.11\+/ is for a Bebop /lib/modules/3.4.11/, mind the plus. If you read Bebop it might as well be Disco, althoug on the MTP there are some differences.


A 20Km telemetry connection with the Parrot Bebop by means of a RFD868 modem or some other modem that does the trick


Somehow send and receive bytes to the RFD868 modem, be it serial or otherwise.

Works for

Tested and works on Disco Firmware 1.7.1, Bebop Firmware 1.98 and 2.0.57, Bebop 2 not tested yet, but very likely works fine. If developer find time, we will validate.


Use the USB port on the backside of the AP mainboard. The USB is by default on Bebop hooked to the MTP media transfer protocol server... let's stop this service so it will not interfere with our datastream wishes.

Stop MTP service

Log into your Bebop, make a WiFi connection then

$ telnet

So in the Bebop console we are root, yeah...OK stop the service via:

**# /bin/sh /bin/ stop**

First tryout, USB plug convertor

Plug in a OTG micro converter to USB Serial device [| like this one]

So plugh in a 3v3 FTDI USB cable

# dmesg 


usb 2-1: new full-speed USB device number 2 using ci_hdrc

Sadly no default FTDI suppoert on the Bebop, lets fix this...

Add serial hardware driver

# find -iname *ko

on the Parrot bebop we find:


...lucky us ;), let's go and interrogate them, see what we have here via:

If your are not so lucky you have to go to this page to build them

# modinfo usbserial.ko && modinfo ftdi_sio.ko

that is just dandy , let's add them to this file /lib/modules/3.4.11/modules.dep

First we need to be able to Write change on the Drone main storage medium, let make it happen via:

# mount -o remount,rw /

we start up an editor on the device call "VI" via:

# vi /lib/modules/3.4.11\+/modules.dep

VI quick 'n dirty: Go to edit mode with


Then go to a line where you want to insert the lines and press


Sometimes even this works:


Then copy this line below from this text:


Paste it via


and again new empty line via a


Copy this line


Paste it again via


Press [ESC]

Then let's write the file via:


Now active the driver, manually first, and one can autostart it automate it later after the proof of concept works...

# insmod /data/ftp/internal_000/usbserial.ko 
# insmod /data/ftp/internal_000/ftdi_sio.ko
# cd /data/ftp/internal_000/
# modprobe usbserial.ko
# modprobe ftdi_sio.ko

on to some testing... conect whatever serial devec that outputs stuff to the FTDI cable, e.g. and GPS receiver, then draw in the serial garbage via:

# cat /dev/ttyUSB0

Improvement on the theme



A serial port on Bebop at startup

Disable MTP autostart

Changed, as dirty as we are, the script and renamed the mtp_prog name to use to domthing no existing... thus MTP server program would not be found so not started

Copy modules to system


The /lib/modules/3.4.11/kernel/drivers/usb/serial/ looks like a good spot to us


Upload the driver files wia FTP then telnet into an move e.m

# mkdir /lib/modules/3.4.11\+/kernel/drivers/usb/serial

Note: The directory could as well be without a + on your Bebop 1 or even a /lib/modules/2.6.36-102952-g6aedf2e9100/kernel/drivers/usb/serial on a Mambo...

# mv /data/ftp/internal_000/usbserial.ko /lib/modules/3.4.11\+/kernel/drivers/usb/serial
# mv /data/ftp/internal_000/option.ko /lib/modules/3.4.11\+/kernel/drivers/usb/serial
# mv /data/ftp/internal_000/usb_wwan.ko /lib/modules/3.4.11\+/kernel/drivers/usb/serial
# mv /data/ftp/internal_000/ftdi_sio.ko /lib/modules/3.4.11\+/kernel/drivers/usb/serial
# mv /data/ftp/internal_000/cp210x.ko /lib/modules/3.4.11\+/kernel/drivers/usb/serial
# mv /data/ftp/internal_000/pl2303.ko /lib/modules/3.4.11\+/kernel/drivers/usb/serial
# mv /data/ftp/internal_000/ch341.ko /lib/modules/3.4.11\+/kernel/drivers/usb/serial

Add modules to modules.dep

Read a bit about :e :w :q etc. of VI and Busybox, then;

vi /lib/modules/3.4.11\+/modules.dep

Add these lines in between somewhere like so:

kernel/drivers/parrot/iio/adc/p7temp.ko: kernel/drivers/iio/industrialio.ko
kernel/net/wireless/lib80211_crypt_wep.ko: kernel/net/wireless/lib80211.ko

To save these changes in the file press [ESC] than :w+[ENTER] then :q+[ENTER]

Quicktest ==

Add to system instantly in this order, do this:

# insmod /lib/modules/3.4.11\+/kernel/drivers/usb/serial/usbserial.ko
# insmod /lib/modules/3.4.11\+/kernel/drivers/usb/serial/ftdi_sio.ko

Start kernel module USBSerial and FTDI

Add modprobe somewhere e.g /etc/init.d/rcS

# vi /etc/init.d/rcS

Look for other modprobes ones then add these there:

#/sbin/ &                                                        
insmod /lib/modules/3.4.11\+/kernel/drivers/usb/serial/usbserial.ko
insmod /lib/modules/3.4.11\+/kernel/drivers/usb/serial/option.ko
insmod /lib/modules/3.4.11\+/kernel/drivers/usb/serial/usb_wwan.ko
insmod /lib/modules/3.4.11\+/kernel/drivers/usb/serial/ftdi_sio.ko
insmod /lib/modules/3.4.11\+/kernel/drivers/usb/serial/cp210x.ko
insmod /lib/modules/3.4.11\+/kernel/drivers/usb/serial/pl2303.ko
insmod /lib/modules/3.4.11\+/kernel/drivers/usb/serial/ch341.ko
ulogi "rcS init script done"
exit 0 

Time to reboot to test via

# reboot now

Make a better custom cable:

  1. Get a 3V# FTDI Real FTDI to USB small PCB
  2. Desolder the USB plug
  3. Get a microUSB cable an cut it and solder to USB side of FTDI PCB

{TODO Photo}

Separate Power

At a 1W setting it is not possible to draw power from the USB so a separate powersource must be found or create. There is none, so one can add a BEC that can give 5V at least 5A continuous and is wel shielded to the drone...

BEC to Bebop Howto and where

  1. At the base where the Power goes to the Bobop Board pull a little on red and black silicone shield
  2. Fux and solder on base of wire a bit
  3. solder CC BEC RED to RED Black to Black on Base

{TODO} Photo

  1. Add a dot of Hotglue to isolate an get mechanical strength for cables not to break off there
  2. Plugh in Bebop Battery, measure voltage from BEC , should be 5V

Alternative idea

Serial Data in and out via the console port, why not...

First there is the serial port used as shell access. see also

Disable serial shell

In the /etc/inittab we find:

# Put a an on-demand shell on first serial port with outputs redirected to
# zprint. Note: force interactive shell since zprint is not a tty...
ttyPA0::askfirst:-/bin/sh -l

So let's disable it and start using the serial port for other nifty stuff...


look for serial console info

$ cat /var/log/messages


Jan  1 00:00:07 (none) (insmod) : CURRENT_TTY = /dev/console
Jan  1 00:00:07 (none) Load Modules :
Jan  1 00:00:08 (none) (create_net_interface) : CURRENT_TTY = /dev/console

Using the serial link