Thread Tools
Feb 28, 2011, 05:39 AM
Registered User
Good points MAPGPS, as said before I checked dev/ttyPA0 during boot and program.elf is indeed blocked from switching PIN 127 (saw something like "*** MAPGSP pin 127 ignored..."). But the problem seems to be, when I run the commands to enable USB as said above it never gets enabled in the first place, long before program.elf even gets started... Maybe I need some more delay between the module loading because loading by script is too fast?? Or should I try modprobe instead of insmod?
Sign up now
to remove ads between posts
Feb 28, 2011, 07:03 AM
Registered User
My Drone was cruising on V2.1.2 with YJ , 20m high headed up by a gust to a certain angle that 4 motors stopped in mid-air and dropped like a rock to the ground .Is there a way that I can disable the auto motor shut down feature of AR Drone when it is tilted to a steep angle .
Feb 28, 2011, 07:32 AM
Registered User
Quote:
Originally Posted by nosaari
Good points MAPGPS, as said before I checked dev/ttyPA0 during boot and program.elf is indeed blocked from switching PIN 127 (saw something like "*** MAPGSP pin 127 ignored..."). But the problem seems to be, when I run the commands to enable USB as said above it never gets enabled in the first place, long before program.elf even gets started... Maybe I need some more delay between the module loading because loading by script is too fast?? Or should I try modprobe instead of insmod?
You need to add more delay after "insmod /data/video/ardudrone/dwc_otg.ko
"
(change your "sleep 1" to something like "sleep 5")

No difference for insmod and modprobe in our project.
Feb 28, 2011, 07:46 AM
Registered User
Quote:
Originally Posted by Elgato8558
My Drone was cruising on V2.1.2 with YJ , 20m high headed up by a gust to a certain angle that 4 motors stopped in mid-air and dropped like a rock to the ground .Is there a way that I can disable the auto motor shut down feature of AR Drone when it is tilted to a steep angle .
Yes, it is possible.
But need to find out the special PWM command or GPIO Pin which control that "motor shutdown", and use the way I made for ioctl plug-in (ignore GPIO 127).

scorpion2k is working on AR.Drone's PWM interface:
http://embedded-software.blogspot.com/
Hope we can get it works soon.
Feb 28, 2011, 02:47 PM
Registered User
Quote:
Originally Posted by MAPGPS
You need to add more delay after "insmod /data/video/ardudrone/dwc_otg.ko
"
(change your "sleep 1" to something like "sleep 5")

No difference for insmod and modprobe in our project.
Finally I solved the last puzzle it wasn't the delay, Pin 127 must be set to high before we can enable USB!

Here is the updated startup script:
(If one removes the stuff for the usb serial connection it can be used to generally power on USB at startup of drone. See my last post for all other required modifications). Will still post a How-To when time allows it!

Code:
#!/bin/sh

#
# Initialization script for Arduino stuff
#
# Loads modules and launches proxy server application
# required for communication with Arduino module.
#

echo Enabling USB, powering up Arduino and launching AT Commands Proxy

echo Loading usbserial.ko
insmod /data/video/ardudrone/usbserial.ko

echo Loading ftdi_sio.ko
insmod /data/video/ardudrone/ftdi_sio.ko

echo Enabling USB Port
gpio 127 -d ho 1
gpio 127 -d i

echo Loading dwc_otg.ko
insmod /data/video/ardudrone/dwc_otg.ko

echo Waiting 3s for the device to be ready
sleep 3

echo Setting correct baud rate of 115200 for /dev/ttyUSB0
stty -F /dev/ttyUSB0 115200

echo Launching AT Command Proxy server
/data/video/ardudrone/atcomproxy_arm &
Last edited by nosaari; Feb 28, 2011 at 05:02 PM.
Feb 28, 2011, 06:25 PM
Registered User
Mheeli's Avatar
Great work nosaari and MAPGPS.

Looks like a real alternative to YJ.
Feb 28, 2011, 07:00 PM
Registered User
Quote:
Originally Posted by nosaari
Pin 127 must be set to high before we can enable USB!
Since we load dwc_otg.ko before program.elf run (and with ioctl plug-in). We even no need to touch Pin 127 anymore (no need for any "gpio 127 ..." command).
Mar 01, 2011, 04:38 AM
Registered User

Hello MAPGPS^^ PLZ help me.. -Trying insmod.. faced err message




