Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
iOSxBLEで苦しまないために
Search
Kohei Tabata
July 26, 2016
Programming
0
1.3k
iOSxBLEで苦しまないために
Kohei Tabata
July 26, 2016
Tweet
Share
More Decks by Kohei Tabata
See All by Kohei Tabata
営業活動なしで継続的に案件を受注する方法 / how to get a contract without sales as a freelance
nerd0geek1
2
880
生体データを取り扱うアプリ開発の勘所
nerd0geek1
1
85
動線改善とステータス可視化で家庭内のストレスを軽減した話
nerd0geek1
3
4.1k
家庭をプロジェクトとして運営した話
nerd0geek1
2
4.1k
fastlaneの勉強会を主催して学んだこと、得たこと、悩んだこと
nerd0geek1
1
990
みんなで育てるprecheck
nerd0geek1
1
680
matchとは?match導入のメリット
nerd0geek1
4
540
Improve your workflow with Sketch plugin
nerd0geek1
3
1.3k
Looking back try! Swift 2017
nerd0geek1
0
570
Other Decks in Programming
See All in Programming
ヤプリ新卒SREの オンボーディング
masaki12
0
130
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Realtime API 入門
riofujimon
0
150
初めてDefinitelyTypedにPRを出した話
syumai
0
410
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
330
C++でシェーダを書く
fadis
6
4.1k
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
Featured
See All Featured
Producing Creativity
orderedlist
PRO
341
39k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
How GitHub (no longer) Works
holman
310
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Making Projects Easy
brettharned
115
5.9k
Embracing the Ebb and Flow
colly
84
4.5k
Side Projects
sachag
452
42k
The Language of Interfaces
destraynor
154
24k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Transcript
iOSxBLEͰ ۤ͠·ͳ͍ͨΊʹ 2016/07/26 AKIBA.swift@Ϋϥεϝιουגࣜձࣾ
ࣗݾհ ɾKohei Tabata(@nerd0geek1) ɾiOS/MacOS/tvOS Developer ɾSaib Studio LLC ɾFastlaneେ͖ ɾ࠷ۙBLEͱྑ͠
Said Studio LLC Said Studio LLC
Next! Remote ɾLT/ϓϨθϯ༻iOSɾMacΞϓϦ ɾiOSΞϓϦ͔ΒMacͷεϥΠυΛૢ࡞Մೳ ɾศརͳλΠϚʔػೳ͖ʂ MacΞϓϦͪ͜Β͔Βɻ http://saib-stud.io/Next_Installer.pkg
BLEɺҊ݅Ͱͬͯ·͢ʁ
Ή͠ΖɺBLEͬͯ·͢ʁ
SoftBank͕ARMങऩ
࣍ ɾBluetooth͓͞Β͍ ɾBLEͱBeacon ɾBLEҊ݅ͷҙϙΠϯτ ɹɾڑΛଌΓ͍ͨʁ ɹɾPeripheral͕ݟ͔ͭΒͳ͍ʁ ɹɾσόοά(ཧ)
Bluetooth͓͞Β͍ ɾBluetoothͷ༷ͷมભ ɾBluetooth ClassicͱBluetooth Low Energy
Bluetoothͷ༷ͷมભ
Bluetooth ClassicͱLow Energy ɾBluetooth Classic ɹɾBluetooth3.0Ҏલͷ༷ʹର͢Δݺশ ɹɾϚεɺΩʔϘʔυɺϔουϑΥϯͳͲɻ ɹɾߴͳ௨৴ ɹɾMFiϓϩάϥϜՃೖඞཁɻ ɾBluetooth
Low Energy(BLE) ɹɾBluetooth4.0ͷݺশ ɹɾBluetooth Classicͱͷޙํޓੑͳ͠ ɹɾলిྗɾলίετʹओ؟
BLEͱBeacon ɾBLEͷଓϑϩʔ ɾBeaconͱ
BLEͷଓϑϩʔ
Beaconͱ ɾBeaconɺAdvertisingʹಛԽͨ͠Peripheralͷ͜ͱ ɾCentralͱPeripheralؒͷଓͳ͠ ɾPeripheralAdvertising DataʹσʔλΛࡌͤͯAdvertising ɾCentralͦΕΛಡΉ͚ͩ
BLEҊ݅ͷҙϙΠϯτ ɾڑΛଌΓ͍ͨʁ ɾPeripheral͕ݟ͔ͭΒͳ͍ʁ ɾσόοά(ཧ)
ڑΛଌΓ͍ͨʁ ɾडୗͰ͍͍͓ͨͩͨࣄ ɾBLEϞδϡʔϧ(Peripheral)ʹLED͕ͭͳ͕͍ͬͯΔ ɾεϚʔτϑΥϯ(Central)ͱBLEϞδϡʔϧͷڑ͕5mҎԼͷ࣌ʹ ɹLEDΛޫΒͤΔΑ͏ʹɺॻ͖ࠐΈΛߦ͏ɻ ɹ
None
ͦ͏͍͏ͷ͡Όͳ͍ ɾBLEڑଌఆͷͨΊͷٕज़Ͱͳ͍ɻ ɾCLBeaconɺCBPeripheral͔ΒRSSI(ిڧ)औಘՄೳ ɾ͕ͨͬͯ͠ɺRSSI͔Βٯࢉ͢Δ͜ͱͰਪఆՄೳɻ ɾ͔͠͠ɺ߹ʹΑͬͯి͕͔ͳΓݮਰ͢Δɻ ɾϦϦʔε͞ΕΔϓϩμΫτʹ͍ͭͯɺͦ͏͍ͬͨཁ݅Λ ɹ֎͓ͯ͘͜͠ͱ͕ॏཁɻ ɾͲ͏ͯ͠ඞཁͱ͍͏߹ɺproximityͰେຌͷஅ͢Δ͔ɺ ɹϢʔβʔମݧΛม͑ͯImmediateͷ߹ͷΈτϦΨʔ͢Δɺͱ͔
None
Peripheral͕ݟ͔ͭΒͳ͍ʁ ɾࣗࣾΞϓϦͷυοάϑʔσΟϯάͰLTͰNext!Λͬͨ࣌ͷ͜ͱ ɾCentralͰ͋ΔiPhone͔ΒPeripheralͰ͋ΔMacΛɺ5ඵҎʹ ɹݟ͚ͭΒΕͳ͍ͱ͍͏͜ͱ͕ɻɻɻ
దͳϑΟϧλϦϯάΛɻ ɾษڧձࣾͳͲɺMac/iPhone/Android͕͋;ΕۭͨؒͰɺ ɹͨ͘͞ΜͷBLE͕ଘࡏ͍ͯ͠Δɻ ɾదͳϑΟϧλϦϯάઃఆΛߦΘͣʹCentral͔ΒScan͍ͯ͠Δͱ ɹଓରΛݟ͚ͭΔ·Ͱʹ͕͔͔࣌ؒΓ͗ͯ͢͠·͏ɻ ɾServiceͷUUIDΛAdvertisement DataʹͤͯɺϑΟϧλϦϯά͕ ɹಇ͘Α͏ʹΛɻ
σόοά(ཧ) ɾ1ͭͷࣄྫͰɺσόοάͷͨΊʹ੮ͷपΓΛ͏ΖͪΐΖ͢Δ ɹඞཁ͕ ɾ2ͭͷࣄྫͰɺσόοάͷͨΊʹษڧձʹߦ͘ඞཁ͕ ɾͦͷଞʹɺiOSͷͱBLEϞδϡʔϧ͕ࣗવʹΕΔঢ়گͷ ɹςετͷͨΊʹ80mߦͬͯͬͯ
Φεεϝͷೖ(?)ॻ ɾॳ৺ऀ͕ͱ͖ͬͭʹ͍͘ɺGAPGATTɺ ɹCentral / PeripheralɺServiceɺ ɹCharacteristicͷ֓೦Λஸೡʹઆ໌ͯ͠ ɹ͍ΔͨΊɺશମ૾ͱͦΕͧΕͷׂͷ ɹཧղʹ࠷దɻ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ
ࢀߟ ɾARMΛങऩͨ͠ଙਖ਼ٛͷະདྷ༧ਤ (http://www.itmedia.co.jp/news/articles/1607/21/news136.html) ɾiOS7ͰͷBluetooth LE׆༻ (http://www.slideshare.net/reinforcelab/20131129-mosa) ɾIntroduction to Bluetooth Low
Energy (http://www.slideshare.net/yeokm1/introduction-to-bluetooth-low- energy)