Flashing OpenWRT to TP-Link TL-MR3020 3G/4G Wireless N Router
- CPU Atheros AR9330
- RAM 32MB
- NAND 4MB
- Dimensions 74mm x 67mm x 22mm
- Power consumption 1.25W Max.
USB Audio Adapter work with OpenWRT
- 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.
Wireless Router Home Automation
Lua sleep function in milliseconds
Lua Socekt must be use in order to call sleep function in milliseconds.
An example to install Lua Socket to OpenWRT
opkg update
opkg install luasocket
|
An example to sleep 10 milliseconds
require "socket"
socket.sleep(0.010)
|
Lua can only sleep/wait in seconds (not milliseconds) without install Lua Socket. Code below shows the sleep funciton.
function delay_s(delay)
delay = delay or 1
local time_to = os.time() + delay while os.time() < time_to do end end
|
Example to sleep 5 seconds
delay_s(5) |
Sending Message to Serial Port of Router using Lua
- 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
OpenWRT in Client Mode
TP-LINK TL-WR1043ND Router + Web Cam = IP Cam
- A working OpenWRT on TP-LINK TL-WR1043ND Router
- Web Camera. I'm using Microsoft LifeCam HD-5000
TP-LINK TL-WR1043ND router as a Print Server
OpenWRT in VirtualBox
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.
TP-LINK TL-WR1043ND router as a Samba File Server
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.