Wi Fi controlled Remote Control Car without microcontroller

这是一个具有摄像功能的Wi-Fi无线遥控小车,设计独特,它使用了一个无线路由器,无需外加微控制器亦可以通过电机驱动器进行遥控小车。

 

Published in 电子与电脑
Tuesday, 20 October 2015 22:02

OpenWrt: Control LED manually

Control LED manually

Due to the limited GPIO availability on the wireless router, you may want use the router LED pin to provides a few more GPIOs. This describes how to use the LED pin on a wireless router as binary outputs. 

Published in Tutorials

Wi Fi controlled Remote Control Car without microcontroller

This is a Wi-Fi controlled remote control car with camera that can be driven over the internet. The RC car is very unique since it's using a wireless router and eliminate the need of a microcontroller.

Published in Projects

2 wheel motor library for Lua running on wireless route

This is a motor library for Lua running on wireless router which flashed with OpenWrt firmware. It allows a wireless router control the motors without using micro-controller. This library works on any dual-full-bridge driver such as L298.

Each motor require two GPIOs for controlling, therefore 2 motors will use up 4 GPIOs. Most of the wireless router may not have enough GPIO to control the motors, but you can use other pin on the router such as the LED pin, this require to unload the leds_gpio module.

Published in Blog
Sunday, 20 September 2015 22:15

Compiling OpenWrt from source

Compiling OpenWrt from source

To compile OpenWrt from source, you need a computer running Linux such as Ubuntu. If you are like me and don't have a Linux computer, you can still use your Windows computer to compile OpenWrt.

In order to run Linux on a Windows, you must install virtual machine on you computer. Virtual machines allow you to run any operating system in a window on your desktop, I'm using the free VirtualBox for my case, please read here for details.

Published in Tutorials

Lua ShiftOut A 74HC595 Shift Register Library for Lua

I want to built a wifi car without using micro contoller, due to the limited GPIO availability on the wireless router, a 74HC595 Shift Register is needed to expand its outputs.

This is a 74HC595 Shift Register library for Lua running on wireless router flashed with OpenWRT, it may run in any linux-based embedded system. It can be used to shift out data from either the most (i.e. the leftmost) or least (rightmost) significant bit.

Published in Blog

GPIO Read Write Functions for Lua

This is a very simple GPIO read/write functions for Lua running on linux-based embedded system, it is based on Arduino digital input/output syntax.

Only four functions are available: pinMode, digitalWrite, digitalRead & delay

Update: Added pin_direction_status() function on 16 Oct 2015

Published in Blog

Setting up 3G network on Openwrt Barrier Breaker

opkg update
opkg install comgt kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan usb-modeswitch
opkg install luci-proto-3g #optional, this is for 3G device configuration support in Luci
/etc/init.d/usbmode enable

Insert 3G dongle and restart router.

Append to following line to /etc/config/network configuration file. Here is the settings for setup Maxis 3G network.

config interface 'wan'
option proto '3g'
option apn 'unet'
option username 'maxis'
option password 'wap'
option device '/dev/ttyUSB0'
option service 'utms'

Restart the router.

Published in Tutorials

Ubidots real time data monitoring

In my projects I needed a tool to monitor data in real time, the data is captured by a microcontroller and uploaded to the web using a wireless router. Initially I was trying to use yeelink since it is in chinese langguage and yet I'm a Malaysian Chinese.

One month ago, I have tried with Ubidots, there were a few things that caught my eye.

Published in Projects
Sunday, 17 May 2015 10:53

BASH Dropbox Uploader on OpenWRT

BASH Dropbox uploader on OpenWRT

This guide is to provide detailed information on how install BASH Dropbox Uploader to a wireless router flashed with OpenWRT. Dropbox Uploader is a BASH script written by Andred Fabriz that allows you to upload, download, delete files (and more) from Dropbox.

Published in Blog
Monday, 04 May 2015 20:00

Recover bricked TL-MR3020

If your TL-MR3020 router is bricked with the following symptoms, most likely you can use this method to recover it.

  1. Ping the router without problem
  2. Telnet connection failed
  3. SSH connection failed

 

