mizzou1nsf1

University of Missouri REU Summer 2011

Android Wifi Ad-Hoc Photo Sharing

Faculty Mentor: Dr. Dale Musser

Graduate Mentors: Paul Baskett & Tiancheng Zhuang

Undergraduates: Philip Hanna & Jordan Hull

Wifi Photo Sharing Android Application

0. ABSTRACT
The purpose of this project was to allow users to share images over an ad-hoc network. Android phones currently do not have API support for ad- hoc communication between phones. In this project, rooted Android phones and installed drivers were used that allow users to set up Wi-Fi communication between phones and transfer images. With this Wi-Fi capability, the average user could set up an ad-hoc network and share data with other Android phones using an application downloaded from the Android Market.


1. INTRODUCTION
The ability to communicate in an ad-hoc network with Android phones has many positive implications. Users would be able to communicate with each other in a situation where there is no internet access. Users would also be able to send data over a connection that is not limited by their carrier's data or messaging plans. Ad-hoc communication would allow social applications like photo-sharing to provide a new way to network with other users who are in the same location. Users in the same location have a high probability of sharing similar interests. For example, a network of users with a photo-sharing application at a sporting event could share images of the game from their point of view. With the chat function implemented in the application, users could discuss the game. The network could also be used as a way to send announcements to attendees of an event.


2. METHOD - WIFI
The next method was to use the Wi-Fi capabilities of Android phones to communicate directly with other Android phones. The phones were rooted to allow the Wi-Fi drivers to be loaded onto the phone, as the current Android API does not support phone-to-phone Wi-Fi communication. The adapter settings (IP, ESSID, Frequency, Mode, Netmask, etc.) were then reconfigured. When the user elects to send a file, a handshake occurs between the two phones before sending the file packets. This handshake is made possible by the Ad-hoc On-Demand Distance Vector routing protocol (AODV). The AODV protocol updates the routing table when a message needs to be sent. It also periodically broadcasts a message to find neighboring nodes. The Wi-Fi image transfer speed was determined by sending a 2MB image 20 times between two phones using the Wi-Fi application. The average transfer rate was found to be 264 KB/s. This speed was decided to be fast enough to share images in a network and Wi-Fi was chosen as the communication medium for this project. The following graph shows the test results for the image transfer rate over Wi-Fi.


3. RESULTS
By using the Wi-Fi capabilities unlocked in the Android phones, this project succeeded in sharing images between phones in a network. Users with rooted phones can discover other users within the range of their Wi-Fi radios. A contact list is displayed that allows the user to see who is physically within their Wi-Fi's range. Users can then select to either chat or send another user an image by selecting that user's name. If the users elects to send an image, the default Android Gallery is opened and users can navigate a familiar experience to select the photo they wish to send. The chat option opens a simple chat client and allows for typical chat capabilities. Users can also open an instance of the Android Gallery to view all of their images that they have taken or received through the application. There is also an option to open up an instance of the Android Camera application in order to take pictures without having to leave the application.


4. FUTURE GOALS
A multi-hop network was not achieved, although future work on this project could accomplish this goal by implementing routing methods. A multi-hop implementation would allow for larger networks in terms of area. Users would be able to send photos that are not physically within the Wi-Fi's range. Also, image compression and decompression could also allow for faster transfer speeds. With increased transfer speeds and multi-hop routing, users could have the option of sending an image to multiple users at once without consuming too much bandwidth. The application does not currently auto-assign a spoofed IP address for each device, so it is possible that users could pick the same address. If two users pick the same address currently, they cannot see each other in the contact list. Also, currently a phone can only receive one file at a time and cannot receive a file while sending one. Future work could be done to allow multiple transmissions. Security could also be improved in future versions of the application. Preventing unauthorized users from sending malware or other unwanted files to phones using the PhotoShare application is a priority. Stability in the sending and receiving of files could also be improved to make the network more secure.


5. CONCLUSION
An ad-hoc network on Android can be created and can be used to share images with other users in that location. Wi-Fi proved to be the fastest, most reliable method of image transfer. However, it requires a rooted phone. The typical Android user will not be able to use this application, but if the Wi-Fi capabilities of Android devices are supported in the future by Google, an ad-hoc network is one possible application.


6. REFERENCES
"Adhoc-on-android - Java Library That Provide Creation and Termination of Ad-hoc Networks on the Android Platform with Multi-hop Communication through the AODV Routing Protocol - Google Project Hosting." Google Code. Web. 27 July 2011. . Android Developers. Web. 27 July 2011. . "Szym.net ยป Barnacle Wifi Tether." Szym.net. Web. 27 July 2011..



Poster



Philip Hanna
Undergraduate Student: Computer Engineering
Washington University in St. Louis
Email: philip.hanna21@gmail.com

Jordan Hull
Undergraduate Student: Computer Science
Southwest Baptist University
Email: jordanhull90@gmail.com

Paul Baskett
Graduate Mentor: Computer Science
University of Missouri - Columbia
Email: pkbkbc@mail.mizzou.edu

Tiancheng Zhuang
Graduate Mentor: Computer Science
University of Missouri - Columbia
Email: tz9q3@mail.mizzou.edu 

Dale Musser
Faculty Mentor: Computer Science
University of Missouri - Columbia
Email: musserda@missouri.edu