Home automation server with router

 by mrx23dot
Featured

Step 3: Configure the Router

untitled.PNG
Install the Linux based OpenWRT firmware on the router.
The TL-WR741ND instructions can be found here:
http://wiki.openwrt.org/toh/tp-link/tl-wr741nd

 If you are stuck, start here: http://openwrt.org

After you have a working SSH connection you can proceed.

Because of the router (by default) runs the web admin page on the port 80, we need to add a secondary port to serve our custom web site. For that, we need to configure the uhttpd (web server application) configuration file.

Download WinSCP, to simply do this through SSH.
http://winscp.net/download/winscp429.zip

Set up a new connection:
Host name: normally 192.168.1.1 (by default)
Port: 22
User name: root
Password: what you gave after installation
File protocol: SCP

Find this file: /etc/config/uhttpd

Copy the following into it:

config 'uhttpd' 'secondary'
option 'listen_http' '81'
option 'home' '/HomeAutomation/www'
option 'cgi_prefix' '/cgi-bin'
option 'script_timeout' '60'
option 'network_timeout' '30'

And save it.
 
Remove these adsRemove these ads by Signing Up
edisonchung says: Mar 8, 2012. 10:37 PM
I have downloaded WinSCP and type followed what you told :
" Download WinSCP, to simply do this through SSH.
http://winscp.net/download/winscp429.zip

Set up a new connection:
Host name: normally 192.168.1.1 (by default)
Port: 22
User name: root
Password: what you gave after installation
File protocol: SCP "

but what do you mean by " Password: what you gave after installation " ?
do u mean the installation of OpenWRT firmware on the router?
mrx23dot (author) in reply to edisonchungMar 9, 2012. 3:20 PM
Here is a tutorial for that:
http://wiki.openwrt.org/doc/howto/firstlogin
edisonchung in reply to mrx23dotMar 10, 2012. 9:00 AM
Thx!!! But I come across another problem ><

After the first login, I changed my password then I login again using:

ssh root@192.168.1.1

I tried to install the web UI using Luci due to I'm using MacOS,
but when I tried to update opkg with the command :

opkg update

It failed(as shown in the image attached), it seems like it has no internet connection,
but in fact, I'm able to browse websites on my browser.
Hope you could help me with this and sorry for my ignorance.
Screen shot 2012-03-11 at 12.51.41 AM.png
mrx23dot (author) in reply to edisonchungMar 11, 2012. 8:32 AM
hi,
instead of the bleeding edge, download the latest: Backfire 10.03.1 final firmware which already has web GUI in it.
This will save you a lot of time.

https://openwrt.org/
Eddy Dean says: Aug 21, 2011. 3:42 AM
looks great, but, how could this be done without WINSCP (as this does not work on my computer)?
mrx23dot (author) in reply to Eddy DeanAug 21, 2011. 4:19 AM
hi,

you can do it with PUTTY:
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
but you need to know linux command line, because it doesn't have any GUI.

WINSCP should work easily on any PC
http://tinyurl.com/3ft8u62
maybe try older versions, or ask for support.

cheers,
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!