Compilation and configration of Frottle

Visit the Frottle Homepage for a brief description of what Frottle is and what it does. This page also gives instructions on how to compile the .ipk file for Openwrt; however, I faced quite a few problems during the compilation and the configuration.


Files

Unmodified sourcecode
Sourcecode with Openwrt Makefile
IPK file for RB433AH (You will have to recompile if you are using any other hardware!)
Configuration files

The configuration files have the AP and STA configuration files named as "ap_frottle.conf" and "sta_frottle.conf" respectively. However, this won't work in OpenWrt. You will have to rename these files to "frottle.conf" and place it in the "/etc" directory, without which running frottle would give the following error:

root@OpenWrt:~# frottle 
Frottle: not configured to run as a master nor client


Compilation Issues

I persistently got this issue! Every time I would recompile frottle, the compilation would throw this error:

Makefile:186: .deps/client.Po: No such file or directory
Makefile:187: .deps/main.Po: No such file or directory
Makefile:188: .deps/master.Po: No such file or directory
make[3]: *** No rule to make target `.deps/master.Po'.  Stop.
To get rid of this issue, simply go to the directory where the compilation is trying to find ".deps". Make a directory named ".deps" and then create the following files using touch.
cd ~/openwrt/attitude_adjustment/build_dir/target-mips_r2_uClibc-0.9.33.2/frottle-0.2.1
mkdir .deps
touch .deps/client.Po
touch .deps/master.Po
touch .deps/main.Po
touch .deps/main.TPo


Configuration Issues

The instructions given on the Frottle Homepage mention the general configuration instructions. The command "modprobe" does not load modules in OpenWrt. You have to use the command "insmod" instead. So the configuration of frottle for OpenWrt looks something like:

insmod iptable_filter
insmod ip_queue
iptables -A INPUT -p UDP -i wlan0 --dport 999 -j ACCEPT  # Allow control packets in
iptables -A OUTPUT -p UDP -o wlan0 --sport 999 -j ACCEPT # Allow control packets directly out
iptables -A OUTPUT -p ALL -o wlan0 -j QUEUE              # fractel outbound packets
iptables -A FORWARD -p ALL -o wlan0 -j QUEUE             # fractel outbound packets

How to check if Frottle is working?

Once you execute these commands and run frottle, you will not know if frottle is indeed working. To check this, you can read the logs in OpenWrt using "logread" on which you will get the following response depending on whether your device is configured as a master or client.

logread
....
....
Sep 14 10:34:09 OpenWrt user.notice syslog: Acting as a master on port 999
Sep 14 10:34:09 OpenWrt user.notice syslog: Acting as a self-client with 200 packet queues
....
logread
....
....
Sep 14 12:11:51 OpenWrt user.notice syslog: Acting as a client to 10.107.63.198:999 with 100 packet queues
Sep 14 12:11:51 OpenWrt user.info syslog: Client up and running
Sep 14 12:11:51 OpenWrt user.info syslog: Client sent registration
....


When you execute the "insmod iptable_filter" and "insmod ip_queue" commands, make sure they do load the modules. In my case, OpenWrt failed to load ip_queue and gave the following error

...
Sep 14 08:12:14 OpenWrt user.err syslog: IPQ handle null: Failed to initialise IPQ (Unable to create netlink socket)
...
I had to install the "ip_queue" module using:
opkg install kernel_3.3.8-1-d6597ebf6203328d3519ea3c3371a493_ar71xx.ipk
opkg install kmod-ipt-queue_3.3.8-1_ar71xx.ipk
Make sure you download the correct .ipk file for your hardware achitecture from the OpenWrt Downloads page.


Page maintained by Gaurang Naik.