Can’t set WPA-PSK on DI-524 D-Link Router?
[UPDATE] Without getting into much more detail about the reasons, please try using Internet Explorer and it will probably work. If you are keen on understanding why it fails, you can read on below. The gist is that there is a problem with the code that IE ignores. Thanks to the people who provided this feedback/suggestion in comments.
I have the D-Link DI-524 wireless router at home and it has worked wonderfully for me. I used to use MAC filters to block intruders from my network. Recently, I got tired of keeping the MAC list and decided to switch to using encryption. After doing a quick comparison, I decided to go with WPA-PSK. This is when I ran into an interesting roadblock.
When I chose WPA-PSK, provided the passphrase, and clicked on the Apply button nothing would happen. Clearly, the form wasn’t being submitted. So did a View Source on the page and tracked down what was happening. For WPA-PSK, it was calling a Javascript function to do a check on the key (passphrase) before submitting the form. Within this precheck_key function it was calling another function that didn’t exist! So there it was, a pre-check that would never succeed and the form won’t submit. So what do you do? Actually, the resolution is not that difficult.
Save the page locally as an HTML page. Edit the page to do the following:
- Comment out the call to the non-existing function. Replace it with
return true;as followsfunction precheck_key(){
var auth = get_by_id("auth");
if(auth.selectedIndex == 0){
return true;
} else {
//COMMENT OUT: return check_key(); AND ADD THE FOLLOWING LINE
return true;
}
} - My router’s IP is
192.168.0.1, so I prefixedhttp://192.168.0.1/to the form’sactionattribute and to the Javascript file being included. You can do it to theimgtags’srcattribute as well, though that is not critical. You just need to remember the position of theApplybutton so that you can click on it.<script language="JavaScript" src="http://192.168.0.1/public.js"></script>and<form method=post action="http://192.168.0.1/h_wireless.cgi" name="form1" id="form1"> - Save the changes.
That’s pretty much it. Load the HTML file in a browser. The Javascript would interact with the router to show the current settings. You can now select WPA-PSK, supply the passphrase, and click on Apply. This problem may apply to the other encryption settings as well, but the fix remains the same.
If you use Firefox, you can use the Firebug add-on to edit the page in the browser and make the change (only Step 1 needed). You don’t need to save the file, edit, and run in three steps.
By the way, I also did a firmware upgrade to see if they have fixed it in a newer version but the problem exists in version 1.23 as well.
UPDATE:
On popular request I am posting My Edited Wireless Page (Right-click > Save Link As). This is an HTML file but named as PDF for technical reasons. If you want to try it, save as or rename as h_wireless.html on your local drive (Note that left-clicking on the link may try to open it in a PDF Viewing application and that will fail). Absolutely no liability can be assumed for using this file – you may use it only at your own risk.
Before you can use this file you may need to edit this file if your router IP is not 192.168.0.1. If so, open this file in a text editor, search and replace 192.168.0.1 with the IP address of your router and save the file.
Now log into your router (for example, by going to http://192.168.0.1 in a browser). Then open this file in the same browser window. Change the wireless security and click on Apply.
That should be it!
Bravo man – bravo! You’re the only person on the Internet as far as I can tell who’s figured this out. I never had this problem with my revision A 524 and I just upgraded the firmware tonight to 1.23 and this problem came up. It was driving me nuts. I was about to toss the router.
Great work figuring this out, seriously.
You my friend are a genius!
All I wanted to do was change my passkey but I only managed to disable all security on my router…
I tried from a windows, mac and linux box before realizing that it was beyond me. Hitting the enter key really hard didn’t work either.
Thanks for this post, it saved me from the darkside.
The firmware v1.23 didn’t help me either.
Hey, I have had the same problem. Although I am not as savvy about this stuff, is it possible for you to post a copy of the working html file or send it to me via email? Sebron@gmail.com
I have posted my edited file with instructions about using it. Hope that helps.
Thanks for the file and the post. Seems like a glaring oversight by D-link. I imagine your page will get a nice boost in hits for finding the answer to this!
Wow… I can’t give you enough high-fives. What a job! I suppose you mentioned this to DLink and got ignored? Nice QC on their part… THANK YOU.
I actually didn’t call their support. Seeing the number of hits for this post though I believe that someone must have. In general, I have found tech support to be designed for non-technical folks – they usually end up testing my patience. So I try to fix things myself first. In this case, it worked so I didn’t spend the time to call them – rather I spent that time to write up this post.
What a relief…this was starting to bug me immensely as I’m trying to re-work my network specifics. I didn’t dream I’d find the answer so quickly and succinctly. Thank you!
Turns out this works fine in IE on windows, and, oddly, Camino on my mac.
However, my DI-524 is rebooting about every 10-20 minutes using WPA-PSK. . . I switched to G-only mode, and still have the problem. I’m about to downgrade to WEP or buy a new router. Sigh.
Thank the lord! this was driving me crazy…
Thanks for going through the effort to post a fix for whatever lovely folks at d-link didn’t bother to properly QA their code. Since this unit is EOL (and my linksys just snuffed it, this was my spare), I was going round the bend.
Thank you SO MUCH for this! I had to replace my router with this DI-524, and I was getting frustrated with the problems it has with wireless security.
Your solution worked like a charm
.
Dude…TEACH ME! Nice job man!
wow. you are indeed a genius sir. thanks.
how do i edit the lines in firebug? i find the line i need to edit, but that is under the inspect button. once i click edit it takes me to something else.
I haven’t actually tried to use Firebug. You can use the solution posted here.
i tried using the solution here but wasn’t able to get it to work.
i tried downloading and using your settings, and that worked, but the network ran extremely slow, 1mbps, so it was worthless. i also saw that there was a lot of junk in there for battle.net, and other stuff, maybe that was causing the problem, because you also had a lot of personal settings.
It seems that there is a misunderstanding.
The file shared here is a simple form for setting the WPA security. There are no personal settings on that page. For example, open the downloaded file in notepad and search for “battle.net” and you won’t find it there.
Once you click anywhere on that page, everything you get is coming from your router. So all the “personal settings” that you saw were actually coming from your router.
Savior, I’ll worship you everyday…
thanks, man!
-When you say “save the page locally,” does that mean you can save it anywhere on the C drive? Can I save it on the desktop, for instance?
Yes, you can.
I just bought the router and noticed the bug. It was the last item that was in stock at Media Markt (Holland), price 25 euro.
It’s a serious thing as the firmware dates already from a while ago, and so does D-link ignore the quality of their products.
However, another option to set the WPA-PSK key is to use the wizzard which is included on the installation cd that comes with the product.
thanks,
Michel
I have tested the router, but its quality is not as good as I expected. Its radio signal is weak, it even doesn’t maintain the 54Mb if it’s just a meter away from my wifi usb stick.
Another problem is that it doesn’t allow me to use my NDAS external harddisk. It just doesn’t appear on my laptop, while via the network it work.
for sale again…
Excellent work, my friend. It’s a shame Dlink has discontinued this product therefore this issue will most likely never be officially fixed.
Again, great work
Thanks a lot.
I LOVE YOU DOQUENT! I’ve spent a couple days dealing with this, reluctant to mail it in for replacement. It’s been driving me nuts. You saved me money on shipping and the inconvenience of being without wireless – oh yeah, and my sanity too!
TY very much.
Thanks, I have yet to try it on mine. I’m wondering if this problem shows up in other revisions of the router (mine is Rev C I think). I’ve been having trouble with WPA-PSK security though, every 10-20 minutes my wireless clients cannot connect to the router or each other for about 1-2 minutes. I’ll be trying a firmware upgrade tomorrow (3.02 to 3.23). Thanks again!
I COULD KISS YOU! This was driving me Nuts. I ended up just using Internet Explorer instead of Mozilla Firefox as someone else suggested. Thanks for the post man.
Thank you so much!!! I was about to throw my darn router out the window.. thank goodness for people that know more about computers than me. Thanks a million!
You are awesome.
Or, you could just open up 192.168.0.1 in internet explorer and the apply button works just fine.
Jamal,
Thanks for the suggestion. If it does work with IE that may save a lot of trouble for the folks encountering this issue.
To be honest, I am not sure if I specifically tried IE, but I can verify that later for my hardware/firmware combination. If it does work with IE, that may pose a curious question about the IE Javascript engine – that means IE would assume true as the result from a call to a non-existent function!
clap!!! clap!!! clap!!
Thxs!
THANK YOU!!!!
Nice work
Thanks so much! This was driving me crazy too. What a simple fix to use Internet Explorer instead of Firefox. DLink should sent you a reward!
I told my son–Man this guy is sharp! Thanks for taking the time to post your fix. Worked like a charm.
Nice work – and thank you for providing the information! Works like a charm!!
Nicely done. I was about to email Dlink tech support until I found your post. It’s nice to see people catching the error of a major company and posting a fix before the company (Dlink has yet to update this problem in two years).
Perfect. Very elegant solution!!
Thanks! Worked perfectly. Wish I would have kept reading to see you had the file ready for download instead of save, search, replace!
Just found this, and I finally got it to work with camino on my macbook. Nothing else worked, so thank you so much!
Wow…let the props keep coming. doquent > d-link. Thanks!
Thought I was home free when the firmware upgrade worked from Ubuntu 8.04 and Firefox. Then the WPA-PSK wouldn’t set. Thanks so much for documenting the fix. It worked great!
thanks dude…just used IE. good job.
I was getting a 404 error for the upgrade.cgi file when trying to apply the Firmware update. Ended up here, read your update, and figured I’d try IE (versus Chrome). Worked great. Perhaps it’s best to just default to IE when administrating this router. Thanks for the post.
Thumbs UP! The post date was dec 17′07; and today it is Jan 11′09 – your cross platform + cross browser solution lives on…. Bravo!
Two sets of morons: IE JS team @ MS & DI 524 team @ DLink. And the end user suffers!!
Thanks for the help! ( Never expected to find an answer this quickly ).
when I noticed a google pop-up notification flash up on the mouse pointer every time the router tried to restart (Opening a new blank window). I selected always allow pop ups from the google tool bar for the routers ip address re-tried it and BINGO! I have WPA/PSK security again.
Just to let you know, although I’m a complete no hoper with Techy stuff, I seem to have been having this exact problem, but if it is the same I fixed it in a much simpler way :-
I was attempting your fix without much success (My fault, not yours, I didn’t understand most of the instructions)
‘course, it’s probably because I had a much simpler problem!
I believe that you were facing a different issue. Thanks for sharing with everyone.
Thank you for this solution. Worked well.
If I was that way inclined, I’d give you a big wet sloppy kiss!
Works perfectly. Thanks.
any word from d-link on patching this or a firmware update or something to fix this problem? can’t believe they let something like this slip by and still haven’t done anything to fix it…
I’d been breaking my head over this all morning! I could tell the form wasn’t being submitted but didn’t know how to fix it. Thank you so very much!
I was trying to set WPA-PSK using Google Chrome, and it was the only unresponsive form I found in the router!
Thank you and Google very much,
D.Shak
Wow, I felt like I was crazy when I could never submit the form to change to WPA. I had assumed my DI-524 was a rare lemon, or it had gone bad due to age. Many thanks for letting saving me the cost of buying a new router! You should add a PayPal Donation button on this page. Seriously!
And shame on D-Link for never addressing this problem with new firmware, or at least a company support page dedicated to a workaround (such as this page).
Thanks for the kind words. I am glad this information helped you.
I’m trying to switch from WPA-PSK to WEP since the router likes to randomly reboot a lot. I downloaded the file you provided (thanks!) but when I switch the WEP encryption from 64 to 128, it reloads the page from the router, thus making the submit button worthless again.
Any ideas?
Yes, it’s not that difficult. As noted above, you could use IE and it should work without any changes. If you absolutely won’t use IE, then do this. When the page reloads from router for 128 bits save it as on your PC and follow the instructions listed in the post above. It’s the same set of changes, just performed for a different page.
Oops, just have tried a few more things before commenting. Using the router admin page, I changed the setting to WEP/128, viewed the source and then made the modifications you suggested on a local copy of the HTML.
That worked!
I’ve been having problems trying to set up the passwords on my di 524. everytime i try to save the settings it will automatically reset to default; for administrator password and for WPA settings. Could you help me?
I haven’t run into the password change issue. However, try using Internet Explorer for this purpose and hopefully both of your issues will be resolved. If that doesn’t work you could try upgrading the firmware.
WEP sucks. It can be cracked by anyone in 5 minutes. Use WPA2, or WPA if there is no WPA2 option.
Your ‘My Edited Wireless page’ doesn’t seem to work for me. After saving it in .html and opening it in notepad, theres a message in notepad which says ‘The content of this file is dangerous’.
Could you help me?
You could try one of two things: 1. Just use Internet Explorer for router administration, then you won’t need to do anything with the file. 2. Use another text editor to edit the file.
Doquent. I did both of those things but a message whcih says ‘The content of this file is dangerous’ is always there.
When you use IE, you don’t need to use this file. Just go to the router page and it should work.
Doquent. Thanks for the help but its still not working. This is what im doing.
I go into IE, enter my routers ip address (http://192.168.0.1/), enter my pw for admin, go to wirless, change the security to WPA-PSK, enter a preshare key and then i press apply and it does nothing.
I also have your Edited wireless page on my desktop.
My mistake from above, routers ip address (192.168.0.1)