Archive

Posts Tagged ‘openwrt’

Getting Started with WRTnode OpenWRT Development Board

September 18th, 2014 No comments

Seeed Studio sent me two nice little boards that can be used for IoT development: WRTNode and LinkIt ONE. Today, I’ll show pictures of WRTNode and accessories, and go through the “starting guide“, and will test LinkIt ONE board a few days later.

WRTnode Unboxing

I’ve received WRTnode by Fedex, and the board is stored in a plastic box.
WRTnode_Package
Inside the box, you’ll find the board, a “special” USB used to power the board and as an OTG adapter, a piece of paper with useful links (Wiki), and some WRTnode stickers.

WRTnode, "special" USB cable, and Quick Start Card (Click to Enlarge)

WRTnode, “special” USB cable, and Quick Start Card (Click to Enlarge)

Any micro USB to USB cable can be used to power the board, but this cable is useless to connect USB devices such as flash drives, webcams (OpenCV is supported), Bluetooth dongles, and so on. You could even connect a USB hub to connect multiple USB devices as shown below.

WRTnode_Webcam_Flash_Drive_USB_Hub

I’ve also taken a picture of both sides of the board shown the antenna on-board antennas, Mediatek MT7620n WiSoC, Elixir N2TU51216DG-AC DDR2 chip (64MB @ 400 MHz), the 16 MB SPI flash, as well as the headers for connecting various peripherals via I2C, SPI, UART, USB, etc…

WRTnode Board (Click to Enlarge)

WRTnode Board (Click to Enlarge)

You can also add Ethernet easily by making your own Ethernet cable using T568B wiring standard. I’m not 100% sure it’s safe though, as there are usually some extra components for Ethernet. I’ve included the board pinout chart for your reference.

WRTnode_pinout

WRTnode Quick Start Guide

To start the board simply connect the USB cable to a power adapter or a USB port on your computer. After about 10 seconds, you should see a blue LED lit up, and shortly after, you should see WRTnodeXXXX ESSID, where XXXX are the last 4 digit of the board MAC address. Connect it with your computer, and input the password: 12345678.
WRTNode_Access_PointNormally the board will resolve as several URL, but at first none of them worked.

$ ping i.wrtno.de
ping: unknown host i.wrtno.de
$ ping openwrt.lan
ping: unknown host openwrt.lan
$ ping wrtnode.lan
ping: unknown host wrtnode.lan

But you can check the route to see which subnet is used by your Wi-Fi connection:

$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 1 0 0 eth0
192.168.8.0 * 255.255.255.0 U 9 0 0 wlan0

I could finally ping the board with:

$ ping 192.168.8.1
PING 192.168.8.1 (192.168.8.1) 56(84) bytes of data.
64 bytes from 192.168.8.1: icmp_seq=1 ttl=64 time=12.4 ms
64 bytes from 192.168.8.1: icmp_seq=2 ttl=64 time=2.37 ms
64 bytes from 192.168.8.1: icmp_seq=3 ttl=64 time=12.1 ms

Interestingly, ping openwrt.lan, and the other two URL also work afterwards, so maybe I was a little to impatient during my testing…

The first time you need to connect to the board via telnet in order to set the root password:

$ telnet 192.168.8.1

WRTNode_Telnet

Now change the root password using passwd as you would do in any other Linux machine, and exit the connection, in order to connect via SSH instead:

$ ssh [email protected]
The authenticity of host '192.168.8.1 (192.168.8.1)' can't be established.
RSA key fingerprint is bc:00:71:ac:b1:56:e7:7b:c7:7a:9b:6a:59:8e:da:82.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.8.1' (RSA) to the list of known hosts.
[email protected]'s password:
BusyBox v1.22.1 (2014-08-13 19:31:12 UTC) built-in shell (ash)
.....
root@OpenWrt:~#

At this point, you’ve got another Wi-Fi access point on your network, but it’s not connected to Internet, so let’s start by locating the Wi-Fi routers with aps command:

root@OpenWrt:~# aps
WRTnode AP scaner.
Begin scaning APs, pls wait...
Finished.
APs available are...
ra0 get_site_survey:
Ch SSID BSSID Security Siganl(%)W-Mode ExtCH NT WPS DPID
1 CNX-TRANSLATION 94:0c:6d:e6:5b:10 WPA1PSKWPA2PSK/TKIPAES 100 11b/g/n ABOVE In YES

I only have one ESSID here, but this will list all ESSID in your environment. With that data, you can configure WRTnode to connect to your Wi-Fi router using vw command (vi wireless?):

root@OpenWrt:~# vw
config wifi-device 'ra0'
 option type 'ralink'
 option mode '9'
 option channel '1'
 option txpower '100'
 option ht '20+40'
 option country 'US'
 option disabled '0'
config wifi-iface
 option device 'ra0'
 option network 'lan'
 option mode 'ap'
 option encryption 'psk2'
 option key '12345678'
 option ApCliEnable '1'
 option ApCliSsid 'CNX-TRANSLATION'
 option ApCliAuthMode 'WPA2PSK'
 option ApCliEncrypType 'AES'
 option ApCliPassWord 'router_password'
 option ssid 'WRTnode9A60'

You need to change the lines in bold above using the data from aps. The first line is the Channel (Ch) , and the four lines in the wifi-iface section are pretty much self-explanatory. Save the file with Esc + “:wq”.

aps and vw do not report security features in the same way. Here’s the conversion table in case you don’t use WPA2PSK/AES:

aps:Security           vw:ApCliAuthMode/ApCliEncrypType
=========================================================
WPA1PSKWPA2PSK/TKIPAES	WPA2PSK/AES
WPA2PSK/AES		WPA2PSK/AES
WPA2PSK/TKIP		WPA2PSK/TKIP
WPAPSK/TKIPAES		WPAPSK/TKIP
WPAPSK/AES		WPAPSK/AES
WPAPSK/TKIP		WPAPSK/TKIP
WEP			WEP/WEP

Finally, restart the network:

root@OpenWrt:~# nr

and verify WRTnode got an IP address from the Wi-Fi router using DHCP:

root@OpenWrt:~# ia
apcli0 Link encap:Ethernet HWaddr 66:51:7E:32:9A:60
inet addr:192.168.0.105 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::6451:7eff:fe32:9a60/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Good 192.168.0.105 is an IP adress from local network. Let’s also check we can ping a site on the Internet:

root@OpenWrt:~# ping cnx-software.com
PING cnx-software.com (104.28.18.95): 56 data bytes
64 bytes from 104.28.18.95: seq=0 ttl=53 time=81.999 ms
64 bytes from 104.28.18.95: seq=1 ttl=53 time=87.759 ms
64 bytes from 104.28.18.95: seq=2 ttl=53 time=81.381 ms
^C
--- cnx-software.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 81.381/83.713/87.759 ms

All good!

Once I had a problem connecting to my Wi-Fi router, and it turned out my router was configured to automatically select the channel, and it had switched to Channel 4. Running vw again to change the configuration withoption channel ‘4’” made the connection work again. There’s probably an option in OpenWRT to automatically detect the channel, but I haven’t investigated.

You can also install packages for okpg. I tried to install luci, but it was pre-installed, so I added openvpn support instead:

root@OpenWrt:~# opkg update
Downloading http://d.wrtnode.com/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker.
root@OpenWrt:~# opkg install luci
Package luci (svn-r10457-1) installed in root is up to date.
root@OpenWrt:~# opkg install openvpn-easy-rsa
Installing openvpn-easy-rsa (2013-01-30-2) to root...
Downloading http://d.wrtnode.com/packages/openvpn-easy-rsa_2013-01-30-2_ramips_24kec.ipk.
Installing openssl-util (1.0.1h-1) to root...
Downloading http://d.wrtnode.com/packages/openssl-util_1.0.1h-1_ramips_24kec.ipk.
Configuring openssl-util.
Configuring openvpn-easy-rsa.
root@OpenWrt:~#

That’s it the quick start guide is completed.

I’ve also run some command to show memory and storage usage:

root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 7.3M 348.0K 7.0M 5% /
/dev/root 7.5M 7.5M 0 100% /rom
tmpfs 30.2M 80.0K 30.1M 0% /tmp
/dev/mtdblock5 7.3M 348.0K 7.0M 5% /overlay
overlayfs:/overlay 7.3M 348.0K 7.0M 5% /
tmpfs 512.0K 0 512.0K 0% /dev

root@OpenWrt:~# free -m
total used free shared buffers
Mem: 61852 29084 32768 0 3536
-/+ buffers: 25548 36304
Swap: 0 0 0

Out of the 16Mb SPI flash, only 7.3M available are available for OpenWRT, the  rest is probably used by the bootloader. There’s nearly 64MB RAM available, and 29MB free.

If you are interested in the board, you can purchase it from Seeed Studio ($25), which provided the board for this review, but it’s also available on other shops such as DFRobot or Eleduino for the same price, although shipping fees may vary. To go beyond this Quick Start Guide, visit WRTnode WiKi to access the source code, schematics, and various documentation including tutorials.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

$25 GL.iNet 6416A is an Hackable OpenWRT Router with Easy UART and GPIO Access

August 25th, 2014 6 comments

There are plenty of low cost routers supporting OpenWRT, but GL.iNet 6416A has several advantages compared to devices like TP-Link WR703N. Both are based on Atheros AR9931, but GL.iNet router has more memory and storage (64MB RAM + 16MB Flash vs 32MB RAM + 4MB Flash), two Ethernet ports instead of just one, and 6 GPIOs, the serial pins, and power signals (5V, 3.3V and GND) are all easily accessible via though holes or headers. Gl.iNet 6416A can be purchased for about $25 on DealExtreme or Amazon US, and it used to be listed on eBay, but is now out of stock.

GL.inet_6416AGl/iNET 6416A specifications:

  • Wi-Fi SoC – Atheros AR9331 MIPS processor @ 400 MHz
  • System Memory – 64MB RAM
  • Storage – 16MB Flash
  • Connectivity – 2x 10/100 Mbit Ethernet ports, 802.11 b/g/n Wi-FI up to 150Mbps
  • USB – 1x USB 2.0 port, 1x micro USB port for power
  • Debugging – Serial console via UART header (GND, Tx, Rx)
  • Expansion – 6 GPIOs, 5V, 3.3V, and GND.
  • Misc – Reset button, LED indicator
  • Power – 5V (micro USB)
  • Dimension – 5.8 x 5.8 x 2.2 cm
  • Weight 42 grams.

The device is also said to support USB webcams (MJPG or YUV), and USB mass storage with FAT32, EXFAT, EXT-2/3/4, and NTFS file systems using the stock firmware. There are also Android and iOS apps to manage the router.

GL.iNet_6416A_Board

GL.iNet 6416A Board Description – Source: Stian Eikeland

6416A router, and its little brother, 6408A, with 8 MB flash, are now part of mainline OpenWRT. You can also follow news and access short tutorials for the board on GL.iNet website, and check out the product page.

Thanks to Nanik for the tip.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

WRTNode is a Hacker-Friendly Open Source Hardware OpenWRT Wi-Fi Module Selling for $25

August 20th, 2014 5 comments

There are now some tiny and low cost ($15 to $20) Wi-Fi modules supporting OpenWRT such as VoCore and AsiaRF AWM002. However due to their small size they may not be that hacker’s friendly as they can’t have 2.54mm headers due to heir small size, and I’ve recently received AsiaRF AWM002 only to find out it not only needs 3.3V supply voltage, but also 1.8V and 1.2V. So I’d need to make my own power circuit with the required LDOs, or purchase a $20 base board to use the module. Here comes WRTnode another larger Wi-Fi module but with more usable 2.54mm headers, and based on the more powerful Mediatek MT7620N processor @ 600MHz.

WRTnodeWRTnode hardware specifications:

  • Processor – Mediatek  MT7620N 600MHz MIPS CPU (MIPS24KEc)
  • System Memory – 64MB DDR2
  • Storage – 16MB SPI flash
  • Connectivity – Wi-Fi 2T2R 802.11n 2.4 GHz up to 300Mbps
  • Expansion Headers – 2x with access to  23GPIOs, JTAG, SPI, UART Lite, USB2.0 host
  • USB – 1x micro USB
  • Dimensions – 45mm x 50mm

OpenWRT is based on BARRIER BREAKER release with various patches (opencv 2.4.8, linino, …), demos (opencv, mechanical control, and RESTful), and source code available on github. The project also claims to “open hardware”, but for now they’ve only released the schematics (PDF), with the BoM and PCB layout being released layer. The board has apparently been designed by a company called DFRobot (TBC), and robotics projects and shields are planned for WRTnode, and “WRTnode IoT development framework SDK” will be released at a later stage with a graphical IDE, “enhanced AI algorithms”, RESTful, and more.

You can watch a demo with WRTnode running OpenCV and controlling uARM robotic arm to pickup coins, and move them into a cup.

They have already sold a few beta boards in China, but the module is not currently available for purchase, but it will sell for $25+ shipping on DFrobots, SeeedStudio, and a few other sites. You can find more information on WRTnode website.

Via Olof Johansson

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Kankun KK-SP3 Wi-Fi Smart Socket Hacked, Based on Atheros AR9331, Running OpenWRT

July 28th, 2014 1 comment

Kankun KK-SP3 is a $20 Wi-Fi smart socket that can be controlled via iOS and Android app. But one person created a Kankun community on Google+ to try to hack the device and control it from a PC, or from outside the home network for example. Up to now, the device has been opened, found to run OpenWRT, and one the member wrote a Windows app to control the socket from a PC. It is a basic smart socket, without power monitoring capabilities, and unless you start hacking the hardware, all you can do is basically turn it on and off.

Kaunkun KK-SP3 Board (Click to Enlarge)

Kankun KK-SP3 Board (Click to Enlarge)

The device is based on Qualcomm Atheros AR9931, found in many low cost routers supporting OpenWRT, and the socket indeed runs OpenWRT, which you can access via SSH or Telnet (username/password: root/admin). There’s 32MB RAM (Winbond W9425G6JH), and a 10A OMRON relay.

SmartPlug_App

SmartPlug Windows App

The smart socket actually communicates with the mobile app using the UDP protocol, but communication appears to be encrypted. So instead of trying to reverse-engineer the protocol, one member (Konstantin) found the relay was controlled by one of the LED GPIO, and provided instructions to access the device from the outside using a CGI file he built (relay.cgi) to control the relay.

Building up on relay.cgi, another member released SmartPlug.exe, a Windows program to control the socket from a PC. There are also more tips on the community such as instructions to access it from the Internet. Since routers based on Atheros AR9331 are quite popular, there are many instructions on the web, and you can find various way to improve the functionality of the device, for example by adding a USB port.

If you want to play around, you can purchase the plug on it can also be found on Aliexpress for as low as $19.99 including shipping, and If you live in China or use forwarding services, it’s available on Taobao for 99 RMB ($16). A new version, Smart Plug 2 (K2), appears to be in the works, with Wi-Fi and RF support, and two USB ports for motion sensing, camera, weather, and light sensor modules. I’ll cover it in another post, if I can find more information.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

AsiaRF AWM002 Wi-Fi Module and a Tiny IoT Server Kit Get Crowdfunded for $15 and Up

May 30th, 2014 13 comments

VoCore Wi-Fi module selling for $15 to $20, and it’s corresponding VoCore Dock with Ethernet has been quite popular, and at the time of writing, the project has already received $40,000 in funding with 50 more days to go. But if you’d rather get something for the same price, a few months early, and an already FCC/CE certified and proven module and tiny IoT server, AsiaRF has also launched a crowdfunding campaign for their AWM002 Wi-Fi module running OpenWRT on the same Ralink RT5350 found on the VoCore. as well as AWM002 Tiny Kit which adds Ethernet and USB, and a larger board with easier access to all ports and I/Os.

AsiaRF IoT Server with AMW002 Module

AsiaRF AWM002 Tiny Kit with AMW002 Module

As a reminder, let’s go through AWM002 specifications again:

AsiaRF AWM002 Module

AsiaRF AWM002 Module

  • SoC – Mediatek/Ralink RT5350 MIPS 74KEc core @ 360 MHz dual band 802.11n Wi-Fi with data Rate up to 150Mbps, hardware NAT, QoS, TCP/UDP/IP checksum offloading.
  • System Memory – 32 MB
  • Storage – 8MB NAND flash (for firmware)
  • Security – 64/128-bits WEP, TKIP,WPA, WPA2,AES,WPS
  • Multi-modes – AP/Client
  • Antenna – 1x iPex connector (PIFA optional)
  • Transmit Power (EIRP)
    • 11n HT40 MCS7 : +14 dBm
    • 11b CCK: +20 dBm
    • 11g OFDM: +16 dBm
  • Receiver Sensitivity
    • -70dBm at HT40 MCS7
    • -78dBm at 54Mpbs
    • -90dBm at 11Mpbs
  • Headers
    • PIN I – 24-pin with access to GPIOS, 3.3V, 1.2V, GND, UART, USB, Ethernet..
    • PIN II – 16-pin with access to  I2C, I2S, PCM, Ethernet…
  • Power – +3.3V
  • Dimensions – 25x35mm
  • Certifications – FCC/CE
Large Base Board for AWM002 Module

Large Base Board for AWM002 Module

The module is already supported by OpenWRT, and provides access to various I/Os such as GPIOs, I2C, UART and so on. You could develop monitoring, communication or surveillance application, such as adding Wi-Fi to a USB printer, connecting a ZWave USB module to gather data from sensors, Wi-Fi IP Cameras, Wi-Fi speakers, adding Wi-Fi to Arduino, cloud storage servers, and so on.

AsiaRF is looking for $6,000 in funding (flexible funding Indiegogo campaign), and you can pledge as low as $15 (Early bird) for AWM002 module, after which it will be $23. The large base board without module goes for $35, and AWM002 tiny kit (pictures at the top of the post) can be had for $38. There are also perks to pledge for larger quantities, and even have your own RT5350 board being designed. Shipping is included to the US, Canada, Switzerland, China, Singapore, Malaysia, Thailand, South Korea, India, and the Netherlands, and it’s $5 to the rest of the world. The campaign will complete by the end of June, and shipping is scheduled for July.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Prpl Non-Profit Organization to Work on Linux, Android, and OpenWRT for MIPS based Processors

May 28th, 2014 5 comments

prplIn what looks like an answer, albeit fairly late, to Linaro, the non-profit organization working on open source software for ARM based SoCs, a consortium of companies composed of Imagination Technologies, Broadcom, Cavium, Lantiq, Qualcomm, Ingenic, and a few others, has funded Prpl (pronounced Purple), “an open-source, community-driven, collaborative, non-profit foundation targeting and supporting the MIPS architecture—and open to others—with a focus on enabling next-generation datacenter-to-device portable software and virtualized architectures”.

The Prpl foundation will focus on three key objectives:

  • Portability – To create ISA agnostic software for rapid deployment across multiple architecture
  • Virtualization & security – To enable multi-tenant, secure, software, environments in datacenter, networking & storage, home, mobile and embedded
  • Heterogeneous Computing – To leverage compute resources enabling next generation big data analytics and mining

Initially there will PEG (Prpl Engineering Group) to take of the following projects for 4 market segments (datacenter, network & storage, connected consumers, and Embedded & IoT):

  • Linux –  Optimizations for enterprise, home and embedded Linux.
  • Android – Getting started with Android, and Android source code
  • Developer Tools – Used in conjunction with Android and Linux OS
  • Virtualization & Secure Supervisor – Secure multi-container frameworks
  • OpenWRT – Enabling carrier-grade features to complement OpenWRT
Arduino Yun

Arduino Yun

It also appears some low cost MIPS32 & MIPS64 development board and reference designs will be supported such as Newton wearable platform, Microchip chipKit WF32 board, and Arduino Yun.

Companies can join Prpl as Board Members or Contributors Members, and individuals can join the foundation for free to engage with the community and access source code and tools.

Since the the Prpl foundation has just been launched, there aren’t any tools or software available right now, but if you are interested in MIPS development, and possibly other architecture which may be part of Prpl later on, you can get more information and/or join the foundation on Prpl Foundation Website.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

$15 Open Source Hardware VoCore Wi-Fi Module Runs OpenWRT (Crowdfunding)

May 22nd, 2014 7 comments

There are already low cost Wi-Fi modules that can be used for the Internet of Things such as AsiaRF AWM002 and Hi-Link HLK-RM04. However, AsiaRF mainly caters to companies, and the Hi-Link module has a limited memory (16MB), which may or may not be an issue depending on your application. VoCore Wi-Fi module could prove to be an interesting option as it is the same $15 to $20 price range, runs OpenWRT with 32 MB RAM, will be open source hardware, and provides up to 20 GPIOs in a tiny (25x25mm) form factor.

VoCoreVoCore Wi-Fi module specifications:

  • SoC – Ralink/Mediatek RT5350 MIPS processor @ 360MHz with dual band 802.11n Wi-Fi with data Rate up to 150Mbps
  • System Memory – 32 MB RAM
  • Storage – 8MB SPI Flash (for firmware) / 16 MB on limited edition
  • Available Signals (Via through holes):
    • 10/100M Ethernet
    • USB
    • UART, I2C, SPI
    • I2S, PCM
    • JTAG
    • Over 20 GPIOs
  • Power Pins – 3.3V, 1.8V, GND
  • Power Consumption – 200mA~210mA @ 5V (during ping)
  • Dimensions – 25×25 mm

The developers envisions the device to be used for applications such as Wi-Fi to USB bridges (for printers, scanners…), robot remote controls, portable VPN routers, wireless speakers and more. He also promised to release all hardware design files including schematics, PCB layout, bill of materials, as well as source code for the boot loader and openWRT.

VoCore Module with Dock

VoCore Module with Dock

The project is currently on Indiegogo (fixed funding) where the developer aims to gather at least $6,000 to complete development, and go ahead with mass-production to lower the unit cost of the board. An early bird pledge will allow you to get the board for $15,  after which it will go up to $20, and if you want the VoCore module with the Dock as shown above, you can pledge $40 to get a complete DIY kit (Soldering required) or $45 if you don’t feel like doing the assembly yourself. Shipping is free to the US and China, and an additional $3 anywhere else, with delivery scheduled for September and October depending on the perks.

The project’s progress can be followed on Vonger’s blog.

Thanks to Oliveira for the tip.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter