AutoAP/zh cn

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 16:58, 5 October 2010 (edit)
Leangjia (Talk | contribs)
← Previous diff
Revision as of 16:58, 5 October 2010 (edit) (undo)
Leangjia (Talk | contribs)
Next diff →
Line 33: Line 33:
:* [[Installation|Flash]] 固件刷入路由 :* [[Installation|Flash]] 固件刷入路由
:* 进入"管理"->"命令" :* 进入"管理"->"命令"
-:* 复制并粘贴下列命令至指令编辑框:+:* 复制并粘贴下列命令至指令编辑框【leangjia注:本人刷过此固件,启动指令中已集成有此指令,不必手工输入。效果不评说】:
- /bin/autoap &【leangjia注:本人刷过此固件,启动指令中已集成有此指令,不必手工输入。效果不评说】+ /bin/autoap &
:* 点击【保存为启动指令】按钮 :* 点击【保存为启动指令】按钮
:* 重启路由 :* 重启路由

Revision as of 16:58, 5 October 2010

AutoAP 是一个自动地,不断地扫描Open Wi-Fi并测试它们的有效性,尝试连接到最强的信号的自动化脚本。 如果连接丢失,脚本将再次扫描,发现最强的有效信号再次连接,保持在移动或便携式环境持续连接到互联网。 The script paremeters are highly configurable, including ability to configure secure connections.

通常情况下,你需要将本脚本用于 Repeater Mode Client Mode,或 Client-Bridged Mode等模式。


在使用本指南前, 它建议您知道如何:。。。
。。。 flash your device
。。。use the Web Interface
。。。设置 中继模式, 客户端模式 or 客户端网桥模式





若你想将autoap脚本在 (如v24beta最新版,好像现在不是这版)使用。 脚本交清除wl_ssid并自动连接到任何Open AP,然后每隔30秒尝试下载独立AutoAP脚本。AutoAP脚本在下载完成后会自动启动。

  • 进入"管理"->"命令"。
  • 将以下命令复制并粘贴至指令编辑框内(注意下列命令的"&"号,位于最末尾表示结束)::
nvram set wl_ssid=""
`cd /tmp; until [ 2 = 1 ];do /bin/sleep 30;
chmod 777 ./;./;done` &
  • 点击【保存为启动指令】按钮
  • 重启路由器
  • 验证: 一两分钟后, 打开http://RouterIP/user/autoap.htm (其中RouterIP是你的路由器的IP地址) 查看HTML日志,它是默认的。如果你看到一个日志,这表明Autoap成功下载并实例化。 你也可以telnet到路由并利用 "ps" 命令查看脚本是否运行中。



  • 下载 ( 内置AutoAP的固件(见sourceforge链接在"Links"一节注意事项)
  • Flash 固件刷入路由
  • 进入"管理"->"命令"
  • 复制并粘贴下列命令至指令编辑框【leangjia注:本人刷过此固件,启动指令中已集成有此指令,不必手工输入。效果不评说】:
/bin/autoap &
  • 点击【保存为启动指令】按钮
  • 重启路由


You can use JFFS to directly call the AutoAP script.

  • Make sure JFFS is enabled (disabled by default)
  • Make sure SSH is enabled (disabled by default)
  • Download the stand-alone AutoAP script (see Links below)
  • If downloaded file is named something different, rename it to and put it into /jffs/ using SSH.
  • Chmod to 777 using SSH (or telnet).
  • Use the same startup script as in "Built-in Image" above but use:
/jffs/ &
  • Instead of:
/bin/autoap &
  • Reboot router
  • After you have it working, SSH can be disabled.


You can use Samba to directly call the AutoAP script.

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


You can change the behavior of AutoAP script by setting NVRAM variables. For example, let's set AutoAP to prefer to connect to a certain, wep-encrypted network (SSID: my_net" wep-key: abcdef1234 ) before trying others.

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

Now it will only try other APs if the preferred one has no internet connectivity. Of course you could also give more than one preferred AP.


What follows is a complete list of included NVRAM variables and what they do (with default values). Be aware that these refer to the most recent versions of autoap. Older version may have different variables. To be sure just check in the history of the wiki for the date of your version.

nvram set autoap_logger="html" [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 autoap_logsize 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 autoap_logsize 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.
A space separated list of SSIDs with WEP keys you want AutoAP to use when trying to connect to WEP networks. Spaces in SSIDs have to be replaced by '*'s. Example: "My Home" -> "My*Home". The key is appended directly, preceeded by a "*key*". Example: "My Home", WEP key:1234567ab -> "My*Home*key*1234567ab SSID2*key*ab1212cd"
To use these the option autoap_findwep has to be enabled as well.
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=""
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 separated 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. Spaces in SSIDs have to be replaced by '*'s. Example: "My Home" -> "My*Home".
nvram set autoap_logsize="1000"
The maximum number of lines the logfiles will contain (for html and path based logging only). Once the size of the log reaches this value, it will be trimmed down to 3/4th of it, keeping the most recent entries. You may want to adapt this value depending on the memory of your router.
nvram set autoap_prefssid=""
A space separated list of SSIDs to try to connect to first. Spaces in SSIDs have to be replaced by '*'s. Example: "My Home" -> "My*Home".
If a preferred network is WEP encrypted, append the key directly, preceeded by a "*key*". Example: "My Home", WEP key:1234567ab -> "My*Home*key*1234567ab"
nvram set autoap_prefonly="0"
If "1", exclusively try to connect to preferred networks.
nvram set autoap_rescandelay="120"
Number of 'autoap_scanfreq' after which the nvram veriables a reread, and a rescan is forced, even if currently connected. This makes sure that you are conected to your preferred networks even if at some point they were unavailable, and it also takes advantage of new APs. Setting this to a large number practically deactivates the feature (3600 is about 1 day).
nvram set autoap_refreshnow="0"
If "1", during the next 'autoap_scanfreq' force a reloading of nvram variables and rescan for networks. This is handy if you modify a nvram variable and you don't want to wait to the next refreshdelay to take it into account. After recanning it is obviously automatically reset to '0'


AutoAP has an active project page on [1], where bugs are collected and development updates are made. It is important that you submit bugs to the sourceforge project page should you encounter any, as that is the only way we can be sure that the problem is addressed.

You can also download the standalone version of AutoAP, sync to svn and access documentation as it becomes more prevelant.


  • Project AutoAP on SourceForge site where you can download the stand-alone AutoAP script, or firmwares with AutoAP script built in.
  • Current development version of the stand-alone script on sourceforge (see Changelog). There is no sense in continuously updating the "latest version" information here, so please check the Sourceforge website for the latest version of the script.