Login to disable ads!

USB Disk on AR.Drone

Mirumod, Macgyver, hull, cam, propeller, leg, cross, ball bearing mods... etc.
MAPGPS
Strange wobble
Posts: 201
Joined: 26 Oct 2010, 03:03
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by MAPGPS » 03 Feb 2011, 02:35

CTaddey,

Files under directory /data will not be overwritten during a firmware uprade, but maybe an exception for the beta firmware came with AR_DRONE_FLASHER_v1_00_08_Installer.

SSID is defined in file /data/config.ini, attached is my config.ini.

You can connect your AR.Drone via serial port to your PC terminal (with default 115200 baudrate), so you can watch the booting progress of AR.Drone, and get into the Linux terminal by press Enter key when it prompts.
This way you can know what happening to your AR.Drone (e.g.: rolling re-boot), and get into the Linux system to do what you want without WiFi.

I alway use this way to survive my AR.Drone during my test of customized kernel (as you know a wrong kernel will cause system Oops, and failed to boot up --- mostly rolling re-boot by watchdog).
You do not have the required permissions to view the files attached to this post.

ShellDude
Batterys getting low
Posts: 957
Joined: 04 Jan 2011, 20:10
Drone Type: Bebop
Location: Philadelphia, PA USA
Has thanked: 0
Been thanked: 1 time

Re: USB Disk on AR.Drone

Post by ShellDude » 03 Feb 2011, 03:27

MAPGPS wrote:CTaddey,

Files under directory /data will not be overwritten during a firmware uprade, but maybe an exception for the beta firmware came with AR_DRONE_FLASHER_v1_00_08_Installer.

SSID is defined in file /data/config.ini, attached is my config.ini.

You can connect your AR.Drone via serial port to your PC terminal (with default 115200 baudrate), so you can watch the booting progress of AR.Drone, and get into the Linux terminal by press Enter key when it prompts.
This way you can know what happening to your AR.Drone (e.g.: rolling re-boot), and get into the Linux system to do what you want without WiFi.