I copied the files (*.ko) to /data/video/. in AR.Drone through FTP service.
And entered AR.Drone with Putty telnet program..

but . I couldn't insmod all *.ko files..
Error message is like this.

insmod : can't insert : invalid module format..

I captured dmesg from /var/log..in AR.Drone. and attached

now I think.. there is difference in kernel version. between AR.Drone (2.6.27.44) and *.ko files(2.6.27.47)

How can I solve this problem?..

is there any c-source which is not compiled? then I can compile that c-code and is possible insmod in AR.Drone?

OR

Can I upgrade kernel version from 2.6.27.44 to 2.6.27.47 ?
I found "ARDrone_Version_20100809_1_2-2-kernel-patch-linux-2.6.27.diff.bz2"
But I don't know HOWTO ..
Mar 01, 2011, 05:27 AM
Registered User
Quote:
Originally Posted by Mheeli
Great work nosaari and MAPGPS.

Looks like a real alternative to YJ.
Thank you, all based on your inspiration!
And must say drone flies so great with sticks, reminds me of the Blade mSR!


Quote:
Originally Posted by MAPGPS
Since we load dwc_otg.ko before program.elf run (and with ioctl plug-in). We even no need to touch Pin 127 anymore (no need for any "gpio 127 ..." command).
Thats true, hehe, was so focused on using the gpio command that I didn't check for the obvious!

@giros
check how you upload your files, must be binary! Otherwise, I'm running my drone on 1.3.3 still, have not tested later firmwares yet!
Mar 01, 2011, 07:06 AM
Registered User
Quote:
Originally Posted by giros
insmod : can't insert : invalid module format..

I captured dmesg from /var/log..in AR.Drone. and attached

now I think.. there is difference in kernel version. between AR.Drone (2.6.27.44) and *.ko files(2.6.27.47)

How can I solve this problem?..
An easy way:
You just need to use a binary editor like UltraEdit to modify the version number inside *.ko files. Search "47" to locate the offset of version number "2.6.27.47".

But your kernel version is a too long string, current posted *.ko files do not have enough room to hold that long version string. Try to upgrade your firmware, like 1.3.3 we used. Here is a URL contains all firmwares:
http://www.ardrone-flyers.com/wiki/Main_Page

You may try to clean (with 0x00) the version and vermagic string inside the *.ko by a binary editor. Thus no version check anymore.

Here is an example to edit dwc_otg.ko:
Last edited by MAPGPS; Mar 01, 2011 at 10:58 AM.
Mar 01, 2011, 02:32 PM
MavLab coordinator
Quote:
Originally Posted by MAPGPS
Implemented it!
Plug-in for ioctl() to prevent AR.Drone program.elf from changing the GPIO_127 pin.
This is to support loading module dwc_otg.ko for USB Host mode on AR.Drone.

No need to flash a custom kernel, we do it in User space.

Usage:
Code:
export LD_PRELOAD=/data/video/libioctl_arm.so
kill -9 <PID of program.elf>
insmod /data/video/dwc_otg.ko
program.elf >/dev/null&
Attached ZIP file contains libioctl_arm.so and its source code.
Hi MAPGPS
no 5V at pin 1 and 7 of my drone

This is what I do

ftp 192.168.1.1
put dwc_otg.ko
put libioctl_arm.so

telnet 192.168.1.1
# ps
#export LD_PRELOAD=/data/video/libioctl_arm.so
#kill 965 <PID of kil program.elf >
#insmod /data/video/dwc_otg.ko
#program.elf >/dev/null&

result
program.elf runs (I receive navdata on my pc)
but no 5V on the pin 1 and 7


this is the output

