Energy Consumption Studies for 3G Traffic Consolidation on Android
Total Page:16
File Type:pdf, Size:1020Kb
Final thesis Energy Consumption Studies for 3G Traffic Consolidation on Android using WiFi and Bluetooth by Ugaitz Moreno Arocena LITH-IDA-EX-2014/ERASMUS-A{14/002{SE 2014-01-05 Final thesis Energy Consumption Studies for 3G Traffic Consolidation on Android using WiFi and Bluetooth by Ugaitz Moreno Arocena LITH-IDA-EX-2014/ERASMUS-A{14/002{SE 2014-01-05 Supervisor: Ekhiotz Jon Vergara Examiner: Simin Nadjm-Tehrani Abstract Mobile phones have evolved from being devices just to make phone calls to become smartphones with added capabilities like surfing the network. Wireless communication has played a very important role in the evolution of smartphones. The work in this thesis aims to study the potential to reduce the energy consumption of the 3G communications by using a hybrid architecture. An idea first presented in the paper by Vergara and Nadjm-Tehrani [1]. This architecture consists of a group of nodes that communicate using WiFi or Bluetooth to forward their traffic using one node's 3G interface. In this thesis the named energy sharing scheme is implemented on Android mobile devices and experiments have been performed using a number of realistic traces to assess achievable gains and the energy footprint of the scheme itself. Even though communication technologies, screen features, multimedia capabilities, or processing power have been taken to the highest level, phones' batteries have not improved at the same speed. Nowadays battery lifetime has become a major issue with respect to cellular communication. With 3G communications Internet connection anytime and anywhere is provided to the terminals but this technology is optimized for peak perfor- mance whereas in underutilization it wastes a lot of energy. This makes it a big black hole from power consumption point of view when transmitting small amounts of data. iii Contents 1 Introduction 1 1.1 Background . 1 1.2 Motivation . 2 1.3 Problem Definition . 2 1.4 Goals . 4 1.5 Eval. Methodology . 4 1.6 Related Works . 4 1.7 Report Structure . 5 2 Android 6 2.1 Architecture . 6 2.2 Implementing for Android . 8 2.3 Android Connectivity . 8 3 Wireless Technologies in Android 9 3.1 3G . 9 3.1.1 Network Architecture . 9 3.1.2 UE States and Data Transmissions . 10 3.2 WiFi . 11 3.2.1 WiFi Network Architeture . 11 3.2.2 Scanning Networks . 12 3.2.3 Connecting . 13 3.3 WiFi-Direct . 13 3.3.1 Architecture . 13 3.3.2 Discovery . 15 3.3.3 GO Negotiation . 15 3.3.4 Protection Setup and Configuration . 15 3.4 Bluetooth . 15 3.4.1 PAN Profile Architecture . 16 3.4.2 Inquiry . 17 3.4.3 Paging . 17 3.4.4 Bluetooth in Android . 17 3.5 Tethering . 17 v CONTENTS CONTENTS 4 Implementation 19 4.1 WiFi . 20 4.2 WiFi-Direct . 20 4.3 Bluetooth . 22 5 Evaluation 24 5.1 Testing Environment . 24 5.2 Software Instrumentation . 26 5.3 Emulation and Measurement . 27 5.4 Evaluation Criteria . 30 6 Results 31 6.1 Architecture formation . 31 6.1.1 Enabling radio interfaces . 32 6.1.2 Idle . 33 6.1.3 Scanning . 35 6.1.4 Connection . 36 6.1.5 Connected . 37 6.1.6 Group Formation Process . 38 6.2 Client Data Transmission . 38 6.3 3G Energy consumption . 40 6.4 Hybrid vs. Pure 3G Scenario . 41 7 Conclusions and Future Works 45 7.1 Conclusions . 45 7.2 Future Works . 46 vi Chapter 1 Introduction This report describes the work and results of a Master's Thesis Project (30 ECTS) as a partial fulfilment of a Master degree in Embedded Systems at Mondragon Unibertsitatea. The thesis has been performed at the Depart- ment of Computer and Information Science at Link¨oping University as an Erasmus exchange project. This chapter provides the necessary background information to follow the explanations of the work with a description of the motivation, problem definition, goals and methodology used in the project. Finally the work describes the structure of the rest of the report. 1.1 Background Mobile phones have evolved from being devices just to make phone calls to become smartphones with added capabilities like surfing the network. Such capabilities have proven to be essential to the users and nowadays there are around 1.4 billion active smartphones in the world [14, 15], one for every five inhabitants [16]. Among the smartphones Android is the most widespread operating system with 75 percent of market share at the time of performing the thesis [15]. This evolution has not been balanced in all aspects. Even though communication technologies, screen features, multimedia capabilities, or processing power have been taken to the highest level, phones' batteries have not improved at the same speed. Although ubiquitous connection to the Internet and advanced communication features are real, the devices run out of battery faster than their users would like. This reduces the quality of experience of the users that see themselves forced to charge their device every day. Smartphones will continue evolving to bring the newest technologies and features but batteries have to improve faster and more not to decrease their duration and become a real problem for the users. Even if battery technology might improve providing longer lifetimes, the energy efficient usage of the 1 1.2. MOTIVATION CHAPTER 1. INTRODUCTION battery resource is paramount. 1.2 Motivation Wireless communications have played a very important role in the evolution of smartphones. Different technologies have been applied on the field making possible the data transmission between devices or connection to the Internet with almost true mobility for the user. These technologies are divided in two groups in this thesis: Long-range wireless technologies and short-range wireless technologies. In general long-range technologies offer a wider range of mobility associated with a greater energy consumption, whereas short- range technologies offers a reduced energy consumption and mobility. Third generation of mobile telecommunications technology (3G) is cur- rently the most widespread one in the first group. It provides the phones with Internet connectivity anytime and anywhere but it is optimized for peak performance whereas when underutilized it wastes a lot of energy. Technologies in the short-range group such as Wi-Fi, Wi-Fi Direct or Bluetooth entail limited coverage areas. While they offer more restricted connection to the Internet they also enable direct communications between devices. Even if Wi-Fi has spread a lot during last years the required infras- tructure to offer ubiquitous connectivity is not a reality and the daily use of 3G connectivity drains users' batteries. A hybrid architecture that combines the energy efficient aspects of both short and long range technologies has the potential to become the key to more energy efficient communications. When several users are underutilizing their 3G connection, the wasted energy taking into account the group of nodes reaches more significant values. This is where the hybrid architecture is helpful as this device grouping not only increases the total energy loss in an area but also opens the door to new collaborative solutions to try to reduce the energy consumption. 1.3 Problem Definition The work of this thesis consists of implementing a hybrid architecture com- bining long and short range wireless technologies in real devices in order to analyse the energy consumption of a group of devices using their own inter- net connections and the hybrid architecture. These scenarios are named as pure 3G and hybrid architecture during the report. The idea of forming a group of nodes to save energy while the 3G inter- face is being underutilized has been first presented in the paper by Vergara and Nadjm-Tehrani [1]. The hybrid architecture is formed by a cluster com- posed of two types of nodes: A cluster head and cluster members. The members send the data to the cluster head which is responsible for gather- ing all the data and transmitting it through its 3G connection as for sending 2 1.3. PROBLEM DEFINITION CHAPTER 1. INTRODUCTION back the information coming from the Internet to the clients. The one-hop communication between the members and the cluster head is achieved using the aforementioned short range communication technologies. Figure 1.1 illustrates the previously described structure generically and from communications point of view. Figure 1.1: Illustration of 3G and hybrid architectures. With the hybrid architecture all nodes except the cluster head stop using their underutilized 3G connection to use a short range technology that is more efficient to transfer small amounts of data. As a drawback, the cluster head adds more traffic to its 3G communications and keeps permanently ac- tive another radio interface, the one needed for the communication with the members. Increasing this node's 3G traffic to high utilization level reduces the energy loss as the 3G technology is more efficient in high utilisation. After clarifying these facts, it is worth to remark that the aim of the ar- chitecture is to achieve a reduction in the energy consumption of the whole group, taking into account all the nodes. In the aforementioned work, a rotation scheme was suggested to change over the time the only node relaying all the traffic. This mechanism is not aimed to improve the energy saving but to balance the consumption of all nodes forming the group. The cluster head has higher power consumptions associated and rotating this role makes all nodes act as the device with the highest battery drain. Although this thesis and the work on which the hybrid architecture is based share the main idea, there are two remarkable differences between the works: (1) in that paper, they implemented the proposed architecture using Wi-Fi whereas in this work it is implemented using different short range technologies (Wi-Fi, Wi-Fi Direct and Bluetooth), and (2) in this project the architecture is implemented in real devices allowing to measure the power consumption directly in handsets instead of doing it through simulations.