I alway use this way to survive my AR.Drone during my test of customized kernel (as you know a wrong kernel will cause system Oops, and failed to boot up --- mostly rolling re-boot by watchdog).
Let me make sure I follow correctly... I've done quite a bit of serial programming (and wiring over the years). If I were to do an RS232 jig, I'd use pins 3,5,7? wired to send/recv/gnd on a 9 pin serial plug... or is there a driver (I've seen the links) that expose the usb header as a virtual com port?

Image

MAPGPS
Strange wobble
Posts: 201
Joined: 26 Oct 2010, 03:03
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by MAPGPS » 03 Feb 2011, 05:00

Please do NOT connect to the RS232 directly, otherwise will damage your AR.Drone port!

AR.Drone is TTL level. You must use a shifting level convertor, or TTL/USB convertor to the USB port on your PC (to simulate a serial on PC side).

Pin Layout on AR.Drone:

Code: Select all

Pin 1: VBUS /0V (or 4.91V for USB Host with module dwc_otg.ko loaded)
Pin 2: Power /11.20V
Pin 3: USB D- /0.01V
Pin 4: Serial RX /0.11V
Pin 5: USB D+ /0.01V
Pin 6: Serial TX /3.41V
Pin 7: Ground
Pin 8: Empty

User avatar
CTaddey
Just flips over
Posts: 85
Joined: 02 Feb 2011, 22:30
Location: Argentina
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by CTaddey » 03 Feb 2011, 17:26

Hello MAPGPS.
Thanks for your information and the config.file. They will be put to good use.
I was following your discussion at KAPEJOD so today I'm equipped with a MAX232 IC for TTL>RS232 bridge. Hopefully I will have some data which I will share with you.
With this IC you can make a small board that can make the signal conversion and add one component to take 12Vcc from pin 2 and provide 5Vcc to your gps board.

To round up with those pins, do you know if pins 3,4 and 4,6 all end up in ttyPA0? If so, could we use the USB interface as a virtual serial port?
http://libusb.6.n5.nabble.com/Virtual-c ... 63393.html
http://www.jungo.com/st/drivercore/cdc_acm_driver.html

or maybe use a modified version of usb_flash that will act as a terminal?

MAPGPS
Strange wobble
Posts: 201
Joined: 26 Oct 2010, 03:03
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by MAPGPS » 04 Feb 2011, 03:21

Pin 4 & 6 are ended at serial port /dev/ttyPA0, which is the console on AR.Drone. You can attach a GPS or serial terminal to it.

Pin 3 & 5 are ended at USB OTG port, which can be accessed via libusb like usb_flash does. You can let it acts as USB Host mode with dwc_otg.ko module loaded, and attach USB devices like USB disk drive, USB 3G modem(with driver option.ko to create virtual serial ports /dev/ttyUSB0, ttyUSB1, ttyUSB2), Arduino FTDI USB/serial convertor (virtual serial device /dev/ttyUSB0).

Those driver modules are already in the kernel source, but not built by Parrot.

Galbrun
Ready for take off
Posts: 18
Joined: 09 Feb 2011, 11:08
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by Galbrun » 09 Feb 2011, 11:42

Hi all,

This is my first message on this board, and hopefully not the last one. As you may expect, I am coming here because :
a: I have a drone, and I am trying to make it fly my way (in fact, I have 4 drones, and I am trying to make them part of a robotic platform in the engineering school I work at)...
and b: I have met a problem while working with the drone.

So, here I am, I tried to change the wifi setting, I have some experience with such modification so I was quite confident, and I had read that it is alwys possible to flash the drone to the original settings so I changes the init.d file, and my drone won't connect to the wifi anymore. Next thing I am doing is building my usb cable, plugging it, downloading scorpions' ardrone flashing tools (http://code.google.com/p/ardrone-tool/" onclick="window.open(this.href);return false;) and trying to flash it.

I am running on windows 7 x64. Apparently, the driver are ok (my drone is identified as 'P6 USB stage1' in the device manager, with the libusb WIN32 drivers 1.2.2). I have downloaded the last firmwares from parrot website, and extracted the ardrone_installer.plf. that went fine, I also found the old usb flash tool with the bootloader, and then I ran usb_flash.exe. But it didn't work: Image

Anyone, any idea ?

Galbrun
Ready for take off
Posts: 18
Joined: 09 Feb 2011, 11:08
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by Galbrun » 09 Feb 2011, 12:07

Uh, nevermind, I guess this is a side effect of the Murphy rule, known as the reverse demo effect : as soon as you have done significant work on isolating a problem, describing it and asking higher authority to look after it, it vanishes.

So I unplugged everything, and plugged it back, ran the flashing tool, and it worked very fine, thank you. See you around, folks!

Galbrun
Ready for take off
Posts: 18
Joined: 09 Feb 2011, 11:08
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by Galbrun » 09 Feb 2011, 12:49

I have stil another question, I managed to flash the drone on my Windows computer, but now I would appreciate to do the same thing with my linux computer (with ubuntu 10.10). I built the usb_flash_tool, but I don't know how to add the drone as a usb device (that was very straightforward on windows, but here plugging the drone does not have any consequences).

scorpion2k
Ready for take off
Posts: 22
Joined: 30 Nov 2010, 00:55
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by scorpion2k » 09 Feb 2011, 14:26

Galbrun wrote:I have stil another question, I managed to flash the drone on my Windows computer, but now I would appreciate to do the same thing with my linux computer (with ubuntu 10.10). I built the usb_flash_tool, but I don't know how to add the drone as a usb device (that was very straightforward on windows, but here plugging the drone does not have any consequences).
The usb_flash tool uses libusb. Libusb only needs USBFS under linux which should be enabled by default for Ubuntu. As USBFS can be accessed by root only, you need to run usb_flash as root.

Best regards

Galbrun
Ready for take off
Posts: 18
Joined: 09 Feb 2011, 11:08
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by Galbrun » 09 Feb 2011, 14:53

scorpion2k wrote:
Galbrun wrote:I have stil another question, I managed to flash the drone on my Windows computer, but now I would appreciate to do the same thing with my linux computer (with ubuntu 10.10). I built the usb_flash_tool, but I don't know how to add the drone as a usb device (that was very straightforward on windows, but here plugging the drone does not have any consequences).
The usb_flash tool uses libusb. Libusb only needs USBFS under linux which should be enabled by default for Ubuntu. As USBFS can be accessed by root only, you need to run usb_flash as root.

Best regards
Ok, got it. It is slightly disturbing that there is no sign that the drone is seen by the computer, but it works nonetheless. Thank you again, now I will try again and make it fly!

User avatar
matrix961
Strange wobble
Posts: 200
Joined: 12 Oct 2010, 02:01
Drone Type: AR.Drone 2
Location: Central Pennsylvania
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by matrix961 » 24 Feb 2011, 01:09

Outstanding job on this. I was able to use the tool to flash back using the 1.4.6 .plf file. Once I restarted, I got the red lights then they flashed one by one and went green. I connected with FreeFlight and my version was back to 1.4.6 from the newer 1.5.1.

matrix961

hebitai33
Newcomer
Posts: 1
Joined: 06 Apr 2011, 19:21
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by hebitai33 » 16 May 2011, 16:37

Hi,

have you guys tried to flash the modified kernel with the 1.5.1 firmware??

MAPGPS
Strange wobble
Posts: 201
Joined: 26 Oct 2010, 03:03
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by MAPGPS » 03 Jul 2011, 05:51

Tested AR.Drone with USB Hub:
one 8GB USB flash drive + one USB 3G modem
You do not have the required permissions to view the files attached to this post.

billbergman
Newcomer
Posts: 1
Joined: 12 Nov 2010, 00:16
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by billbergman » 18 Aug 2011, 13:49

Are there any windows 7 64bit drivers for the USB flash?

Zephael
Battery Charged
Posts: 9
Joined: 22 Apr 2012, 19:32
Has thanked: 0
Been thanked: 0

Re: USB Disk on AR.Drone

Post by Zephael » 11 May 2012, 09:22

I hope somebody will read it and could answer me... :roll:


I would like to attach an USB drive to my drone.
Current firmware 1.7.11 but I will update later.
OS: latest Debian Linux

Installed cross compile tools:

Code: Select all

apt-get install emdebian-archive-keyring libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi gcc-4.3-arm-linux-gnueabi g++-4.3-arm-linux-gnueabi dpkg-cross libncurses5-dev
Made a USB cable for testing, attached it to Drone.
Based on http://embedded-software.blogspot.com/ and http://arsmash.blogspot.com/ pages I downloaded ARDrone_Version_20110401.tar.bz2 and tried to compile it, with no success. I downloaded the oldest (ARDrone_Version_20100809_1_2-linux-2.6.27.tar.bz2) source file and patched with p6_sdhci-patch1.patch.

After this I made the modifications in dwc_otg_driver.c and compiled the kernel module.
Loaded in the Drone, the buttom leds go red, and the dmesg showed that USB was recognised. I could measure the 5V :)

Attached a pendrive (FAT32 fs) to the cable, but nothing happened. No logs in dmesg, just a led light up on the pendrive.
Checked that MAPGPS loaded another modules, but I couldn't find it all in menuconfig.

I found a few (e.g: vfat), compiled it, but I could not load. (I'm not home at right now, could not paste a log :() I think header error?
Am I using too old source?


Questions:
What modules do I need to load to use a pendrive and where can I find them?
Could somebody help me to make a proper build environment and compile a working kernel module? :roll:

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests