Coova v1 Fix Captive Portal Self Registration

Iv’e just spent the afternoon testing, debugging and pulling my hair out after discovering what looked like a promising firmware upgrade to a Linksys 54GL router to enable a locally managed captive portal for a clients restaurant.

The interesting thing about CoovaAP was that I could easily manage a captive portal on the device itself, as well as use custom templates to make the sign in portal as seamless as possible using better web design techniques (lets just say responsive web design) so that I’m happy with the process.

Installing the firmware could not be easier. Configuring it was a doddle too. A simple interface which somewhat guides you through the process.
It wasn’t until I cam to test out the front end when the difficulties came. I selected the Self Registration option for the HotSpot, went through to register and I got a blank page.
After some Googling I wasn’t the only one it turns out. Some coding error’s within a file meant that a simple check wasn’t being achieved, or the variables were updated from a previous version of the firmware.

When I finally managed to log into the router (SSH using root and the IP address) found the file, I made the change and attempted at registering again.

Again I was stumped. An error message relating to the username already being in use. I knew this wasn’t the case, and after another bout of Googling I discovered yet again this seemed to be a common occurrence.

I devoured the code, finding the appropriate line tried to understand what was going on.

It’s evident that the code has faults all over it.

Firstly, you need to change register.chi and the following lines:

21: if [ "$HS_REG_MODE" = "self" ]; then
36: if [ "$HS_UAMAAAURL" = "" ]; then
59: [ -z "$errmsg" -a "$HS_REG_MODE" = "self" ] && {

When you have changed those lines to the above you’ll be good to go.

I’m now a little less stressed. Now onto the coding of the templates!

Posted On: Thursday, August 13th, 2015 @ 6:54 pm by Ian Tearle

1 Comment

Ria says:

How did you edit the register.chi file? thank you

Posted On: Friday, May 19th, 2017 @ 12:10 am

Leave a comment

Be kind

If you would like to discuss anything about this post, please be polite and add your comments below.



No HTML is allowed. All links, and new lines will be automagically converted to HTML for you.
Notice to spammers, all links will be sanitized with rel="nofollow".

Contact Me

Get In Touch

If you would like to discuss anything about your next project please drop me a line.



Projects start at £99.00 per month
We normally book 2–3 months in advance.


No matter how small your project is, or if the prices above scare you, please do get in touch, I shall always listen and will advise freely alternative ideas or solutions. If you are a charity, let's talk!

Find Me On