Accessing Cellular Network Efficiently Without the Battery Drain. Lee, Chang Hwan, SK Telecom lipisoft at gmail dot com Kandroid: Lipi(리피)

Similar documents
Coding for Life--Battery Life, That Is

AT&T Developer Program

DAY 2. HSPA Systems Architecture and Protocols

Executive Summary. Performance Report for: The web should be fast. Top 1 Priority Issues. How does this affect me?

Rethinking Cellular Architecture and Protocols for IoT Communica9on

Virtual Evolved Packet Core (VEPC) Placement in the Metro Core- Backhual-Aggregation Ring BY ABHISHEK GUPTA FRIDAY GROUP MEETING OCTOBER 20, 2017

Executive Summary. Performance Report for: The web should be fast. Top 4 Priority Issues

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues

Native Deployment of ICN in 4G/LTE Mobile Networks

IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps://

An In-depth Study of LTE: Effect of Network Protocol and Application Behavior on Performance

5G: an IP Engineer Perspective

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

MME SGW PGW. 17-Feb-14 21:15 (Page 1) This sequence diagram was generated with EventStudio Sytem Designer -

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

AT&T Developer Program

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

FlexiWeb: Network-Aware Compaction for Accelerating Mobile Web

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues

Exam Questions 4A0-M02

E. The enodeb performs the compression and encryption of the user data stream.

Performance Report for: Report generated: Tuesday, June 30, 2015, 3:21 AM -0700

AT&T Developer Program

CS118 Discussion 1A, Week 9. Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m.

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

OSI Transport Layer. objectives

OFFLINE MODE OF ANDROID

Towards Understanding TCP Performance on LTE/EPC Mobile Networks!

LTE Radio Interface Architecture. Sherif A. Elgohari

LTE system performance optimization by RED based PDCP buffer management

Transparent Edge Gateway for Mobile Networks

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

TTCN3 in Wireless Testing Eco Space

PageSpeed Insights. Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.


AGENCE WEB MADE IN DOM

5G Core Network Standardization

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Mobile Middleware Course. Mobile Platforms and Middleware. Sasu Tarkoma

LTE-Advanced Relay. Oct 18, 2011

20-CS Cyber Defense Overview Fall, Network Basics

Very Tight Coupling between LTE and WiFi: a Practical Analysis

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

System Architecture Evolution

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

IxLoad LTE Evolved Packet Core Network Testing: enodeb simulation on the S1-MME and S1-U interfaces

Accelerating 4G Network Performance

Primebit Solution EXPERT DIPLOMA IN PROTOCOL TESTING COURSE CONTENT

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

COMS Introduction to Computers. Networking

Business Data Networks and Security 10th Edition by Panko Test Bank

UE Context Retention

Virtual Mobile Core Placement for Metro Area BY ABHISHEK GUPTA FRIDAY GROUP MEETING NOVEMBER 17, 2017

Over-The-Top (OTT) Aggregation Solutions

A Machine Learning Based Approach to Mobile Network Analysis

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Requirements for 5G Fronthaul

BIG-IP Access Policy Manager : Portal Access. Version 12.1

embms application tests with the R&S CMW 500 and R&S CMWcards

EXAM TCP/IP NETWORKING Duration: 3 hours

UDP, TCP, IP multicast

Computer Networks. More on Standards & Protocols Quality of Service. Week 10. College of Information Science and Engineering Ritsumeikan University

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

Introduction to computer networking

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

Chapter 8 roadmap. Network Security

Network Model. Why a Layered Model? All People Seem To Need Data Processing

BIG-IP Access Policy Manager : Portal Access. Version 13.0

Data and Computer Communications. Chapter 2 Protocol Architecture, TCP/IP, and Internet-Based Applications

This section describes MME support for Cell Traffic Trace.

Introduction to Information Science and Technology 2017 Networking II. Sören Schwertfeger 师泽仁

Long Term Evolution - Evolved Packet Core S1 Interface Conformance Test Plan

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

NTT DOCOMO Technical Journal

Executive Summary. Performance Report for: The web should be fast. Top 5 Priority Issues. How does this affect me?

How the Internet Works

4A0-M02. Alcatel-Lucent. Alcatel-Lucent Mobile Gateways for the LTE Evolved Packet Core

Configuring Flood Protection

Certkiller 4A0-M02 140q

Administrator's Guide

Copyright 2012 Alcatel-Lucent. All Rights Reserved. TMO21026_V2.0-IG-EN-LE5.0-Edition 1 Section 1 Module 2 Page 1

Nr. Standard reference Title

OSI Layer OSI Name Units Implementation Description 7 Application Data PCs Network services such as file, print,

Just enough TCP/IP. Protocol Overview. Connection Types in TCP/IP. Control Mechanisms. Borrowed from my ITS475/575 class the ITL

Business Case for the Cisco ASR 5500 Mobile Multimedia Core Solution

LTE EPC Emulators v10.0 Release Notes - Page 1 of 15 -

Computer Networking. Chapter #1. Dr. Abdulrhaman Alameer

Development Progress of 5G Core in OAI

Evaluation of End-to-End TCP performance over WCDMA

Lab - Using Wireshark to Examine a UDP DNS Capture

Dedicated Core Networks on MME

Browser behavior can be quite complex, using more HTTP features than the basic exchange, this trace will show us how much gets transferred.

LTE Relay Node Self-Configuration

Lab - Using Wireshark to Examine a UDP DNS Capture

ECE 650 Systems Programming & Engineering. Spring 2018

Transcription:

Accessing Cellular Network Efficiently Without the Battery Drain Lee, Chang Hwan, SK Telecom lipisoft at gmail dot com Kandroid: Lipi(리피)

Contents Wired vs Cellular Cellular Network LTE Protocol Stack LTE RRC state AT&T ARO Monitor Battery status and Connectivity Case Study Remove unnessary traffic TCP FIN Retry Redirect to Mobile Web page Additional Readings

Wired vs Cellular(Protocol Stack) User Plane Application layer Application HTTP Transport layer Transport TCP/UDP Network layer Internet IP Presentation layer HTTP Session layer NAS IP RRC PDCP Data link layer Link RLC Ethernet / Wi-Fi MAC Physical layer OSI model TCP/UDP Control Plane Physical DoD model PDCP: Packet Data Convergence Protocol RLC: Radio Link Control MAC: Medium Access Control TCP/IP suite LTE UE model NAS: Non Access Stratum RRC: Radio Resource Control

Cellular Network(LTE) Uu UE S1-U S5 enb SGW S1-MME S11 SGi PGW Internet MME S8 User Plane [Roaming] Control Plane Uu UE S1-U enb SGW S1-MME S11 MME UE: User Equipment enb: enodeb MME: Mobility Management Entity SGW: Serving Gateway PGW: PDN Gateway PDN: Packet Data Network

LTE Protocol Stack Control Plane

LTE Protocol Stack User Plane

LTE RRC State and Time Consumption RRC CONNECTED RRC IDLE Continuous Reception 0.1 sec IDLE 0.1 sec < 0.05 sec 10 sec Tail Data Transfer Timer Expiration

Power states of LTE Radio is the second most expensive component after screen Radio use is expensive regardless of transfer size

Download a HTML page in your App 1. Launch the Application 2. RRC IDLE -> RRC CONNECTED a. It takes 2 seconds at 3G network 3. DNS Query to DNS Server and Response 4. TCP SYN, SYN/ACK, ACK 5. HTTP GET Request/200 OK

AT&T ARO Application Resource Optimizer Latest Version: 2.4 Open Source(https://github.com/attdevsupport/ARO), Apache License 2.0 Data Collector must be Rooted(su command is required) in Android tcpdump is used for packet capture in Android NetMon in Windows Data Analyzer Windows & Mac OSX(Java based) Filter per an application/ip address Flurry is used but can be removed from source code and rebuild it Limitation HTTP Header in HTTPS can t be analyzed

AT&T ARO Data Analyzer

ARO Best Practice Text File Compression Duplicate Content Cache Control Cach Expiration Content Prefetch Combine JavaScript and CSS requests Resize Images for Mobile Minify CSS, JS, and HTML Managing Imags with CSS Sprites Opening Connections Multiple Simultaneous TCP Connections Periodic Transfer Screen Rotations Closing Connections Offloading to Wi-Fi Third-Party Scripts HTTP 400 and 500 Error Codes HTTP 300 Status Codes Asynchronous Load of JavaScript in HTML HTTP 1.0 Usage File Order of External Style Sheets and Scripts Empty Source and Link Attributes Flash Files Displaying None in CSS Accessing Peripherals Comparing LTE and 3G Energy Consumption Content Optimazation for Mobile Devices

Text File Compression No encoding method is specified in HTTP header

Text File Compression HTML, CSS, JavaScript, Text is used HTTP 1.1 can support gzip, DEFLATE Limitation image format and media format very small files How to App send Accept-Encdoing:gzip, deflate in HTTP request header Server send Content-Encoding:gzip or deflate in HTTP response header

Periodic Data Transfer Minimize the periodic data transfers Avoid polling, leverage server push such as GCM(Google Cloud Message) coalesce, defer requests

Closing Connections FIN Handshaking Only No Data(Payload)

Cache Control/Expiration Same contents Cache should be used

Optimizing Battery Life Monitoring the Battery Level and Charging State Determining and Monitoring the Docking State and Type Determining and Monitoring the Connectivity Status Manipulation Broadcast Receivers On Demand

Monitoring the Battery Level and Charging State Determine the Current Charging State IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); Intent batterystatus = context.registerreceiver(null, ifilter); // Are we charging / charged? int status = batterystatus.getintextra(batterymanager.extra_status, -1); boolean ischarging = status == BatteryManager.BATTERY_STATUS_CHARGING status == BatteryManager.BATTERY_STATUS_FULL; // How are we charging? int chargeplug = batterystatus.getintextra(batterymanager.extra_plugged, -1); boolean usbcharge = chargeplug == BatteryManager.BATTERY_PLUGGED_USB; boolean accharge = chargeplug == BatteryManager.BATTERY_PLUGGED_AC;

Monitoring the Battery Level and Charging State <receiver android:name=".powerconnectionreceiver"> <intent-filter> <action android:name="android.intent.action.action_power_connected"/> <action android:name="android.intent.action.action_power_disconnected"/> </intent-filter> </receiver> public class PowerConnectionReceiver extends BroadcastReceiver { @Override public void onreceive(context context, Intent intent) { int status = intent.getintextra(batterymanager.extra_status, -1); boolean ischarging = status == BatteryManager.BATTERY_STATUS_CHARGING status == BatteryManager.BATTERY_STATUS_FULL; int chargeplug = intent.getintextra(batterymanager.extra_plugged, -1); boolean usbcharge = chargeplug == BatteryManager.BATTERY_PLUGGED_USB; boolean accharge = chargeplug == BatteryManager.BATTERY_PLUGGED_AC; } }

Monitoring the Battery Level and Charging State Determine the Current Battery Level int level = batterystatus.getintextra(batterymanager.extra_level, -1); int scale = batterystatus.getintextra(batterymanager.extra_scale, -1); float batterypct = level / (float)scale; Monitor Significant Changes in Battery Level <receiver android:name=".batterylevelreceiver"> <intent-filter> <action android:name="android.intent.action.action_battery_low"/> <action android:name="android.intent.action.action_battery_okay"/> </intent-filter> </receiver>

Determining and Monitoring the Connectivity Status Check an Internet Connection ConnectivityManager cm = (ConnectivityManager) getsystemservice(context. CONNECTIVITY_SERVICE); NetworkInfo activenetwork = cm.getactivenetworkinfo(); boolean isconnected = activenetwork!= null && activenetwork.isconnectedorconnecting(); Check the Type of Internet Connection boolean iswifi = activenetwork.gettype() == ConnectivityManager.TYPE_WIFI; boolean ismobile = activenetwork.gettype() == ConnectivityManager.TYPE_MOBILE; Monitor for Changes in Connectivity <action android:name="android.net.conn.connectivity_change"/>

Manipulating Broadcast Receivers On Demand wake the device each time any of these receivers is triggered enable or disable the broadcast receivers at runtime ComponentName receiver = new ComponentName(context, myreceiver.class); PackageManager pm = context.getpackagemanager(); pm.setcomponentenabledsetting(receiver, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);

Case Study

Bank Application ELAPSED_WAKEUP #10: Alarm{42885370 type 2 com.sc.danb.scbankapp} type=2 when=+4m39s363ms repeatinterval=300000 count=1 operation=pendingintent{431152f8: PendingIntentRecord{43bd0570 com.sc.danb.scbankapp broadcastintent}} The trial of useless connection should be removed in your app.

netstat /proc/net/tcp, udp, tcp6, udp6 is used in netstat command After half closed server triggers, later Android s FIN is not acknolwledged from server The FIN is retried to the app s server about 8 times The server s last ACK for FIN should be sent to Android handset

No redirection to mobile pages HTTP Request should be redirected to mobile page Loading time too long But \(root)page can be redirected to mobile page

Addintional Readings 2013 AT&T Developer Summit - Turbocharge Your Mobile App (http://soc.att.com/w0kv6h), Doug Sillars Google IO 2013 - Mobile Performance from Radio Up (http://bit.ly/11fztna), Ilya Grigorik High Performance Browser Networking(http://bit. ly/12kia3y), Ilya Grigorik DevBytes: Efficient Data Transfers(http://bit. ly/1guf8er), Reto Meier