Skip to content

Instantly share code, notes, and snippets.

@karlwestin
Created November 10, 2012 15:55
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save karlwestin/4051467 to your computer and use it in GitHub Desktop.
Save karlwestin/4051467 to your computer and use it in GitHub Desktop.
Make the AR Drone connect to a network
#telnet into the drone (telnet 192.168.1.1)
#paste the following command:
killall udhcpd; iwconfig ath0 mode managed essid [ssid]; ifconfig ath0 [wanted ip] netmask 255.255.255.0 up;
#ex. killall udhcpd; iwconfig ath0 mode managed essid Roflcopter; ifconfig ath0 192.168.43.201 netmask 255.255.255.0 up;
@karlwestin
Copy link
Author

please note this only works with open networks, for WPA-networks, you'll probably need to install WPA Supplicant (more info here http://askubuntu.com/questions/138472/how-do-i-connect-to-a-wpa-wifi-network-using-the-command-line)

@asyncanup
Copy link

this worked for me only when i changed "mode managed" to "mode ad-hoc"

my ad-hoc network was created on a windows PC with Connectify

@chrizbo
Copy link

chrizbo commented Aug 1, 2014

Is there a way to set it back to hotspot mode? I'm going to try it out soon, but wanted to be able to set it back if someone else wants the drone...

@miguelolivaresmendez
Copy link

chrizbo, you just need to unplug the battery and the ardrone will set the default values. To connect to the access point you have to do what karlwestin mentioned each time you start the ardrone, so I recommend to create a script to not have to copy the line each time.

@chrizbo
Copy link

chrizbo commented Aug 6, 2014

Excellent, thanks!

@vmsh0
Copy link

vmsh0 commented Sep 29, 2014

Will this make the drone automatically reconnect after loosing & getting signal again?

@ineeddronehelp
Copy link

I connected to the drone's wifi, used telnet and the above code, how can i confirm that the drone is connected to the new wifi?

@karlwestin
Copy link
Author

What's not really clear here is that
a) you need to confirm that IP you want is available
b) to check the drone after doing this wait 30 sec-1min then connect to the wifi you wanted to use,
and try telnet [your-ip-of-choice]
If you find smth there, it might be your drone (especially if it lets you in)
I don't have a drone here so i cant tell you exactly what youll find,
i can try to do that next week.

Also, to make the drone a hotspot again, like @miguelolivaresmendez says, just unplug the battery and set it in again.

(Sorry y'all didnt see comments on this gist until now)

@yteo006
Copy link

yteo006 commented Feb 17, 2016

hi, I have some question about the technical issue. I have home router access point with password protected, and I have two drones, would like to connect them to my home router access point. may I know whether there is any way to do it since the router is password protected? are the links/info able to do the trick? I need some assist, thanks

@joabo
Copy link

joabo commented Jun 7, 2017

Hey @yteo006, I realise this is an old post... However as I too was searching for a similar thing, you might find these precompiled scripts that add WPA2 support to be of some use too...

Link: https://github.com/daraosn/ardrone-wpa2

Cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment