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
- dns320_FW-202 dated 2011/11/23: ftp://ftp.dlink.com/Multimedia/dns320/Firmware/
- You can also download the beta version dated 2012/03/30, but I didn't test it.
- D-LINK DNS-320 ShareCenter
- Hard Disk Configure as Volume_1: Standard as shown in figure below
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.