Solution:

  1. Put the router switch to AP mode
  2. Turn on the router power
  3. Push and hold the "WPS" button
  4. When the WPS Led flash slowly, switch on AP mode to 3G mode. The LED should flash quicky.

Now, you can Telnet to router

 

Erase the root data

Login to the router via telnet and enter the following command. Most likely your router is now recovered. 

mtd -r erase rootfs_data

Continue following procedures if it is still not working.

 

Copy firmware to router

  • Login to router via telnet and change the password in order to enable SSH
passwd
  • Copy the OpenWRT firmware to the router /tmp folder. I personally like and use WinSCP.

 

Upload the firmware to router

SSH to router and write the firmware to router. Where code.bin is your OpenWRT firmware file. 

mtd -r write code.bin firmware

Reboot the router and your router should be working now. If all the above methods is not working for you, then you should go for Serial Console method to recover the bricked router.

Published in Tutorials

How to increase storage on TP Link TL MR3020 with

The TP-Link TL-MR3020 N150 3G/4G Travel Router is a very small device with a size of 74mm x 67mm x 22mm, it has only 4MB flash and 32MB memory. The router have about 428KB (67%) space available after installing OpenWRT Barrier Breaker 14.07, you may encounter shortage of storage when installing certain extensions due to limited of router space. 

By employing OpenWrt's extroot, you can expand the storage capacity of your root file system using the additional space of an added storage device.

Published in Blog

I own a TP-Link TL-WR1043 V2.1 wireless router, I would like to test if it is able to run on OpenWRT or DD-WRT. it is first tested on OpenWRT, DD-WRT later, so far it has been working flawlessly for me.

 

About TP-Link TL-WR1043 V2.1 Wireless Router
TP-Link TL-WR1043 V2.1 is a 300Mbps Wireless N Gigabit Router, it has more memory (64MB) compared with the TL-WR1043 V1.x. Here is the comparison:

HW Version

CPU

Ram

Flash

Network

Gigabit

USB

Serial

JTag

1.x

Atheros  [email protected]

32MB

8MB

4x1

Yes

Yes

Yes

Yes

2.x

Atheros[email protected] 64MB

64MB

8MB

4x1

Yes

Yes

Yes

No

Published in Blog

此教程使用一个TP-Link TL-MR3020 3G/4G无线路由器来打造简单的无线广告机。目标是提供一个免费热点(hostpot)让公众无线上纲同时弹出hostpot提供者的广告(称之为Splash page 或者Landing page)。

TP-Link TL-MR3020的厂家固件(Firmware)功能有限,不能安装第三方软件包,因此,固件必须升级至OpenWRT,然后再安装NoDogSplash

虽然这里是使用TP-Link TL-MR3020为教题,一般支持OpenWRT的路由器也是适合的。 

Published in 电子与电脑
This is a guide on how to setting up a simple wireless hotspot using a TP-Link TL-MR3020 3G/4G Wireless N Router installaing with NoDogSplash. The goal is to provide a free hotspot with a splash page to advertise who is providing the hotspot, it should work as well for other OpenWRT supported router.
Published in Blog
Saturday, 15 February 2014 20:38

Wireless Router Remote Control Car

This is my first RC car control by an Arduino and a wirless router running OpenWRT. There are many OpenWRT supported routers, I'm using a TP-Link TL-MR3020 3G/4G Wireless N Router for this project since it is very slim, low power consumption and it is cheap.

 

RC car features

  • A webcam, the car can be driven without line of sight
  • A horn so that you can honk at people.
  • LED Headlights attached to the front of the car
  • Two wheel drive motor
  • Windows GUI application or web interface
  • Future Additions: Control by a smartphone (Android & IOS)
Published in Projects
Explains how to bridge network using two wireless routers, the first (Host) router is configure as Access Point & the second router (TL-MR3020) is configure as Client mode. Same method should apply to all other OpenWRT routers as well.
 
Prerequisites
  • Host router configure as Access Point. If you already setup a wireless internet connection in your house, usually your modem is configured as Access Point mode.
  • A working OpenWRT on TP-LINK TL-MR3020 Portable 3G/4G Wireless N Router
 
The routers is configure as two different subnet, assume using settings below as the example.
  • Host router IP: 192.168.1.1
  • Host router subnet mask: 255.255.255.0 or 255.255.0.0 if you want to access 192.168.0.x from 192.168.1.x
  • Host router SSID: ABC
  • Client router IP: 192.168.0.1
  • Client router subnet mask: 255.255.255.0
Published in Blog
Sunday, 07 July 2013 15:40

TP-LINK TL-MR3020 + OPENWRT + WEBCAM

This project uses an inexpensive TP-LINK TL-MR3020 Portable 3G/4G Wireless N Router with an Linux UVC supported camera to create an IP Camera that can be placed in a good location for surveillance.
 

Prerequisites

 
Published in Blog
After flashing the latest OpenWRT image file (openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory dated 03-Jun-2013), my TL-MR3020 is bricked. All the LED is keep on blinking (about 3 seconds once) except power LED, and the network is getting connected and disconnected every 3 seconds. Very lucky that the problem was fiexed by using serial console and Tftpd32 method.
Published in Blog

If you had flashing the TP-Link MR3020 firmware to OpenWRT and now you want to restore it to the original state, here is a guide on how to make it. With this guide you will able to changing between original firmware to different version OpenWRT firmware.

Published in Blog
This is a guide on how to flash TP-Link TL-MR3020 N Router with OpenWRT.
 
TL-MR3020 N Router Specification
  • CPU Atheros AR9330
  • RAM 32MB
  • NAND 4MB
  • Dimensions 74mm x 67mm x 22mm
  • Power consumption 1.25W Max.
Published in Blog
Saturday, 13 October 2012 22:51

USB Audio Adapter work with OpenWRT

This article shows you how to play audio from a USB audio device which is connecting to a TL-LINK TL-WR1043ND wireless router.
 
Prerequisite
  • 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.
Published in Blog
Tuesday, 25 September 2012 20:53

Wireless Router Home Automation

This project eliminate the use of an expensive Wifi/Network Shield but still able to control home appliances from any where. You may already own a wireless router which support OpenWRT or else you can get a very cheap wireless router such as WR703N for this project.
 
In order to eliminate install many packages on the router, I am using HTML and Javascript for the web interface, while hardware interface is using Lua which is come with OpenWRT. The whole process is just install a serial driver (see step below) to make the instruction simple & keep the router free of resources.
Published in Projects
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)

 

 

Published in Tutorials
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
Published in Blog
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.
Published in Blog
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
Published in Blog
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.
Published in Blog
Wednesday, 22 August 2012 15:49

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. 

Published in Blog

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.

Published in Blog

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.

Published in Blog
The more packages you install on your OpenWRT, the more space you need. It's useful to extend the storage capacity of your USB enabled OpenWRT router.
 
This article explain how to use a flash drive as a storage installing in TP-LINK TL-WR1043ND router. It is assumed that the router is flashed with OpenWRT. See this article if you haven't upgrade firmware to Openwrt.
Published in Blog
Thursday, 16 August 2012 14:40

Integrating PuTTY in WinSCP

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.

http://winscp.net/

 

PuTTY is a free implementation of Telnet and SSH for Windows and Unix platforms.

http://www.chiark.greenend.org.uk/~sgtatham/putty/

 

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:

http://portableapps.com/news/2012-07-29--winscp-portable-4.3.9-released

Published in Blog

This tutorial show you how to install PHP on the TP-Link TL-WR1043ND router.

I assume you already have a working installation of OpenWRT on your router. Click here for more about OpenWRT.

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.


After upgraded the router firmware to OpenWRT backfire, SSH to the router. For Microsoft Windows, I always use PuTTY. You can download PuTTY from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Published in Blog

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

  1. Run PuTTy
  2. Enter 192.168.1.1 for Host Name (this is the default IP for Openwrt set in TL-WR1043ND)
  3. Change connection type to SSH
  4. Click on Open button
  5. Enter your router username (username is root if you didn't change it)
  6. Enter your password
Published in Blog
Thursday, 26 July 2012 23:12

Openwrt on TP-Link TL-WR1043ND Router

OpenWrt is a highly extensible GNU/Linux distribution for embedded devices. After upgrade your router to OpenWRT, your router will become much more powerful (more features) than before.
Published in Blog
Back to Top