Topic: How to: use pairing option with wifi repeater

If you want to restrict the pairing but still be able to use a repeater device you have to hack the drone a bit. This is because the MAC address to limit the connectivity to is sent by the device and the repeater masquerades all connections with its own MAC address (at least DD-WRT in Repeater Bridge mode does that). Symptoms: after enabling the pairing option from the device you cannot connect to the drone via the repeater.

Disclaimer: you could brick your drone by hacking it in any way, it's your problem then!

Now, the hack is actually simple, arm yourself with your repeater's MAC address (with DD-WRT it is found on the entry web page of the repeater, look for "Wireless MAC"), connect directly to the drone, enable the pairing option (to restrict access to the drone) make a telnet 192.168.1.1 (for example with VX ConnectBot) then when you get the # prompt from the drone do:

cd /bin
cp pairing_setup.sh pairing_setup.new
vi pairing_setup.new

go down until after the line "iptables -A INPUT -m mac --mac-source $MAC_ADDR -j ACCEPT"; press the "i" key, then Enter and arrow up, until you are right below the same line, on an empty one, then write:

iptables -A INPUT -m mac --mac-source xx:xx:xx:xx:xx:xx -j ACCEPT

where xx:...:xx is your router's MAC address.

Then hit Escape, type ":wq" (without quotes) and Enter to save the output. If you are not happy with the result and you want to abort instead do Escape then ":q!" and Enter.

You can try the new code with

./pairing_setup.new

If the pairing option is enabled (so pairing is restricted) you should see:
Owner's MAC address is:  yy:yy:yy:yy:yy:yy
Setting pairing for:  yy:yy:yy:yy:yy:yy

This is the MAC of your device, different from your repeater's MAC. See if in the output of this command you see the next two lines:

iptables -L | grep MAC
ACCEPT     all  --  anywhere             anywhere             MAC yy:yy:yy:yy:yy:yy
ACCEPT     all  --  anywhere             anywhere             MAC xx:xx:xx:xx:xx:xx

If something is funny (different outputs, errors or whatever) or you are not 100% sure you did the correct thing, just reboot the drone, you haven't done any permanent damage to it yet.

Otherwise if you are convinced that everything is ok you can commit the new version of the script with:

mv pairing_setup.sh pairing_setup.old
cp pairing_setup.new pairing_setup.sh

Remember that when the firmware is updated this file is also restored to the default, you will have to apply the same changes again. Also do secure your repeater! If everything is correctly configured you should not be able to connect with another device to either the drone or the repeater. But now from the repeater's configuration only can allow more devices to connect to the drone without compromising the security.

Drone 2.0 (fw 2.3.3) / Asus Transformer Prime (Android 4.1.1) / ARDrone Flight Pro
Range extender: TP-Link WA830RE / Sony DualShock 3 controller

Re: How to: use pairing option with wifi repeater

Hi costing,

Thank you for sharing this !
Will be very usefull... as soon i get a repeater  tongue

Regards,
LeFrenchie

Re: How to: use pairing option with wifi repeater

This may be a dumb question but... if I'm going through a repeater and I go into the AR drone settings and select pairing mode there, what exactly is getting paired?  Doesn't this happen at the drone side, and it pairs to the mac address of the repeater, or is the android sending its own mac address as some data and the drone gets paired with the data supplied?

Re: How to: use pairing option with wifi repeater

If the "Pairing" option is enabled, the drone will only accept connections from the device that has just issued that command. So nobody else but you can connect to it any more. Without that option anybody seeing you flying might be able to take over ...

Drone 2.0 (fw 2.3.3) / Asus Transformer Prime (Android 4.1.1) / ARDrone Flight Pro
Range extender: TP-Link WA830RE / Sony DualShock 3 controller

Re: How to: use pairing option with wifi repeater

Ok, I see what I didn't see before... so you're saying that the pairing command actually sends the mac addy of the android, NOT a "pair to the mac address of the device you receive this from" message.

