61
Delay-tolerant Networking Using Wi-Fi Direct Stephen Naicken Visiting Research Fellow, Sussex University Droidcon 2013

Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Embed Size (px)

DESCRIPTION

Mobile connectivity is notoriously poor in football stadia due to their construction and the high density of users. Yet, football fans increasingly expect the same level of connectivity and access to services that they experience elsewhere. In this talk, we present our proposed solution – sharing Internet connectivity and content over data connections betweens fans’ smartphones that form a delay tolerant network (DTN). The talk is focuses on: the issues existing technologies face when attempting to provide Internet connectivity in densely populated areas; the delay-tolerant network developed in the Digital Stadium research project; a discussion of some the Wi-Fi Direct issues faced when developing the DTN; a summary of the User-centred approach so that the application could gain traction amongst fans; and the results of the deployment during match days.

Citation preview

Page 1: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Delay-tolerant NetworkingUsing Wi-Fi DirectStephen NaickenVisiting Research Fellow, Sussex UniversityDroidcon 2013

Page 2: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Outline

The Problem

The Solution

Wi-Fi Direct

Deployment in the AMEX Community Stadium, FalmerResultsFuture work and Conclusions

·

Poor mobile data connectivity in stadia·

·

Pocket Switched Network implementing a distributed cache withidempotent HTTP POST

·

·

Trials and tribultations·

·

·

·

2/61

Page 3: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

The ProblemPoor in-stadia mobile data connectivity

Page 4: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Dr. Ian Wakeman, Senior Lecturer at Sussex University. UEFA Champions League Final, 2012.

Page 5: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Project

EPSRC-funded research project to investigate the use of smartphonesto build new ways of communicating within stadiums

·

5/61

Page 6: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

In-stadia Mobile Data Experiences

Smartphones offer opportunities to improve the visitor experience

But poor connectivity in-stadia is a barrier to deployment of theseapplications

·

Live scores and league tablesSeat location servicePie and pint orderingVideo highlights and goal-line replays

·

·

·

·

·

6/61

Page 7: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

The American Express Community Stadium

Opened in 2011Capacity of 30750Home to Brighton and Hove Albion Football Club

·

·

·

Dominic Alves. http://www.flickr.com/photos/dominicspics/5606852371/

Page 8: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

In-stadia Mobile Data Experiments

8/61

Page 9: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Problem Statement

In a typical stadium, the concrete and steel construction and largecrowds combine to make mobile Internet access very unreliableHow can we improve connectivity so that fans can access matchdayservices?What are the possible solutions?

·

·

·

Do nothing, but EPSRC would not be impressedInvest in mobile network infrastructure to increase capacityWi-Fi

·

·

·

9/61

Page 10: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Issues with Mobile Networks

Investment in mobile networks will not yield benefits to all fans unlessall major operators investMobile network operators unlikely to be supportive of cash-strippedclubsA UK operator has invested approx. £1m to improve mobile dataconnectivity at leading Premier League club's stadium

·

·

·

Fans still complain of poor connectivity and the club accept thatvideo can still not be delivered to all fans

-

10/61

Page 11: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Issues with Wi-Fi

Cost

Performance Issues

·

Typically quoted cost to British clubs is around £500000US market costs could be around $6mTechnology spend at British clubs is typically lowMany Football League clubs would struggle to justify costs (low ROI)

·

·

·

·

·

It doesn't work too wellLow numbers of simulataneous usersUser experience is typically poor - e.g. Gillette Stadium

·

·

·

11/61

Page 12: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

The SolutionPocket Switched Networking

Page 13: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Technology Idea

13/61

Page 14: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Technology Idea

14/61

Page 15: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Technology Idea

15/61

Page 16: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Technology Idea

16/61

Page 17: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP GET

Page 18: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP GET

Page 19: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP GET

Page 20: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP GET

Page 21: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP GET

Page 22: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP GET

Page 23: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP POST

Page 24: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP POST

Page 25: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP POST

Page 26: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP POST

Page 27: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Supporting HTTP POST

Page 28: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Wi-Fi DirectTrials and Tribulations

Page 29: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Connectivity

Bluetooth

Tethering

Ad-hoc Wi-Fi

Wi-Fi Direct

·

System dialog prompts·

·

Unrestricted Internet access for all·

·

Not part of the API and requires superuser·

·

Only option open to us·

29/61

Page 30: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Starting Wi-Fi Direct on ICS

WifiP2pManager p2pManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE);// Wfd callbacks on a handler threadchannel = p2pManager.initialize(context, wfdHandler.getLooper(), channelListener);

