Wolf Paulus

Turning a WiFi Router into a
general-purpose Network Device
1. Hardware
2. Operating System
3. Runtime Environment
8 MB Flash
8 to 16 MB RAM
183 MHz CPU (MIPS)
1 Ethernet Port (10 / 100 Mbit/s)
Wireless: 802.11 b/g (54Mbit/s)
5V DC Power
FON 2201
FON 2100              FON 2202

            US$ 43
 US$ 29                US$ 49
Hardware
 Hacking
USB to Serial Adapter
req. RS232 Level Shifter
1. Hardware
2. Operating System
3. Runtime Environment
Linux                                   X-WRT


                                                       DD-WRT



         ...
HyperWrt based Tomato
OpenWrt w/ X-WRT
OpenWrt w/ LuCI
DD-Wrt
Linux                                X-WRT


                                                    DD-WRT



               ...
1. Tools for building linux kernel and root file system

2. Small BusyBox / Linux distribution
   GPL licensed for embedded...
inary
       le B
Sing
Fully writable filesystem w/
   package management
Demo
Software
 Hacking
1. Make rootfs and kernel available via TFTP
2. Gaining access to the Boot Loader
  telnet 192.168.1.254 9000 ^C

3. Tell ...
Partition Table
Demo
1. Hardware
2. Operating System
3. Runtime Environment
Target devices
CDC is intended for a broad range of resource-
constrained devices such as smartphones, TV set-
top boxes, ...
•   Foundation Profile 1.1 (JSR 219)

        •   Core Java class library

        •   No GUI support

•   Personal Basis P...
Core CDC   Foundation Profile
Java (CDC) for OpenWrt
• Get the phoneME source from java.net
• Mod. the make file to point into the OpenWrt toolchain
• Ru...
https://phoneme.dev.java.net/


• How to build phoneME for OpenWrt
 • http://wolfpaulus.com/journal/embedded/fonera2.html
...
Building with phoneME
javac
  -source 1.4
  -target 1.4 *.java
  -classpath btclasses.zip:basis.jar

