A Bundle Protocol Implementation for Android Devices Johannes Morgenroth
Sebastian Schildt
Lars Wolf
Institute for Operating Systems and Computer Networks ¨ Braunschweig Technische Universitat Braunschweig, Germany morgenroth|schildt|
[email protected]
ABSTRACT
deterministic scenarios from Interplanetary Networking and can not only run on Linux but also supports the VxWorks RTOS. Recently there has been some research interest into realizing DTN like networks with smartphones. These endeavours have been termed Pocket Switched Networks (PSN) [2]. The Haggle project3 offers a version for their data centric opportunistic communication middleware for Android and IOS smartphones. For RFC 5050 based DTNs the Bytewalla project [1] offers a Java implementation for Android that is basically a reimplementation of the DTN2 C++ code in Java. In this demo, we present IBR-DTN for Android. IBRDTN is an actively developed efficient Bundle Protocol daemon with a special focus on embedded devices. We added an Android service abstraction layer and developed some DTN Apps for Android. The resulting implementation is available in the Google Play Store and can run on all un-rooted Android devices which support at least version 2.3 of the Android operating system.
In this demo we present IBR-DTN for Android: IBR-DTN is a fully featured RFC5050 [5] compliant Bundle Protocol implementation that can run on un-rooted Android devices starting from Android Version 2.3 (Gingerbread). IBR-DTN for Android supports all features of the IBR-DTN version for PCs and embedded systems. It is available in the Google Play Store for free. In addition to the protocol stack we provide two simple real world applications: a text messaging system and a pushto-talk application. They can serve as an example how to build DTN applications for mobile phones as both applications as well as the protocol implementation itself are open sourced.
Keywords Bundle Protocol, DTN, SmartPhones, Mobile Phones, Android
1.
INTRODUCTION 2.
Today it is accepted within the networking community that continuous end-to-end connectivity will not be available all the time, not even in wired networks. DTNs replace the end-to-end semantics of common protocols such as IP with a hop-by-hop store-and-forward architecture [3]. Mobile nodes carry messages (“bundles”) and forward them to other nodes they might meet later. The standardized Bundle Protocol [5] specifies how to realize a DTN network. Several well-known implementations exist: DTN21 is the reference implementation of the Bundle Protocol by the Delay Tolerant Networking Research Group (DTNRG). It provides a flexible framework for DTN related experiments. IBR-DTN [4] is a lightweight, modular and highly portable Bundle Protocol implementation which has been designed to run on embedded systems as well as on big servers. The Interplanetary Overlay Network (ION)2 is a Bundle Protocol implementation from the JPL that focusses on 1 2
ARCHITECTURE
IBR-DTN for Android is not a reimplemented or cutdown version of a Bundle Protocol implementation. Instead it runs the full-featured IBR-DTN daemon including security support and extended routing schemes. This gives all the flexibility and capabilities of a full IBR-DTN installation. It is not necessary to root the phone in order to use IBR-DTN. The daemon process that implements the Bundle Protocol is written in C++ and compiled for the device’s target architecture. It runs in the background and is managed by an Android service. Currently the IBR-DTN Android distribution available in the Google Play Store includes support for Android devices with ARM and x86 processors. Since Android applications have different needs as applications on standard computers, we have designed a intermediate layer between the applications and the daemon process. As shown in figure 1, this layer translates IBR-DTN’s normal TCP based API into the Android concept of asynchronous event-based communi-
http://sourceforge.net/projects/dtn/ https://ion.ocp.ohiou.edu/
3
1
http://www.haggleproject.org/
DTN Enabled Android Apps AndroidBroadcast Intents
Android IBinder API
Android Service
Android Service API
IBR-DTN TCP API
Intent Management
App Registry
IBR-DTN Daemon Asynchronous Events
API Server
Discovery Agent
IPND DHT
Connection Manager
HTTPCL UDPCL TCPCL
get Simple SQLite
Bundle Storage
Event Switch
transmit
Wall Clock
get/store
Base Router Epidemic
Static Neighbor
PRoPHET
Figure 1: IBR-DTN Architcture for Android cation which notifies or wakes up applications when needed. Installed DTN applications register to a DTN Service which is provided by the IBR-DTN application package. The Registration includes the own application identifier and one or more Endpoint Identifier (EID) the applications is interested in. Once the registration process is finished, the application binds to the DTN Service and initiates a Session. This Session information will be persisted by the DTN Service even after the application decides to terminate itself to save resources on the phone. If the daemon receives a new bundle for a registered application, the DTN Service will send an Intent to the previously registered application. This Intent will wakeup the application if it is not running. When receiving the intent, the application will receive and process the bundle. Besides the API, the DTN service also provides a frontend (figure 2(a)) to configure and manage the underlying daemon. Some of the management functionality is available through the service API as well. This includes notifications about discovered neighbours and daemon states such as “daemon running” or “daemon stopped”.
3.
cations is a logical choice as it offers the needed opportunistic communication paradigm. Furthermore you can immediately profit from easy integration with backend servers that already support the Bundle Protocol. With IBR-DTN for Android we contribute a framework that allows to build DTN applications on mobile devices with ease. Together with the IBR-DTN package, we published two applications in the Android Play Store. Both are available as open-source and provide an introduction to application developers.
3.1
Whisper
Whisper (figure 2(b)) is a DTN based messaging application. It supports presence sensing by using DTN group messages and allows the sending of text messages to other users. A user can set a nickname for the chat and can choose the validity of sent messages up to two weeks. Messages can be received even when the Whisper application is not running. The IBR-DTN daemon uses an Android Intent to notify an inactive Whisper application of incoming messages.
3.2
Talkie
Talkie (figure 2(c)) is a DTN based push-to-talk application. When Talkie is activated using the speak button or by the proximity sensor of the mobile phone, sound will be recorded and upon deactivation of the recording function it will be sent to the Talkie group using IBR-DTN. A receiving Talkie instance will either
APPLICATIONS
As the Bundle Protocol ecosystem matures and more and more research work is done in the area of PSNs using the Bundle Protocol to implement PSN appli2
(a) Daemon Configuration
(b) Whisper application
(c) Talkie application
Figure 2: IBR-DTN service and application GUI are available for download in the Google Play Store. Additionally we provide full sources for IBR-DTN, the Android extensions as well as the example applications on the project website4 .
only add received messages to the GUI or play them automatically.
4.
DEMONSTRATION
The demonstration of IBR-DTN will be a hands-onevent. We will show some prepared smartphones with the application presented in section 3. Since IBR-DTN can run on any Android device starting from Android version 2.3 and because the software is available in the Google Play Store we invite visitors to install IBR-DTN and the application on their private devices. As unrooted Android devices do not support Ad-Hoc WiFi, we will bring some WiFi APs, turn them into DTN nodes with the IBR-DTN software and deploy them on the conference campus to connect the smartphones to each other. Depending on the configuration it might also be possible to use the conference WiFi. With this everybody can use the the system just like a real Walkie Talkie system, although depending on the number of interested users some radio discipline might be required. We hope this demonstration will motivate some attendees to realize their own Bundle Protocol based applications for Android using IBR-DTN.
5.
Acknowledgments This work has been supported by the NTH School for IT Ecosystems.
6.
REFERENCES
[1] S. A. Abdullah Azfar, Jiong Jiang, Li Shan, Maria Jose Peroza Marval, Rerngvit Yanggratoke. ByteWalla : Delay Tolerant Networks on Android phones. Technical report, KTH Telecommunication Systems Laboratory, 2010. [2] C. Caini, P. Cornice, R. Firrincieli, M. Livini, and D. Lacamera. DTN meets smartphones: Future prospects and tests. Wireless Pervasive Computing (ISWPC), 2010 5th IEEE International Symposium on DOI 10.1109/ISWPC.2010.5483772, 2010. [3] V. Cerf, S. Burleigh, A. Hooke, L. Torgerson, R. Durst, K. Scott, K. Fall, and H. Weiss. Delay-Tolerant Networking Architecture. RFC 4838 (Informational), Apr. 2007. [4] S. Schildt, J. Morgenroth, W.-B. P¨ottner, and L. Wolf. IBR-DTN: A lightweight, modular and highly portable Bundle Protocol implementation. Electronic Communications of the EASST, 37:1–11, Jan. 2011. [5] K. Scott and S. Burleigh. Bundle Protocol Specification. RFC 5050 (Experimental), Nov. 2007.
CONCLUSIONS
We presented IBR-DTN for Android, a fully featured, no-compromise Bundle Protocol implementation for Android. IBR-DTN can run on un-rooted smartphones and is compatible with other Bundle Protocol implementations such as DTN2, ION and the standard IBRDTN version. IBR-DTN for Android can be used to develop novel applications in the area of PSNs or DTN research in general. IBR-DTN and demo applications
4
3
http://www.ibr.cs.tu-bs.de/projects/ibr-dtn