jeff keyzer-hacking the asus wl520gu
TRANSCRIPT
![Page 1: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/1.jpg)
Hacking the Asus WL-520gUWireless Router
Jeff Keyzermightyohm.com
![Page 2: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/2.jpg)
Why hack your wireless router?
![Page 3: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/3.jpg)
The old answer...
● Linksys WRT54G● Introduced in 2002● Over a dozen hardware variants – GS, GL, etc.● Firmware released 7/03 under GPL● Widely hacked – mesh networking, hotspots, robotics● Wikipedia lists 31 third-party firmware distros (!!)
![Page 4: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/4.jpg)
● Install DD-WRT, Tomato, etc...● Boost Wi-Fi TX power● Play with stuff like DDNS, hotspots, VPN, AP
mode, etc.
Lifehacker, June 2006:“Hack Attack: Turn your $60 router into a $600 router...”
![Page 5: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/5.jpg)
Yep, that's pretty cool.So why are we here?
![Page 6: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/6.jpg)
Wait a minute...
● A wireless router is sort of like a small, low power computer, right?● 200MHz CPU● 16MB RAM● 4MB Flash● Limited IO● Runs on 5V, consumes < 5W● And it runs Linux!
![Page 7: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/7.jpg)
Common EmbeddedLinux Computing Platforms
Platform CPU Clock (Mhz)
RAM (MB)
Flash (MB)
Wi-Fi? Price(USD)
Bug LabsBUGbase
ARM1136JF 532 128 32 N $249
Beagle Board TI OMAP3 600 256 256 N $150
GumstixVerdex Pro XM4
Marvell PXA270
400 64 16 N $129
Your Wireless Router
various ~200 ~16 ~4 Y!!! ~$50
![Page 8: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/8.jpg)
The new answer...
● Asus WL-520gU● Introduced in July 2007● External removable antenna (RP-SMA)● Cheap, often discounted
– $23 after MiR @ Newegg in Winter 2008. ● USB port for printer sharing
![Page 9: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/9.jpg)
USB!!1!1
● USB-Audio● USB-Storage● USB-Serial● ??
![Page 10: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/10.jpg)
WL-520gU vs. WRT54GL
Model CPU Clock (Mhz)
RAM (MB)
Flash (MB)
Features Price(USD)
Linksys WRT54GL
Broadcom 5352
200 16 4 UART, JTAG
$79.99
Asus WL-520gU
Broadcom 5354
200 16 4 UART, 1xUSB
$59.99
Source: OpenWrt Table of Hardware: http://wiki.openwrt.org/TableOfHardwarePrices: Newegg.com, price before discounts & rebates.
![Page 11: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/11.jpg)
Great, but what can I do with it?
![Page 12: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/12.jpg)
Standalone Weather Station
● Atmega168 microcontroller on serial port
● RGB LEDs
● Shell script queries Weather Underground
http://hithisishal.blogspot.com/
Photo credit: Hithisishal
![Page 13: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/13.jpg)
Arduino/LCD Case Mod
● Wifi radio with interface & controls stuffed into case
● Arduino Pro controls display
● Awesome white backlit LCD display
Photo credit: crizo
http://www.chrismillerstuff.com/gallery/v/projects/audio/
![Page 14: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/14.jpg)
RSS Tickerhttp://www.flickr.com/photos/keroism/3416389889/
Photo credit: keroism
● 256MB USB Stick
● PHP + Magpie RSS
● Arduino BBB
● Sure Electronics LED Matrix
![Page 15: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/15.jpg)
RSS Ticker
![Page 16: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/16.jpg)
Tweet-a-watthttp://www.ladyada.net/make/tweetawatt/
Photo credit: Ladyada
● USB memory stick
● Xbee wireless module
● Runs Python script to collect power usage data
![Page 17: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/17.jpg)
Tweet-a-Watt: Videohttp://www.adafruit.com/blog/2009/04/04/hacking-the-asus-router-for-the-tweet-a-
watt/
![Page 18: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/18.jpg)
Wifi Radio Project
AVR Programmer& 5V Supply
OpenWRT, mpc/mpd, shell scripts for playlist & display control
Atmega168 AVRMicrocontroller
Sparkfun 16x2LCD Display
http://mightyohm.com/wifiradio/
![Page 19: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/19.jpg)
Wifi Radio Project
![Page 20: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/20.jpg)
Hacking the WL-520gU
![Page 21: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/21.jpg)
The Asus WL-520gU
1xUSB
DC IN5V@2A
RP-SMA
7x LEDs: power, link, activity
5x 10/100BaseT
![Page 22: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/22.jpg)
Step 1 – Void warranty
Hidden screws(rubber feet removed)
![Page 23: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/23.jpg)
Inside
Front panel LEDs
Power, USB, Ethernet, Wifi Ports
![Page 24: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/24.jpg)
PCB - Top
5V → 3.3V PS
3.3Vserial port
SiGe 2528L & TR Switch
BroadcomBCM5354KFBG SoC
16MB SRAMSamsung K4S281632I
4MB FlashMX 29LV320CB
PCB Dimensions: 4.0” x 5.6”
![Page 25: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/25.jpg)
PCB - Bottom
Diversity RX Antenna
Serial port
USB
![Page 26: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/26.jpg)
WL-520gU vs. WL-520gC
● Same PCB ● gC lacks factory USB,
costs $20 less● Should be simple to
convert gC into gU by adding these missing parts (thanks, Asus!)
![Page 27: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/27.jpg)
Talking to the router:Adding a serial port
![Page 28: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/28.jpg)
You will need...
● FTDI TTL-232R 3.3V USB-Serial Cable
– adafruit.com, FTDI direct, Digikey
● 0.1” breakaway headers
– Sparkfun, Digikey, etc.● Soldering iron & rosin core solder
● Optional:
● Female header● Small piece of protoboard
![Page 29: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/29.jpg)
Connector J4 before mod
![Page 30: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/30.jpg)
Connector J4 after mod
![Page 31: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/31.jpg)
Connecting the FTDI serial cable
● Default: 115200 baud, 8N1, no handshaking
● 3.3V TTL● Levels are NOT
RS-232!
![Page 32: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/32.jpg)
Installing Linux:OpenWrt
![Page 33: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/33.jpg)
OpenWrt is described as a Linux distribution for embedded devices.
“... OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.”
http://openwrt.org
![Page 34: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/34.jpg)
Features
● Busybox - http://busybox.net● Swiss army knife of embedded Linux
● Opkg package manager● Lots of 3rd party packages available● Streamlined build system/cross compilation
environment
![Page 35: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/35.jpg)
WL-520gU Support
● Linux-2.6 is still WiP● b43 wireless● Bootloader issue?
● Linux-2.4 Works! Need to compile your own boot image.● Some people have reported USB 2.0 issues.
![Page 36: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/36.jpg)
Building OpenWrt
● svn co svn://svn.openwrt.org/openwrt/branches/8.09● scripts/feeds/update -a● scripts/feeds/install mpc, mpd, etc...● make menuconfig● make V=99
Kamikaze 8.09
http://oldwiki.openwrt.org/OpenWrtDocs(2f)BuildingKamikazeHowTo.html
![Page 37: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/37.jpg)
Flashing the router
● Connect to router via both serial and ethernet● Open serial terminal● Hold down reset button, apply power● Use tftp to send openwrt-brcm-2.4-squashfs.trx ● Wait...● Power cycle router
![Page 38: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/38.jpg)
Configuration
● Set up wireless and network configs in /etc/config● Point opkg.conf to local webserver
![Page 39: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/39.jpg)
USB-Audio
● Opkg install …
● kmod-usb-ohci● kmod-usb-audio● an audio player, ie. Mpd (mpc)
– Newer not always better. Mpd 0.14 has bloat.● Reboot● Insert USB-Audio adapter
– SYBA SD-CM-UAUD works, $7 @ Newegg● Edit /etc/mpd.conf for OSS to /dev/sound/dsp● Play some tunes
![Page 40: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/40.jpg)
USB-Storage
● opkg install ...
● kmod-usb-ohci● kmod-usb-storage● kmod-fs-vfat, kmod-fs-ext3, etc. as needed
● Reboot
● Insert formatted memory stick
● mkdir /mnt/usb
● mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt/usb
![Page 41: Jeff Keyzer-Hacking the Asus WL520gU](https://reader031.vdocuments.us/reader031/viewer/2022020115/5477b7c45806b5de188b4622/html5/thumbnails/41.jpg)
Links
● For more info, boot images, tutorials:● http://mightyohm.com/wifiradio/
● Discussion forums● http://mightyohm.com/forum/
● To contact me:● http://mightyohm.com/blog/contact/
● Post your photos!● http://www.flickr.com/groups/asushacks/