# program.elf >/dev/null&
posix init start build on : Sep 22 2010 15:30:16
Use ctrl+\ (SIGQUIT) to end the application
[WW] POS (thread no name ((nil))) RR time quantum 0s 100000000ns
[WW] POS (thread no name ((nil))) thread guard size : default 4096
[WW] POS (thread no name ((nil))) thread stack size : default 6144, minimal 8192, (system default 8380416)
[WW] POS (thread no name ((nil))) disable smp
# [WW] POS (thread no name ((nil))) stack size 6144 is too small, setting to 8192
register : /dev/input/event0
we register 1
ioctl(): GPIO PIN = 63
ioctl(): GPIO PIN = 64
ioctl(): GPIO PIN = 132
ioctl(): GPIO PIN = 130
ioctl(): GPIO PIN = 131
ioctl(): GPIO PIN = 132
ioctl(): GPIO PIN = 132
ioctl(): GPIO PIN = 127
****** MAPGPS: Ignore GPIO_127
ioctl(): GPIO PIN = 63
ioctl(): GPIO PIN = 63
ioctl(): GPIO PIN = 106
ioctl(): GPIO PIN = 107
[WW] POS (thread log_thread (0x1655f4)) suspending current thread, possible deadlock
ioctl(): GPIO PIN = 68
ioctl(): GPIO PIN = 69
ioctl(): GPIO PIN = 70
ioctl(): GPIO PIN = 71
ioctl(): GPIO PIN = 68
ioctl(): GPIO PIN = 68
ioctl(): GPIO PIN = 69
ioctl(): GPIO PIN = 69
ioctl(): GPIO PIN = 70
ioctl(): GPIO PIN = 70
ioctl(): GPIO PIN = 71
ioctl(): GPIO PIN = 71
ioctl(): GPIO PIN = 68
ioctl(): GPIO PIN = 69
ioctl(): GPIO PIN = 70
ioctl(): GPIO PIN = 71
ioctl(): GPIO PIN = 106
ioctl(): GPIO PIN = 107

The only thing I can think of is that my dwc_otg.ko file is wrong. (see attachment)
I build it with the changes in the dwc_otg_driver.c file line 224 and 135 explained here http://embedded-software.blogspot.co...drone-usb.html
Mar 01, 2011, 03:19 PM
Registered User
Great work guys. I've been following along but I must admit I have no experience in what your all doing. I hope when all the testing and debugging is done, the "how to" will be easy for a newb like me. Now if you need to know about a nuclear reactor, I'm your man!.

Cheers, Brian.
Mar 01, 2011, 03:39 PM
Registered User
Hello,

i'm engaged in the YJ mod for my AR.DRONE...

By the way, thank's a lot to Mr Mheeli for this mod and the quality of the procedure description...

I'm also impressed by the job done by MAPGPS and nosaari for the upcoming mod... By the way, a bit of a shame you did not create a separate discussion for it, cause, it's a bit difficult now to follow the last changes made by Mheeli on his mod...
And it will be difficult as well to follow and find out your mod...

For the one interested by YJ, i found some in stock in Australia :
http://toysdownunder.com/yellowjacket.html
shipping rate is reasonable...
I got one shipped to france for 65$
But be carefull, it's the version without connector, i will solder one by myself

Another point about it, it's said on the site :
*Note**
This batch of YellowJackets's all have external antenna's attached. It was what we could get our hands on at the time. These are small flat antennas the same as attached to these :




if i well remember the whole reading of this discussion, i can remove the flat antenna. Isn't it ?

Can i dare two other questions ?
1) My AR.Drone actually works with AR.FreeFlight v1.6.1 and consequently, FW 1.4.7.
To perform the YJ mod, do you advice to remain with this setup or can i update to AR.freeflight 1.7.1 + FW 1.5.1 ?


2) the sketch i should use is v2.1.2 ?
Or the one in post #2, which is v2.1 ?


Thank's for all !

Regards.

Laurent D

ps : Mr Mheeli, for your information, i write down a discussion about this mod on my AR.Drone on a french Forum... :
http://www.helimag.com/quadrirotors/...classique.html
Last edited by Lorenzo29; Mar 03, 2011 at 06:16 AM.
Mar 01, 2011, 03:47 PM
Registered User
Subscribe
Mar 01, 2011, 08:22 PM
Registered User
A couple of weeks ago I suggested that we need to see about the serial port as a viable mod for the Ardrone. It looks like you guys have achieved this goal Can you now produce a How-to guide for this mod? The information as it is now, is spread over many posts.

Thanks


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Parrot AR.Drone range extension, need help from antenna gurus. g00bd0g FPV Talk 4 Jan 21, 2011 01:29 PM
Wanted Parrot ar drone ROCKY2 Aircraft - Electric - Helis (FS/W) 23 Nov 07, 2010 09:08 AM
Discussion Who’ s the Russian model in AR.DRONE vid? Naev Electric Heli Talk 8 Oct 12, 2010 02:32 PM
Discussion AR.Drone to carry camera gunnar-rc Aerial Photography 2 Sep 07, 2010 09:52 AM
Discussion Unboxing and First Impressions With the Parrot AR.Drone nikotttin Multirotor Drone Talk 0 Aug 31, 2010 04:50 AM