AutoAP

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 17:35, 13 January 2007 (edit)
Marcjohnson (Talk | contribs)
m (Dynamically Download)
← Previous diff
Revision as of 17:35, 13 January 2007 (edit) (undo)
Marcjohnson (Talk | contribs)
m (Links)
Next diff →
Line 87: Line 87:
:* [http://www.sourceforge.net/projects/autoap Project AutoAP] on SourceForge site where you can download firmwares with AutoAP script built in. (As of 1/8/2007, these firmwares contain a bit outdated 12/12/2006 version of AutoAP script) (updated 12/28/2006). :* [http://www.sourceforge.net/projects/autoap Project AutoAP] on SourceForge site where you can download firmwares with AutoAP script built in. (As of 1/8/2007, these firmwares contain a bit outdated 12/12/2006 version of AutoAP script) (updated 12/28/2006).
-:* Latest stand-alone [http://dl.sourceforge.net/sourceforge/autoap/autoap.sh script on sourceforge] under ongoing development (see [http://www.dd-wrt.com/phpBB2/viewtopic.php?p=53118&highlight=#53118 this post]). Script last updated 1/11/2007.+:* Latest stand-alone [http://umn.dl.sourceforge.net/sourceforge/autoap/autoap.sh script on sourceforge] under ongoing development (see [http://www.dd-wrt.com/phpBB2/viewtopic.php?p=53118&highlight=#53118 this post]). Script last updated 1/11/2007.
:* The AutoAP [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=6575 discussion thread] :* The AutoAP [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=6575 discussion thread]
[[Category:English documentation]] [[Category:English documentation]]

Revision as of 17:35, 13 January 2007

AutoAP is a script that continuously scans for open Wi-Fi connections, tests them for validity, and connects to the strongest signal. If the connection is lost, the script scans again and finds the strongest valid signal again, and maintains a continuous connection to the internet in a mobile or portable environment. The script paremeters are highly configurable, including ability to configure secure connections.

Typically, you would use this script on your router while in Repeater Mode, Client Mode, or Client-Bridged Mode.


Before using this guide, it is recommended that you know how to:

... flash your device
... use the Web Interface
... setup Repeater Mode, Client Mode or Client-Bridged Mode.

Contents

Installation

There are several ways to install AutoAP:

Dynamically Download

If you would like to use autoap with any image/build (such as the latest v24beta), use the following script. It clears wl_ssid to dynamically connect to any open AP and then every 30 seconds tries to download stand-alone AutoAP script. Once downloaded, AutoAP starts.

  • Go to tab "Administration", subtab "Command".
  • Copy and paste the following into the edit box (make sure to get the "&" at the end):
nvram set wl_ssid=""
nvram set autoap_logger="html" 
`cd /tmp; until [ 2 = 1 ];do /bin/sleep 30;
/usr/bin/wget http://umn.dl.sourceforge.net/sourceforge/autoap/autoap.sh;
chmod 777 ./autoap.sh;./autoap.sh;done` & 
  • Click the Save Startup button
  • Reboot your router

Built-in Image

If you would like to have autoap built into an image:

  • Download firmware image with AutoAP script built in (see sourceforge link and caveats in "Links" section below)
  • Flash your router with this firmware
  • After flashing go to tab "Administration", subtab "Command"
  • Copy and paste the following into the edit box:
/bin/autoap &
  • Click the Save Startup button
  • Reboot your router

JFFS or Samba

You can use JFFS or Samba to directly call the AutoAP script.

  • Obtain the stand-alone AutoAP script (see Links below)
  • Put it into your router flash memory (using JFFS) or somewhere on your local network (using Samba).
  • Use the same startup script as in "Built-in Image" above but reference your JFFS or Samba path instead of /bin/autoap.

Usage

You can change the behavior of AutoAP script by setting NVRAM variables. For example, let's set AutoAP logging to html file.

  • Go to tab "Administration", subtab "Command".
  • Copy and paste the following into the edit box:
nvram set autoap_logger="html" 
nvram commit
  • Click the Run Commands button
  • Reboot your router

Now the repeater status will be available at http://RouterIP/user/autoap.htm (where RouterIP is the IP address of your router).


NVRAM Variables

What follows is a complete list of included NVRAM variables and what they do (with default values):

nvram set autoap_logger="syslog" [Valid values: syslog, html, /path/to/logfile]
When set to 'syslog', AutoAP will send all logdata to syslog. Depending on your log level settings, you will see more or less data. AutoAP has quite a bit of log data it sends, however if your log level is set to high, the router should only send out important autoap notices, like new connections, disconnections, or errors. If set to low, it will show you debug data.
When set to 'html', the log data is written to a file available via the web interface at http://RouterIP/user/autoap.htm. This log is kept trimmed to 1000 lines.
When set to a path, i.e. '/tmp/newautoap.log', the log data will be saved to that location. This will also be trimmed to 1000 lines.
nvram set autoap_findopen="1"
When set to 1, AutoAP will search for unencrypted, open access points. When set to 0, it will not connect to any open access points.
nvram set autoap_findwep="0"
When set to 1, AutoAP will search for WEP encrypted access points. If you set this to one, make sure to add keys in the next settings. Set to 0 keeps AutoAP from trying to connect with any WEP networks. This is far too slow to use as a brute force tool, so if you don't know the WEP keys to networks you're trying to connect with, just keep this at 0.
nvram set autoap_wepkeys=""
This is a space separated list of WEP keys you want AutoAP to use when trying to connect to WEP networks. For instance, if you set "AAABBBCCC1 4455993322 1111122222" it will attempt to use those three keys, in that order, to connect to any WEP (not WPA) access points.
nvram set autoap_aplimit="10"
The number of AP's that AutoAP should keep track of at one time. The default is 10, so after trying to connect to 10 access points, AutoAP will take another full scan and get a fresh list of URLs. If you live in a Wi-Fi heavy area, and your router doesn't move much, you can safely increase this to 15 or so. If you are in a sparse area, or routers around you tend to have weak signals, set it lower.
Also, if you're moving (i.e. router is in a car) you'll want this number to be somewhere between 2 and 5.
nvram set autoap_inet="1"
When set to 1, it will check to make sure internet is active on an AP before considering it valid. When set to 0, it only checks for connection to the gateway.
nvram set autoap_ineturl="www.google.com"
The URL to check.
nvram set autoap_dhcpw="15"
The amount of time to wait for a DHCP renewal to complete. If the routers you're accessing are fairly quick, you can decrease this to ~8-10 and save some time on the scans. However if the signal is low quality, or the router is slow to respond, you can increase it. The default should be a safe bet for most.
nvram set autoap_scanfreq="60"
The amount of time to wait between scans. When AutoAP finds a valid connection, it checks every so often to ensure that the connection is still active. If it isn't, it seeks out a new AP. This number controls how often it should check.
This only applies to the frequency of scans when the connection is good. When there is no connection, or no APs, it will automatically scan more frequently.
nvram set autoap_macfilter=""
A space seperated list of MAC addresses in the format xx:xx:xx:xx:xx:xx that AutoAP should avoid. If you have routers that you don't want to log on to, add them here. The MAC filter is more accurate than the SSID filter, as no two routers share a MAC address. (Unless cloned I suppose).
nvram set autoap_ssidfilter=""
A space seperated list of SSIDs to avoid. Normally the macfilter will be a safer bet, but occasionally there may be a WDS network, etc, that you don't want to connect to that includes many APs with the same SSID.

Links

  • Project AutoAP on SourceForge site where you can download firmwares with AutoAP script built in. (As of 1/8/2007, these firmwares contain a bit outdated 12/12/2006 version of AutoAP script) (updated 12/28/2006).