Top Banner
Multipeer Connectivity Framework 報告:allenlinli 材料提供:李岡諭 2014.4.10
20

Multiple Connectivity Framework Keynote

Aug 27, 2014

Download

Software

Multiple Connectivity Framework Keynote
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Multiple Connectivity Framework Keynote

Multipeer Connectivity Framework

報告⼈人:allenlinli 材料提供:李岡諭 2014.4.10

Page 2: Multiple Connectivity Framework Keynote

FireChat

Page 3: Multiple Connectivity Framework Keynote
Page 4: Multiple Connectivity Framework Keynote
Page 5: Multiple Connectivity Framework Keynote

請下載FireChat

Page 6: Multiple Connectivity Framework Keynote

⼤大家動⼿手做

• https://dl.dropboxusercontent.com/u/2857188/MCDemo.zip

• 測試是否可以連⼋八個

Page 7: Multiple Connectivity Framework Keynote

Wireless mesh networking

• Peer-to-peer connections:

• infrastructure Wi-Fi networks

• peer-to-peer Wi-Fi

• Bluetooth personal area networks

Page 8: Multiple Connectivity Framework Keynote

Pros & Cons• Pros

• Without an internet connection

• Location-based communication (nearby)

• Cons

• Sessions currently support up to 8 peers

• Data transfer is slow – especially on Bluetooth

• Can not cross networks in single connection

• Not support background mode

Page 9: Multiple Connectivity Framework Keynote

Sending & Receiving Information

• Messages: Text or small serialised objects (NSData)

• Streams: Audio, video, or real-time sensor events

• Resources: Images, movies, or documents.

Page 10: Multiple Connectivity Framework Keynote

Build up Connection

Page 11: Multiple Connectivity Framework Keynote

Steps

• PeerID

• Session

• Advertise

• Browser

• Accept

Page 12: Multiple Connectivity Framework Keynote

_peerID = [[MCPeerID alloc] initWithDisplayName:displayName];

_session = [[MCSession alloc] initWithPeer:_peerID]; _session.delegate = self;

Page 13: Multiple Connectivity Framework Keynote

_advertiser = [[MCAdvertiserAssistant alloc] initWithServiceType:@"chat-files" discoveryInfo:nil session:_session]; [_advertiser start];

_browser = [[MCBrowserViewController alloc] initWithServiceType:@"chat-files" session:_session];

Page 14: Multiple Connectivity Framework Keynote

Data Transfer

Page 15: Multiple Connectivity Framework Keynote

[_appDelegate.mcManager.session sendData:dataToSend toPeers:allPeers withMode:MCSessionSendDataReliable error:&error];

Page 16: Multiple Connectivity Framework Keynote

傳輸速度• Bluetooth:

• Bluetooth (Bonjour over Bluetooth)

• Multipeer Connectivity 不是使⽤用 BLE/Bluetooth 4.0 advertisement。

• 猜測:使⽤用 Bluetooth Classic。

• WiFi

• Multipeer Connectivity 不是使⽤用 WiFi Direct。理論上可達 250 Mbps,實測⼤大約 35-50 Mbps。

• 猜測:與 AirDrop ⼀一樣,使⽤用 Adhoc WiFi。上限為 11 Mbps。實測兩台 Mac 的 AirDrop 傳輸⼤大約是 18 Mbps (不同 Wifi 下是 4 Mbps)。

Page 17: Multiple Connectivity Framework Keynote
Page 18: Multiple Connectivity Framework Keynote

報告完畢,謝謝

感謝李岡諭

Page 19: Multiple Connectivity Framework Keynote

Resources

Page 20: Multiple Connectivity Framework Keynote

Tutorials

• http://www.appcoda.com/intro-multipeer-connectivity-framework-ios-programming/

• http://code.tutsplus.com/tutorials/exploring-the-multipeer-connectivity-framework-project-setup--mobile-23071

• http://nshipster.com/multipeer-connectivity/