joblo: if you're going to throw the dead routers away, do you mind sending them my way? i can probably fix them, and could really use some extra routers to develop with. if not no worries at all
wonder if you can block from using certin mac's that dont have a viable internt conection. _________________ WRT54G,GS v1.1, V2, V3 V4, V5
WR850G V2, V3
Fonera 2100
This includes autoap in the /bin directory, you can simply login to ssh and run 'autoap'.
Notes:
This is still a bit buggy, sometimes it needs to be run twice to get the expected results. I'll have a fix for this shortly. Also, the router MUST be in client (or WDS) mode for this to work (The script does not currently change wl_mode to 'sta' or 'wds', this is also slated for inclusion soon). Make sure you're using a LAN ip that doesn't conflict with the AP you're trying to join. If you're using 192.168.1.1 as your lan ip, chances are you'll run into problems. Try using 10.0.1.1 to eliminate any potential conflicts you might have.
I tested this firmware (using dd-wrt_v23sp2_autoap-generic.bin) on my wrt54gl. I have not tested any of the other model builds.
As usual, I take no responsibility for bricking your router. I wish I could, but I can't . If you're worried about bricking your router, just use the script manually.
I'll have more updates soon.
-JohnnyPrimus
Last edited by JohnnyPrimus on Sat Nov 11, 2006 14:47; edited 1 time in total
Spent a bit of time bug fixing tonight, the latest version should not only alleviate all bugs mentioned so far, but should also show you a lot more than you've been seeing. I tested this moving around my apt. complex and it worked quite well.
To run the script, just log in via ssh and type 'autoap'. It'll work a lot better than it has previous runs. The only output you'll see on the screen is the open networks found. To view the full log output, point your web browser at http://10.0.0.1/autoap.html (replacing 10.0.0.1 with your own routers IP...obviously). The log will auto refresh every five seconds.
The script will no longer disconnect or start a new scan if the current SSID is functioning well. This will save from frequent disconnects.
To have this launch at boot and continue running, just add '/bin/autoap' to your rc_startup.
THE FOLLOWING IS THE FIRST WORKING TUTORIAL ON THE SUBJECT AND THE REST BUILDS FROM THIS STARTING POINT.... (Go to the wiki if you want to start right out with the latest version.. This version and config is for a starting point for gaining understanding and getting a repeater working right away before you delve into the other complexities possible)
DO NOT TRY TO LOAD THIS CONFIG FILE INTO V24 OR IT WILL LOSE THE PASSWORD AND LOCK YOU OUT OF THE ROUTER... Factory reset will get you back in, but you will have lost the config file.. This config file is for SP2 only...
Download the following file and unzip it.. Choose the firmware version for your specific device and method of flashing.. Make sure you know what you are doing with this or go read the wiki on how to flash your specific device.. They are not all the same, even amongst WRT54G's of various revisions....
3) Log into the web interface of the router and click on ADMINISTRATION / BACKUP....
4) In the "Restore Configuration" section, click on BROWSE and navigate to the autoap_client_nvrambackup.bin file that you just downloaded and select it... Click the RESTORE button to load the configuration file...
5) Reboot the router...
6) Disable the LAN adapter on your pc and re-enable it again to refresh your IP address to the new subnet of the router.. It will end up on 192.168.10.X
7) Log back into the router at http://192.168.10.1
username: root
password: admin
8 ) Click on ADMINISTRATION / COMMANDS
9) Enter the following command into the text box...
/bin/autoap
10) Click on SAVE STARTUP....
11) Power down reset the router and power back up again...
12) Log back into the router again with one browser window... Leave it open on the sysinfo page..
14) It takes a minute for the html page to start showing data and you have to hit it a couple of times if you are trying to access it before the whole script has really had a chance to get going.. but it will begin to list data on what it is doing, which will be self explanatory....
You will see the sysinfo page update with the signal strength and the WAN IP addresses of the AP's it is associating with.. I have left it runnign long enough to see it switch around to different connections successfully...
1) SSID FILTER: You can tell the script to exclude specific ssid's.. This ssid cannot have any spaces in it, as the list of ssid's to exclude is seperated by spaces... So make sure your downlink AP's ssid does not have any spaces in it...
How to use this command:
- Click on ADMINISTRATION / COMMANDS...
- Enter the following command in the text box:
nvram set aap_ssidfilter="dd-wrt mshome linksys someNetwork"
nvram commit
- Click on RUN COMMANDS....
- Reboot the router... these settings will stay in flash ram permanantly..
That is a list of 4 ssid's to exclude, all seperated by a space... I think you can add as many as you want...
There are two more commands that I currently know of:
nvram set autoap_scanfreq="90" (90 is the default)
This is timer that tells the script how long it should wait in between scanning to check to see if it has valid signal and possibly start the scan process over.. If the connection is still valid, it will just stay connected to it...
nvram set autoap_aplimit="5" (4 is the default)
This is the number of devices that the script will track and cycle through and keep attempting to connect with..
That should have you all up and running with this, and if not, then feel free to ask any questions you might have.. I will take care of as much of that as I can and let JP handle the "super smart" stuff....
I hope this helps you guys out if you were not getting what to do with this.... This is my current summary of this to date.. I will edit this and make it the sudo wiki as we continue.. I will also edit my first posting in this thread and point people to this answer to cut them to the chase...
Take care and I will return.. I want someone to give this tutorial a try and tell me what I can improve or word better...
Last edited by Cool Dude on Wed Jan 03, 2007 8:50; edited 4 times in total
Having been watching this thread for a while... Great work JP! It's nice to see how people contribute and collaborate online to the "open" community! I've been a "long-time reader. first time writer" on this forum. This is exciting to say the least. Thanks to BrainSlayer for hosting this forum where these ideas are brought about by people like Chuck. _________________ WRT54G v.2, WRT54GS v.5, WRT54GS v.4
Johnny, just wondering at what makes the script determine when to start "searching" for a new AP? Power level of the AP? Lost IP address through pinging or what?
Forgive me if I'm phrasing doesn't make sense. BTW, I've successfully flashed my WRT54G v.2 with dd-wrt_v23sp2_autoap-wrt54gs and it automatically picked up my other unsecured Linksys in my house for a AP. Didn't have to type anything! Also was wondering if you will be tinkering with the v.24 beta in the future? Great Work!!
Thanks, Louis _________________ WRT54G v.2, WRT54GS v.5, WRT54GS v.4
Louis, the scanning is controlled by a timer. You can set the timer via 'nvram set autoap_scanfreq="90" ', where 90 is the amount of time in seconds you want to wait between scans. If you leave it at the default 60, then every 60 seconds the script checks whether or not you're still connect to your AP. If you are, it goes back to sleep. If not, it scans for new AP's it can connect to.
I read Chuck's post earlier and meant to respond. The next version will wait longer for the DHCP transaction to complete. It's a pretty easy modification. I'll actually make it a setting you can control. That should be out shortly....
whether or not it goes into official firmware is brainslayer's call. i've been toying with compiling v24 w/ autoap> once it's out for broadcom hardware, if brainslayer's guys haven't coded something better i'll definitely include the script.
Posted: Sun Nov 12, 2006 6:48 Post subject: Excellent Script
Hi Guys,
Just read the thread and decided to give it a try. Script works excellent!!! Easy to use and excellent instructions Chuck D. I hope this is added to V24, because I can see a lot of people wanting this feature. I will continue to BETA test it,and if I see any problems I'll report back here. Again....GREAT JOB guys!
ps CHUCK
"I want someone to give this tutorial a try and tell me what I can improve or word better"
Worked great for me! Didn't see any need for improvement.
***EDIT***
Chuck, one thing you might want to do is edit the BAK file you have for general download. Some of your personal settings are still set up in the file like the the XMIT POWER option. I would recommend rolling those settings back to a default value.