This article will tell you a simple way to login automatically to beam cable (Beam-Telecom) internet connection instead of using the web login manually. Not only that, I’ll also tell you how to do this auto-login through your router if you have one with a custom linux firmware. I took a beam cable connection a few days ago. The price is excellent and speeds are good but the only thing that bothered me was the web based login. You need to open up a browser and login through their online portal before you can access the internet. Now, if you don’t log off, then the login may persist even across PC/router reboots but many times it doesn’t. But in these times, it becomes a pain in the wrong place when I am just looking to play online on my PS3 or one of my various net-capable devices, scattered around the house, are trying to pull data and this forces me to open up my laptop just to login. Even for people who use the internet only on their PC, they might not be using the browser all the time and find it a hassle, minor one but still a hassle, to open a browser and login. Hence, I set out to find a way to do this automatically. (BTW, I’ll also be listing out how I came onto the solution in case you are in interested. If you are not, feel free to skip some paragraphs below to move to the solution)
wget <url> --post-data=<data>
So, by substituting the information that I got, this is the command that you need to execute on your PC (For linux/mac it is already installed generally and for windows, you will need to download from here)
wget http://18.104.22.168/newportal/Ajax.php --post-data="function=ExecuteLogin&user=YOURBEAMUSERNAME&pwd=YOURBEAMPASSWORD&remember=false×tamp=1271186686298"
Please remember to replace YOURBEAMUSERNAME and YOURBEAMPASSWORD with your actual username and password respectively. Also, please note that the above command is all one single line (it might appear in multiple lines in your browser).
So, everytime you need to login just run this command. Now, how to do this automatically? For linux, just put it inside a shell script for linux and set it to run automatically on bootup. For windows, paste the command in a text file, and save it as beam_login.bat and put it in your start up folder so that it runs everytime on boot. (You might want to put some delays in there as it might take some time to get connected to the network or you can query the network interface to run it when the network is up. Let me know if you want to know how to do this for your platform and I can help you).
So, this is for the PC, now how about if I need to use non-browser capable devices. This is easy if you have a router with a custom linux firmware (because they generally have wget installed or allow you to install it). I have an Asus wl-500w with oleg’s custom firmware installed and it was a piece of cake with it. I just created the following shell script
#!/bin/sh if [ -e Ajax.php ] then rm Ajax.php fi #Limit the number of retries to prevent the router from going into continuous loop num_retries=10 while [ $num_retries -gt 0 ] do wget http://22.214.171.124/newportal/Ajax.php --post-data="function=ExecuteLogin&user=YOURBEAMUSERNAME&pwd=YOURBEAMPASSWORD&remember=false×tamp=1271186686298" if [ -e Ajax.php ] then rm Ajax.php break else sleep 2s num_retries=`expr $num_retries - 1` fi done
Then I set it to run on boot and voila!! A tip for other users of any of the asus routers with oleg’s firmware (like wl-500g, wl-520gu, wl-500gp etc). The firmware has some scripts in the /local/sbin folder that are run at various times. I suggest you put the above code inside the post-firewall script. (Do not forget to run “flashfs save && flasfs commit && flashfs enable” to save your changes). Now, every time my router reboots, it automatically logs in to the connection :)
Hope I have been clear in the isntructions. If you are unclear about anything or need any help in implementing it for your specific platform, do let me know.