admin

admin

Friday, 21 September 2012 10:45

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)

 

 

A few ways to send message to serial port of router which flash with OpenWRT. PHP;ser2net; socat; Lua and etc.
  • 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.
Prerequisite
Thursday, 13 September 2012 15:46

Softaculous AMPPS Web Server

I'm testing Softaculous AMPPS for my web server, by far it is working very well.
 
Web Server software that I had tested
WampServer is my first web server software, I change to EasyPHP until I replace my notebook.

EasyPHP: http://ediy.com.my/index.php/blog/item/14-easyphp-web-server-winxp
I use EasyPHP since WampServer is not working on my Toshiba notebook.
 
AppServ: http://ediy.com.my/index.php/blog/item/21-appserv-seb-server
I didn't use AppServ for my projects, because the PHP version is either too old or too new that it is not suitable for my website.

Softaculous AMPPS: http://www.ampps.com/
Finally I use AMMPS since EasyPHP did not display pictures for most of the Joomla slide extensions. 
Saturday, 08 September 2012 19:20

D-LINK DNS-320 Firmware Upgrade from 2.00 to 2.02

I read a post about the D-LINK DNS-320 firmware version. It shows that there is new version released from D-LINK website. So I decided to give a try.
 
Download
Make sure backup all data before firmware upgrade. After upgrade the firmware, the DNS-320 performance become very slow. I had to re-format the HDD and install software again in order to solve the problem.
Friday, 07 September 2012 23:01

OpenWRT in Client Mode

Client mode uses its wireless connection as the WAN interface, and shares the internet connection only to the LAN ports. It is not seen as an access point by laptops or other computers scanning for AP's and does not accept wireless connections from client devices.
 
As shown in figure below, the new SSID (wwan) cannot be seen by other client devices nor accept wireless connection from client devices. Therefore the client devices (Notebook3 and Notebook4) must connect to the Wifi router using network cable.
Monday, 03 September 2012 11:04

Fun_plug 0.7 installing Packages

Additional fun_plug packages (eg. LAMP, Transmission client, etc) can be install/uninstall after installing fun_plug. Article below show you how to install additional packages to fun_plug 0.7. You should read this article if you want to know more about fun_plug.
 
Pre-installation Requirements
  • D-LINK DNS-320 ShareCenter.
  • A working fun_plug 0.7 installing on D-LINK DNS-320 ShareCenter.
Sunday, 02 September 2012 17:49

Fun_plug 0.7 on D-LINK DNS-320 ShareCenter

This article provide the step to install fun_plug 0.7 on D-LINK DNS-320 ShareCenter. Fun_plug allows user to start additional programs and tools on the NAS.
 
Pre-installation Requirements
  • D-LINK DNS-320 ShareCenter
  • Hard Disk Configure as Volume_1: Standard as shown in figure below
Sunday, 02 September 2012 14:52

Connecting ULN2803 Line Driver to Arduino

If you are using Arduino (or any other TTL device) to control 4 channel relays or more, I would suggest to use ULN2803 Line Driver instead of Transistors or FETs. You can use ULN2003 which is much more cheaper if you plan to use not more than 7 channel relays.

The ULN2803 Integrated Circuit (IC) is a "Eight-way Line Driver". It allows you to interface TTL signals (5v) with higher voltage/current (50V/500ma) loads.

As shown in figure 1 and figure 2, an Arduino is control 8 relays, one using ULN2803 line driver and the other one using transistors, both circuit are equivalent.

This is an article to guide you on how to use a webcam attach to a router and act as an IP camera. At the end of the article, it show you how to adding authentication to the project.
 
 Prerequisites
Saturday, 25 August 2012 12:49

TP-LINK TL-WR1043ND router as a Print Server

This article shows the step on how to setup the TP-LINK TL-WR1043 router as a print server. The USB printer is connected to the USB port of router in order to support print sharing from network.
Back to Top