1 / 26

Android Home Network

Chris Bednarz Justin Jones Prof. Xiang. Android Home Network . http://code.google.com/p/alt-hs/ svn checkout. Follow Us . Background USB Tethering for Linux Completely Extensible for Home Network Use Alternative to the recent “portable hotspot” capability

oakes
Download Presentation

Android Home Network

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chris Bednarz Justin Jones Prof. Xiang Android Home Network

  2. http://code.google.com/p/alt-hs/ • svn checkout Follow Us

  3. Background USB Tethering for Linux Completely Extensible for Home Network Use Alternative to the recent “portable hotspot” capability A “Non-root”, unmodified Kernel solution Advantages Enables Linux scalable/customizable security features Much easier on the phone (Power Consumption / Processing) Works on all Android capable devices About AHN

  4. A “Non-root”, unmodified Kernel solution • Phone must fetch data requests at the application level ( TCP Layer 5) • Routing capable • All data across the network must come in and out at the internet layer (TCP Layer 3) • Phone and Computer interface must be USB • Allows fast transportation • Support the major protocols • TCP, UDP, ICMP • Scalable customizable security features • Linux IPTables • Fast • Divide and conquer, multi-thread different tasks into independent threads Major Design Requirements

  5. Layer 3 Request User Mode Program Layer 5 Request Phone Android Kernel/Internet Time  High Level Design

  6. AHN is a software based design utilizing open source freeware tools • Only cost includes the Android devices and services • Hardware includes any laptop or desktop PC as a router and any networking device to connect wirelessly Cost / Hardware Components

  7. Tunnel to Router Interface • Phone to Router API Interface • Router TCP State Driver • Phone Ping Communication Demo • Router Abstract Tester • Router UDP/ICMP Stateless Driver • Phone TCP Driver • Phone UDP/ICMP Stateless Driver Tasks

  8. Completed Router Development

  9. Subdivided into 4 threads: • Tunnel Interface • Incoming processing • Phone/Router Interface • Outgoing processing • Threads communicate through a thread safe shared resource (Called buffer_queue) • Linux GNU C library (POSIX compliant) Router Design Overview

  10. Created both a C and Java version • A shared resource that allows neighboring threads to communicate • Enables multi-threading • Acts like any queue but requires no memory copy (stores pointers) • Tailored for network traffic • Performs atomic operations in order to be thread safe buffer_queue / BufferQueue

  11. Simplified VHL Design

  12. Must hook requests from the Kernel to the userspace program • TUN driver performs this, but must be properly configured • Can be acquired via file descriptor with root privileges from the userspace program • Must reconfigure the routing tables • No processing performed • Simply passes incoming requests to the next thread, and outgoing data through the network • Developed the program that properly configures the TUN driver • Developed a script that performs all necessary changes Tunnel Interface Thread

  13. Source/Destination Computer Router, Kernel Mode WLAN / ETH IPTables (Firewall) TUN Router, User Mode User Mode Program Tunnel Interface Structure

  14. L3  L5 • Protocol dependent • Replace protocol header with a simplified command • TCP: • Connection Oriented • Requires State Machine (Requires Complexity) • Must synchronize with the phone • UDP/ICMP: • Connectionless / Best Effort • Stateless • Encapsulate completed requests with the correct protocol header Incoming/Outgoing Processing Thread

  15. Reliable protocol to the expense of complexity • Simplifications • Many Options, simplified to: • MSS (1460) • Do not process TSTAMP, SACK, etc. • NO IP fragmentation • NO physical way to process PSH, or Urgent ptr • Must maintain a TCP state machine in order to encapsulate the correct header • Max Window (Both ends) = 9 * MSS • In case of network error all outgoing data is saved until ACK TCP

  16. Google provides a utility program that allows USB communication through a program called ADB ADB allows for TCP or UDP port forwarding. A host socket channel started from the phone can connect to a client socket on the host computer (router) Packets are sent continuously through the port, and all requests confirmed or declined depending on the state on both ends. Phone to Router Interface Thread

  17. User Mode Program ADB/USB Cell Phone Android Program Internet Phone/Router Interface

  18. Simplified VHL Design

  19. Completed Phone Development

  20. Ping Program • Java Elements • EditText • TextView • Buttons Phone Progress

  21. Communication Program Currently working on the TCP protocol Future work includes UDP & ICMP Phone Progress

  22. TimeLine

  23. September October

  24. Novemeber December

  25. Questions

More Related