AutoAP

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 17:47, 17 December 2006 (edit)
Kubanczyk (Talk | contribs)
m
← Previous diff
Revision as of 01:47, 25 December 2006 (edit) (undo)
P1415 (Talk | contribs)
m (grammar and little fixes)
Next diff →
Line 1: Line 1:
-[[glossary#autoap| AutoAP]] is a script that continuously scans for open wifi 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.+[[glossary#autoap| 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 [[Client_Mode_Wireless | Client Mode]], [[Wireless_Bridge | Client-Bridged Mode]], or [[UWR | Repeater Mode]]. Typically, you would use this script on your router while in [[Client_Mode_Wireless | Client Mode]], [[Wireless_Bridge | Client-Bridged Mode]], or [[UWR | Repeater Mode]].
Line 5: Line 5:
:''Before using this guide, it is recommended that you know how to:<br>'' :''Before using this guide, it is recommended that you know how to:<br>''
-... [http://www.dd-wrt.com/wiki/index.php/Installation flash your device]<br>+... [[Installation | flash your device]]<br>
... use the [[Web Interface]]<br> ... use the [[Web Interface]]<br>
... use [[Client_Mode_Wireless | Client Mode]], [[Wireless_Bridge | Client-Bridged Mode]], or [[UWR | Repeater Mode]]<br> ... use [[Client_Mode_Wireless | Client Mode]], [[Wireless_Bridge | Client-Bridged Mode]], or [[UWR | Repeater Mode]]<br>
Line 11: Line 11:
=Installation= =Installation=
-There are several ways to install and use [[autoap]]:+There are several ways to install and use AutoAP:
-<br>+ 
-==Built Into Image==+==Built-in Image==
-:* You can flash your router using an [http://www.partners.biz/autoap/v24/dd-wrt.v24_AAPw_102-generic.bin image with autoap built in]. Go [http://www.dd-wrt.com/wiki/index.php/Installation here] for instructions on flashing for your device. +:* Download an [http://www.partners.biz/autoap/v24/dd-wrt.v24_AAPw_102-generic.bin image with AutoAP built in].
-:* After flashing with the [http://www.partners.biz/autoap/v24/dd-wrt.v24_AAPw_102-generic.bin autoap image], go to tab "Administration", subtab "Command".+:* [[Installation | Flash]] your router with this image.
 +:* After flashing go to tab "Administration", subtab "Command".
:* Copy and paste the following into the edit box: :* Copy and paste the following into the edit box:
nvram set autoap_logger="html" nvram set autoap_logger="html"
Line 21: Line 22:
/bin/autoap & /bin/autoap &
:* Click the Save Startup button. :* Click the Save Startup button.
-:* After rebooting the router, repeater status will then be available at http://YourRouterIP/user/autoap.htm (where YourRouterIP is the IP address of your router).+:* After rebooting the router, repeater status will then be available at <code><nowiki>http://RouterIP/user/autoap.htm</nowiki></code> (where RouterIP is the IP address of your router).
-:* Additional info on autoap nvram variable usage (settings) is below.+
==Dynamically Download== ==Dynamically Download==
-:* If you're using a build that does not have autoap built-in, you may dynamically download just the script. Also use this approach if you don't have enough nvram for [[JFFS]]:+If you're using a build that does not have AutoAP built-in, you may dynamically download just the script. Also use this approach if you don't have enough nvram for [[JFFS]].
:* Go to tab "Administration", subtab "Command". :* Go to tab "Administration", subtab "Command".
:* Copy and paste the following into the edit box (make sure to get the "&" at the end): :* Copy and paste the following into the edit box (make sure to get the "&" at the end):
Line 35: Line 35:
chmod 777 ./autoap.sh;./autoap.sh;done` & chmod 777 ./autoap.sh;./autoap.sh;done` &
:* Click the Save Startup button. :* Click the Save Startup button.
-:* After rebooting the router, repeater status will then be available at http://YourRouterIP/user/autoap.htm (where YourRouterIP is the IP/name of your router).+:* After rebooting the router, repeater status will then be available at <code><nowiki>http://RouterIP/user/autoap.htm</nowiki></code> (where RouterIP is the IP address of your router).
-:* The above startup script does this: clears wl_ssid to dynamically connect to any open AP, and sets logging to html. Every 30 seconds, router tries to download autoap script. Once downloaded, autoap runs in the background which connects based on strongest signal.+ 
-:* For those that do not have autoap built-in, [http://d4308987.u22.infinology.com/code/autoap.sh here] is the stand-alone autoap.sh extracted from JP's autoap image.+The above startup script does this: clears wl_ssid to dynamically connect to any open AP, and sets logging to html. Every 30 seconds script tries to download stand-alone [http://d4308987.u22.infinology.com/code/autoap.sh AutoAP script] (extracted from JP's AutoAP image). Once downloaded, AutoAP runs in the background and connects based on strongest signal.
-==JFFS and Samba==+==JFFS or Samba==
-:* You can use [[JFFS]] or [[Samba]] to directly call the autoap script. +You can use [[JFFS]] or [[Samba]] to directly call the AutoAP script.
-:* Obtain the stand-alone autoap.sh script [http://d4308987.u22.infinology.com/code/autoap.sh here] (extracted from JP's autoap image). +:* Obtain the stand-alone [http://d4308987.u22.infinology.com/code/autoap.sh autoap.sh script] (extracted from JP's AutoAP image).
-:* Use the same startup as "Built Into Image" above but reference your [[jffs]] or [[Samba]] path instead of /bin/autoap.+:* Put 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 <code>/bin/autoap</code>.
=NVRAM Variables= =NVRAM Variables=
Line 48: Line 49:
:'''nvram set autoap_logger="syslog"''' [Valid values: syslog, html, /path/to/logfile] :'''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 '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 'html', the log data is written to a file available via the web interface at <code><nowiki>http://RouterIP/user/autoap.htm</nowiki></code>. 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. ::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"''' :'''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.+::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"''' :'''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 to 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.+::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=""''' :'''nvram set autoap_wepkeys=""'''
-::This is a space seperated 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.+::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"''' :'''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 you're 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.+::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. ::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"''' :'''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. ::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"''' :'''nvram set autoap_ineturl="www.google.com"'''
-::The url to check.+::The URL to check.
:'''nvram set autoap_dhcpw="15"''' :'''nvram set autoap_dhcpw="15"'''
-::The amount of time to wait for a dhcp renewal to complete. If the rotuers 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.+::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"''' :'''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 active connections.+::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. ::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=""''' :'''nvram set autoap_macfilter=""'''
-::A space seperated list of MAC addresses 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)+::A space seperated list of MAC addresses 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=""''' :'''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. ::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.
= External Links = = External Links =
-:* [http://www.partners.biz/autoap/v24/dd-wrt.v24_AAPw_102-generic.bin ddwrt24 0911 image] with autoap built in (updated 12/12/2006).+:* [http://www.partners.biz/autoap/v24/dd-wrt.v24_AAPw_102-generic.bin ddwrt24 0911 image] with AutoAP built in (updated 12/12/2006).
-:* [http://d4308987.u22.infinology.com/code/autoap.sh Stand-alone autoap.sh script] (extracted from autoap image with latest bug fixes from Mathilda - updated 12/17/2006). Here is a link to [http://irisa.free.fr/autoap.sh Mathilda's latest] which may be slightly newer code in development.+:* [http://d4308987.u22.infinology.com/code/autoap.sh Stand-alone autoap.sh script] (extracted from AutoAP image with latest bug fixes from Mathilda - updated 12/17/2006). Here is a link to [http://irisa.free.fr/autoap.sh Mathilda's latest] which may be slightly newer code in development.
-:* The autoap discussion thread is [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=6575 here].+:* The AutoAP discussion thread is [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=6575 here].
[[Category:English documentation]] [[Category:English documentation]]

Revision as of 01:47, 25 December 2006

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 Client Mode, Client-Bridged Mode, or Repeater Mode.


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

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

Contents

Installation

There are several ways to install and use AutoAP:

Built-in Image

  • Download an image with AutoAP built in.
  • Flash your router with this image.
  • After flashing go to tab "Administration", subtab "Command".
  • Copy and paste the following into the edit box:
nvram set autoap_logger="html" 
nvram commit
/bin/autoap &
  • Click the Save Startup button.
  • After rebooting the router, repeater status will then be available at http://RouterIP/user/autoap.htm (where RouterIP is the IP address of your router).

Dynamically Download

If you're using a build that does not have AutoAP built-in, you may dynamically download just the script. Also use this approach if you don't have enough nvram for JFFS.

  • 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" 
nvram commit
`cd /tmp; until [ 2 = 1 ];do /bin/sleep 30;
/usr/bin/wget http://d4308987.u22.infinology.com/code/autoap.sh;
chmod 777 ./autoap.sh;./autoap.sh;done` & 
  • Click the Save Startup button.
  • After rebooting the router, repeater status will then be available at http://RouterIP/user/autoap.htm (where RouterIP is the IP address of your router).

The above startup script does this: clears wl_ssid to dynamically connect to any open AP, and sets logging to html. Every 30 seconds script tries to download stand-alone AutoAP script (extracted from JP's AutoAP image). Once downloaded, AutoAP runs in the background and connects based on strongest signal.

JFFS or Samba

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

  • Obtain the stand-alone autoap.sh script (extracted from JP's AutoAP image).
  • Put 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.

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 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.

External Links