Re: How to: use pairing option with wifi repeater

Since the SR10000 has a "clone mac address" option - couldn't you technically perform the following after determining your controlling device's MAC address:

1) power on your drone
2) link your android (or idevice) to your drone
3) pair them through the menu
4) "forget" the drone network on your android
5) turn off the drone
6) go into the SR10000 and into IP settings, under CLONE MAC enter the MAC ADDRESS of the android
7) APPLY and REBOOT
8) Set up your SR10000 on the ARDRONE SSID per normal, save, and power down

Now when you power on the drone, followed by the SR1000, the drone should see the SR10000 as your paired device with exclusive access.  Connect the android to your SR10000 SSID and you're flying safely without soft-hacking the drone.

As an added benefit, you can go back to JUST the android without the SR10000 at any time, since it will share the MAC address.

Make sense?

Re: How to: use pairing option with wifi repeater

<Bump>
Any feedback on this one?  I haven't had the chance to try it yet due to cold weather...

8 (edited by Robin42525 04-12-2013 18:21:40)

Re: How to: use pairing option with wifi repeater

How to use pairing option with WiFi repeater?

quality management system

Re: How to: use pairing option with wifi repeater

likeaneagle wrote:

<Bump>
Any feedback on this one?  I haven't had the chance to try it yet due to cold weather...

Works like a charm, I'm using a Linksys WAP54G with DD-WRT firmware and now I've set my Wireless MAC filter on the Repeater as well as editing the pairing_setup.sh file.

However what I did was copy the original file and gave it a .SAV extension then made my changes and saved it as a .new then copied it over the original file...  This way you keep a copy of the factory file, have a copy of the file with your MAC addy in it so when you get a firmware update you will have the info you need to re-config your drone after an update...

Tested it with other wireless devices and yup, keeps everyone out...  I fly a bit more at ease knowing someone's not going to try to hijack the signal. cool

I spent What?

Re: How to: use pairing option with wifi repeater

Hey!
I'm sorry that i dig up this old post... I found this post and it was exactly the howto i was looking for, thanks for that!
After I finished all your instructions and checked all outputs twice, I came to a point where i can connect with my device(android) to the drone directly and press take off in the app and everything is just fine. But when i try to connect via my repeater (tplink wa830Re) i cant press the take off.
So i checked everything again, got the output:

Owner's MAC address is:  device Mac adress (android)
Setting pairing for:  device Mac adress (android)

and

ACCEPT     all  --  anywhere             anywhere             MAC device Mac adress (android)
ACCEPT     all  --  anywhere             anywhere             MAC repeater mac address (tplink)

Does i missed anything? i thought about changing the order in which the mac adresses are provided, first my static entry and then the "iptables -A INPUT -m mac --mac-source $MAC_ADDR -j ACCEPT" in the line below, do you think this might work?

I had the idea that it's not working cause there are 2 mac adresses provided.

Or does anyone see a point why it wouldnt work for my config/Ideas how i could get 'secured' acces to the drone via repeater?

Regards
Seroo

Re: How to: use pairing option with wifi repeater

Normally this should be it. The order doesn't matter as long as the ACCEPTs are one after the other. The only suggestion I have is to check if you have correctly copied the repeater's wireless MAC address. That you can find out by disabling pairing, connecting via the repeater and executing an "arp -n" command on the drone.

Drone 2.0 (fw 2.3.3) / Asus Transformer Prime (Android 4.1.1) / ARDrone Flight Pro
Range extender: TP-Link WA830RE / Sony DualShock 3 controller

Re: How to: use pairing option with wifi repeater

Hey! Im really happy about your answer, I almost gave up because i checked the MAC like thousand times. I checked the mac via arp -n and found that it's not starting with A0 like everywhere else, instead with A6, changed it and done! everything working fine!

Thank you very much! You helped me alot!