<javac srcdir=quot;${...
Demo
Amazon Elastic Compute Cloud (Amazon EC2)
Google’s Application Engine
Managed Hosting
                                    ...
Thanks for
                               coming
            http://wolfpaulus.com
© 2003-2006 Carlsbad Cubes
© 2009 wolfp...
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Turning a WiFi Router into a general-purpose Network Device
Upcoming SlideShare
Loading in …5
×

Turning a WiFi Router into a general-purpose Network Device

6,712
-1

Published on

Embedded systems are increasingly present in our life and quite a few of them can be repurposed (a.k.a. hacked), to make them even more useful. The purpose of this session is to have fun and give you some inside of what\'s involved in turning a $30 wireless router into a general purpose embedded network device, running the LINUX OS and a full featured Java Runtime environment.

We will take a closer look at some popular Router OS distributions, like OpenWrt, DD-WRT, FreeWRT, Tomato, or X-Wrt and show how to flash the Fonera (FON) WiFi router with a vanilla OpenWrt distribution. The FON is a very small, relatively simple, and inexpensive router, built on the AR531x/231x Atheros WiSoC (Wireless System-on-a-Chip) with an integrated 32-bit MIPS R4000-class processor running at 183.5 MHz, comes with 8 Mbytes Flash Memory and 16 MByte RAM. In short, it has all the attributes required to be added our digital playground.

Embedded OS Development / Kernel Architecture, Implementation and port for Embedded Systems
OpenWrt is a Linux distribution optimized especially for embedded devices and surprisingly, the OpenWrt kernel configuration is done with the help of a character based UI. OpenWrt also comes with a lightweight package management system (IPKG or more recently OPKG), meaning that features that have not already been built into the kernel, can be added later, at runtime.
As an example, we will take a look at how a JavaVM could be built, packaged, and deployed, or built directly into the kernel.

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,712
On Slideshare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
40
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Turning a WiFi Router into a general-purpose Network Device

  1. 1. Wolf Paulus Turning a WiFi Router into a general-purpose Network Device
  2. 2. 1. Hardware 2. Operating System 3. Runtime Environment
  3. 3. 8 MB Flash 8 to 16 MB RAM 183 MHz CPU (MIPS) 1 Ethernet Port (10 / 100 Mbit/s) Wireless: 802.11 b/g (54Mbit/s) 5V DC Power
  4. 4. FON 2201 FON 2100 FON 2202 US$ 43 US$ 29 US$ 49
  5. 5. Hardware Hacking
  6. 6. USB to Serial Adapter req. RS232 Level Shifter
  7. 7. 1. Hardware 2. Operating System 3. Runtime Environment
  8. 8. Linux X-WRT DD-WRT OpenWrt LuCI FreeWRT 2004 . . . . . . . Linksys WRT54G Tomato HyperWrt
  9. 9. HyperWrt based Tomato
  10. 10. OpenWrt w/ X-WRT
  11. 11. OpenWrt w/ LuCI
  12. 12. DD-Wrt
  13. 13. Linux X-WRT DD-WRT OpenWrt LuCI FreeWRT 2004 . . . . . . . Linksys WRT54G Tomato HyperWrt
  14. 14. 1. Tools for building linux kernel and root file system 2. Small BusyBox / Linux distribution GPL licensed for embedded devices 3. Fully writable filesystem w/ package management IPKG or OPKG (automatic dependencies) 4. UCI (universal configuration interface) for system and package configuration
  15. 15. inary le B Sing
  16. 16. Fully writable filesystem w/ package management
  17. 17. Demo
  18. 18. Software Hacking
  19. 19. 1. Make rootfs and kernel available via TFTP 2. Gaining access to the Boot Loader telnet 192.168.1.254 9000 ^C 3. Tell RedBoot the location of the tftp server RedBoot> ip_address -l 192.168.1.254/24 -h 192.168.1.2 4. Initialize the Flash Memory Partition Table Redboot> fis init 5. Load and write the root filesystem RedBoot> load -r -b 0x80041000 openwrt-atheros-root.squashfs RedBoot> fis create -l 0x06F0000 rootfs 6. Load and write the Linux kernel RedBoot> load -r -b 0x80041000 openwrt-atheros-vmlinux.lzma RedBoot> fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7 7. Tell RedBoot which kernel to boot into RedBoot> fis load -l vmlinux.bin.l7 8. Boot into the new System RedBoot> exec
  20. 20. Partition Table
  21. 21. Demo
  22. 22. 1. Hardware 2. Operating System 3. Runtime Environment
  23. 23. Target devices CDC is intended for a broad range of resource- constrained devices such as smartphones, TV set- top boxes, telematics systems, and RFID readers. Typically, these devices include a 32-bit microcontroller and require about 2 MB of RAM and 2.5 MB of ROM for the Java runtime environment alone. Relationship with Java SE Each CDC version is based on a related Java SE software version. CDC 1.1 is based on J2SE version 1.4.2.
  24. 24. • Foundation Profile 1.1 (JSR 219) • Core Java class library • No GUI support • Personal Basis Profile 1.1 (JSR 217) • Lightweight component support • xlet support • Personal Profile 1.1 (JSR 216) • Full AWT support • Applet support • CDC optional packages • RMI, Security (HTTPS), JDBC, Swing, etc.
  25. 25. Core CDC Foundation Profile
  26. 26. Java (CDC) for OpenWrt • Get the phoneME source from java.net • Mod. the make file to point into the OpenWrt toolchain • Run make in the OpenWrt SDK folder • Run make in the linux-mips-openwrt folder • Create the ipkg package structure • Move the file structure into the OpenWrt toolchain • Run make in the OpenWrt SDK folder
  27. 27. https://phoneme.dev.java.net/ • How to build phoneME for OpenWrt • http://wolfpaulus.com/journal/embedded/fonera2.html • How to build phoneME for Mac OS X • http://markus.heberling.net/tag/phoneme/
  28. 28. Building with phoneME javac -source 1.4 -target 1.4 *.java -classpath btclasses.zip:basis.jar <javac srcdir=quot;${src}quot; destdir=quot;${build}quot; classpath=quot;btclasses.zip:basis.jarquot; source=quot;1.4quot; target=quot;1.4quot; />
  29. 29. Demo
  30. 30. Amazon Elastic Compute Cloud (Amazon EC2) Google’s Application Engine Managed Hosting Enterprise Computing Infrastructure Home Netbooks Smart Phones ,TiVo, NetFlix Roku, AppleTV Embedded Devices, Storage (Ext. HardDrives, Drobo)
  31. 31. Thanks for coming http://wolfpaulus.com © 2003-2006 Carlsbad Cubes © 2009 wolfpaulus.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×