- CPU Atheros AR9330
- RAM 32MB
- NAND 4MB
- Dimensions 74mm x 67mm x 22mm
- Power consumption 1.25W Max.
- Wireless router flashed with OpenWRT. This project based on TP-LINK TL-WR1043ND wireless router.
- USB audio adapter which supported by Linux. As shown in figure below is the USB sound audio that I'm using.
Lua Socekt must be use in order to call sleep function in milliseconds.
An example to install Lua Socket to OpenWRT
opkg install luasocket
An example to sleep 10 milliseconds
Lua can only sleep/wait in seconds (not milliseconds) without install Lua Socket. Code below shows the sleep funciton.
delay = delay or 1
local time_to = os.time() + delay
while os.time() < time_to do end
Example to sleep 5 seconds
- PHP require to install lighttpd,lighttpd-mod-cgi,lighttpd-mod-fastcgi,php5-cgi,php5-fastcgi,libsqlite3, installation is complicated & consume resources.
- ser2net/socat is very simple but did not support web service.
- Lua comes as a default in openWrt and support web service. The goodies is OpenWRT using Luci for web GUI and LuCI is an embedded rapid application development framework written in Lua.
- Arduino duemilanove connected to a TP-LINK TL-WR1043ND router which flashed with OpenWRT.
- Using 16 Channel Relay Arduino Controller for the Arduino sketch
If you are considering to test OpenWRT without a router or you don’t want to flash the router firmware over and over again. Here is the right place for you.
OpenWRT in VirtualBox is an image file run in VirtualBox. By the time I write this article, the VirtualBox & OpenWRT image version are Ver 4.1.20 and 10.03.1 respectively.
Samba is a free software re-implementation of the SMB/CIFS networking protocol, Samba provides file and print services for various Microsoft Windows clients.
First, this assumes that you already have OpenWRT installed. Read this article if you haven't upgrade firmware to OpenWRT.
Second, you must have a working USB flash drive attach to router. Read here for installing USB flash drive.
FTP is a method of transmitting or recieving files across the Internet and stands for File Transfer Protocol. This article guide you on how to enable FTP function on the OpenWRT router.
It is assumed that the router is flashed with OpenWRT. See this article if you haven't upgrade firmware to Openwrt.
Most of the time, I use both WinSCP (Windows Secure CoPy) & PuTTY together, especially when work with Openwrt and DD-Wrt. It is very troublesome to start each program individually. So I decided to integrate PuTTY into WinSCP.
WinSCP is an open source free SFTP client, SCP client, FTPS client and FTP client for Windows.
PuTTY is a free implementation of Telnet and SSH for Windows and Unix platforms.
I would suggest to download the portable version for both WinSCP & Putty. With the portable version, you can easily copy WinSCP & PuTTY from one computer to another computer without erase the settings.
Here is the link for partable WinSCP & Putty:
This tutorial show you how to install PHP on the TP-Link TL-WR1043ND router.
You can refer to my previous post http://ediy.com.my/index.php/blog/item/2-openwrt-on-tp-link-tl-wr1043nd-router to upgrade firmware to OpenWRT.
The Arduino is plug into the USB port of TP-LINK TL-WR1043ND allow the router to control the Arduino.
After upgrade router firmware to Openwrt, Login to it & change the password in order to enable SSH.
SSH to the Router
- Run PuTTy
- Enter 192.168.1.1 for Host Name (this is the default IP for Openwrt set in TL-WR1043ND)
- Change connection type to SSH
- Click on Open button
- Enter your router username (username is root if you didn't change it)
Enter your password