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
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.
Range extender: TP-Link WA830RE / Sony DualShock 3 controller