if (!wifiManager.isWifiEnabled()) { // remember to handle exceptions gracefully Class p2pManagerClazz = Class.forName ("android.net.wifi.p2p.WifiP2pManager"); Method method = p2pManagerClazz.getMethod("enableP2p", new Class[]{WifiP2pManager.Channel.class}); method.setAccessible(true); method.invoke(p2pManager, channel); method.setAccessible(false);}

JAVA

30/61

Page 31: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Wi-Fi Protected Setup

WifiP2pConfig config = new WifiP2pConfig();config.deviceAddress = device.deviceAddress;

JAVA

// Push-Button Configurationconfig.wps.setup = WpsInfo.PBC;

JAVA

// Display pin on client, enter on GOconfig.wps.setup = WpsInfo.DISPLAY;

JAVA

// Display pin on GO, enter on clientconfig.wps.setup = WpsInfo.KEYPAD;

JAVA

p2pManager.connect(channel, config, wfdActionListener) JAVA

31/61

Page 32: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

WPS without the dialog prompts - API 16-17

Automatic acceptance of WPS PBC dialogs is possibleOnce again using reflectionAPI 16-17: WifiDirectAutoAccept.java (AllJoyn)Interception of PBC dialogs only occurs when app is in foreground

·

·

·

·

32/61

Page 33: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

And API 18...

Method m = wifiP2pManager.getClass().getMethod("startWps", channel.getClass(), WpsInfo.class, WifiP2pManager.ActionListener.class);WpsInfo wpsInfo = new WpsInfo();wpsInfo.setup = WpsInfo.PBC;m.invoke(wifiP2pManager, channel, wpsInfo, wfdActionListener);

JAVA

Starts a two minute WPS window at the Group Owner (GO)Execute WPS PBC on client to connect to GOPBC supports only one connection attempt at a timeAt supplicant, CTRL-EVENT-WPS-OVERLAP

·

·

·

·

33/61

Page 34: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Wi-Fi Legacy Connections to GO

BroadcastReceiver receiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if(intent.getAction().equals (WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION)){ wifiP2pManager.requestGroupInfo(channel, new WifiP2pManager.GroupInfoListener() { @Override public void onGroupInfoAvailable(WifiP2pGroup group) { if(group != null){ // clients require these String ssid = group.getNetworkName(), String passphrase = group.getPassphrase() } } }); } }};

registerReceiver(receiver, new IntentFilter (WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION));

wifiP2pManager.createGroup(channel, wfdActionListener);

JAVA

34/61

Page 35: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Other Issues

Samsung devices will destroy the Wi-Fi Direct group when the lastremaining client disconnectsSamsung devices have supported simultaneous infrastructure Wi-FIand Wi-Fi Direct connections since API 16Samsung S4 persistent group passphrase will change when group isdestroyed and re-createdOn some devices, it is possible to crash the Wi-Fi driver with many Wi-Fi Direct operations

·

·

·

·

35/61

Page 36: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

DeploymentApp Deployment, Fan Interaction & Feedback

Page 37: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

User-centred Design Methodology

Built Fan Pilot group of Android users

Worked closely with key BHAFC staff to identify business-drivenservices

·

Focus groupsIn-app user experience samplingObservation and accompanied journeys

·

·

·

·

37/61

Page 38: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Survey

1628 season ticket holders responded95% smartphone usersProfile data e.g. Data usage, services used in stadiumOnly 6% reported no connectivity issuesSought participation consent in the survey

·

·

·

·

·

38/61

Page 39: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013
Page 40: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013
Page 41: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013
Page 42: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013
Page 43: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013
Page 44: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013
Page 45: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013
Page 46: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013
Page 47: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Services: Matchday Statistics

47/61

Page 48: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Services: Twitter

48/61

Page 49: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Services: Traffic

49/61

Page 50: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Battery and Data Limits

50/61

Page 51: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

ResultsInstalls, Round Trip Times, Data Transfered and More

Page 52: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Deployments

Brighton vs. Wolves - 4th May 2013

Brighton vs. Bolton - 21st September 2013

·

Final game of the seasonBrighton guaranteed place in Playoffs, but will their arch-rivals,Crystal Palace join themAlthough on a small scale, first successful deployment

·

·

·

·

Largest deployment to date, 127 usersComprehensive testing across a wide range of devicesOptimisation to applications' Wi-Fi Direct state machine

·

·

·

52/61

Page 53: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Application Views (04/05/13)

53/61

Page 54: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Round Trip Times on the DTN

Content is cached and replicated across the mobile phonesThe time from sending HTTP GET request to receiving a responseWhere the content is not available in the phone's cache and the phonedoes not have a data connectionAnd the response is from either some other phone's cache or dataconnectionMedian RTT = 131s

·

·

·

·

·

54/61

Page 55: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

The app was a godsend on the finalday of the season. It’s hit-and-missas to whether you can get a signal atthe Amex, but the app meant I knewthe ever-changing scores and leaguepositions throughout the afternoon.

Page 56: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Connectivity Graph (21/09/13)

56/61

Page 57: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Results (21/09/13)

338 installs and 127 in-stadium users595 DTN Connections1GB over DTN60% of data over DTN4006 requests from UIMedian delay 108s

·

·

·

··

·

·

57/61

Page 58: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Future WorkAnd some conclusions

Page 59: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

Conclusions

Successful deployments of a pocket-switched network using Wi-FiDirectPositive user feedback from both club and fansFans have improved access to matchday services

·

·

·

59/61

Page 60: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

(Immediate) Future Work

Optimise battery management by optimising the protocols and codeIntegrating the app with BHAFC's ticketing systemDistributing video replay in-stadia

Deploying stadium-wide through the Play store

Likely University Spin-off

·

·

·

Self-destructs when you leave the stadium to comply with digitalrights

·

·

Aiming for in-stadium user numbers in the order of thousandsTarget date: Brighton vs. Blackburn - 9th November

·

·

·

60/61

Page 61: Delay-tolerant Networking using Wi-Fi Direct - Droidcon 2013

[email protected]

twitter stephennaickenwww www.digitalstadium.mobi