2015å¹´7æã«Googleããçºè¡¨ããããã¼ã³ã³è¦æ ¼ãEddystoneããEddystoneã¨ã¯ï¼ãã¨ããæ¦è¦ã«ã¤ãã¦ã¯æ¢ã«å¤ãåºã¦ããä»ã®è§£èª¬è¨äºã«ãä»»ããã¦ãiOS ã¢ããªéçºè ããè¦ããEddystone ãæ¡ç¨ããã¡ãªããã»ãã¡ãªãã ããä»æ§ãããã¨è¦ãã ãã§ã¯ããããªãã£ãå®è£ ã®ãã¤ã³ã çã«ã¤ãã¦æ¸ãããã¨æãã¾ãã
æ¬è¨äºã§ã¯ã¾ããiOS ã¢ããªã«ãã㦠iBeacon ã§ã¯ãªã Eddystone ãæ¡ç¨ããã¡ãªããã»ãã¡ãªãããã«ã¤ãã¦ã
ï¼Eddystoneã®æ¦è¦ã«ã¤ãã¦ã¯æ¬¡ã®è¨äºãããããã§ãï¼
- Eddystoneの概要、iBeaconとの比較 - Qiita
- GoogleのEddystoneとはなんなのか | DevelopersIO
- What is Eddystone™? - Estimote Developer
ãã¯ãã¹ãã©ãããã©ã¼ã ãããªã¼ãã³ãã¯ã©ãå¬ããã®ãï¼
iBeacon ã¨ã®éãã¨ãã¦ã¾ãæããããã®ãã
- ãã¯ãã¹ãã©ãããã©ã¼ã ãï¼Androidã»iOS両ãµãã¼ãï¼
- ããªã¼ãã³ãï¼Apache v2.0ã©ã¤ã»ã³ã¹ãè¦æ ¼ããµã³ãã«ã³ã¼ããå ¬éï¼
ã¨ããç¹ã§ãã
ãã ããããã«ã¤ãã¦ãä¸è¨ã®ãããªçåãæã£ãéçºè ã®æ¹ã¯å¤ãã®ã§ã¯ãªãã®ã§ãããããã
- ãiBeacon å½¢å¼ã®ãã¼ã³ã³ã¢ã¸ã¥ã¼ã«ã Android ã¢ããªããæ¤åºã§ãããããã»ã»ã»ï¼ãï¼çµå±BLEãªã®ã§ï¼
- ãiBeaconã®è¦æ ¼ã¯ä¸è¬å ¬éã¯ããã¦ãªããã®ã®ãアドバタイズメントパケットのフォーマット ã¯ä»¥åããç¥ããã¦ãããããã»ã»ã»ã
ã¨ãããããã§ãã
ã§ãå人çã«ã¯ãã¯ãã¹ãã©ãããã©ã¼ã ãã¨ããç¹ã«ã¤ãã¦ã¯ãiBeaconã¨æ¯è¼ãã¦ç¹çãã¹ãã¢ããã³ãã¼ã¸ã¯æãããã¦ãã¾ãã *1 ã
ããªã¼ãã³ãã¨ããç¹ã«ã¤ãã¦ã¯ãå®éã«ããã£ã¦ã¿ã¦ãã¡ãªããã»ãã¡ãªããã®ä¸¡é¢ãããã¨æãã¾ããã以ä¸ã§ããã«ã¤ãã¦èª¬æãããã¨æãã¾ãã
ã¡ãªãã: ã«ã¹ã¿ãã¤ãºæ§
ã¨ããiOSã¢ããªã§ãiBeaconã®ã¬ã³ã¸ã³ã°ã使ããããã«ç´ä»ããããã³ã³ãã³ãã®ãªã¹ããè¿ãé ã«ä¸¦ã³æ¿ãããã¨ãããã¨ããã£ã¦ãã¾ããã
ããã§å°ã£ãã®ããCore Location ã® `locationManager:didRangeBeacons:inRegion:` ãå¼ã°ããééãã1ç§åºå®ã§ãããã¨ã
ã¤ã¾ãã1ç§ããå°ããééã§ã³ã³ãã³ãã並ã³æ¿ãããã¨ãã§ãã¾ãããå±å ã§iBeaconã使ãå ´åããã¼ã³ã³é㯠2ã3ã¡ã¼ãã«ãããããé¢ãã¦ãªããã¨ãå°ãªããªãã®ã§ãæ´æ°ã1ç§ééã ã¨ããã¼ã³ã³Aã®è¿ããããã¼ã³ã³Bã®è¿ãã«ç§»åããå ´åã«ã¡ãã£ã¨éã空ãã¦ãããã¼ã³ã³Bããããã«æ¥ããã¿ãããªæãã«ãªãã¾ããã¦ã¼ã¶ã¼ããããã¨ããã£ãããã«æããããããã§ãã
ãã ã¤ã³ã¿ã¼ãã«ãå¤ããããããã£çãç¨æããã¦ããªãã®ã§ã©ãããããããã¾ããããã¼ã³ã³ã¢ã¸ã¥ã¼ã«å´ã®ã¢ããã¿ã¤ãºã¤ã³ã¿ã¼ãã«ã¯100msecãããã¾ã§ç´°ããã§ããã¨ããã®ã«ã»ã»ã»
ã§ãããã iBeacon ã¢ã¸ã¥ã¼ã«ã®ã¬ã³ã¸ã³ã°ã Core Bluetooth ã§å®è£ ããããã¨èããããã§ãããiBeaconã®ã¢ããã¿ã¤ãºã¡ã³ããã±ãããçºè¦ã¯ã§ãããã®ã®ã `centralManager:didDiscoverPeripheral peripheral:advertisementData:RSSI:` 㧠èå¿ã® Manufacturer Data ãè¿ãã¦ãããªããã¨ããå£ã«ã¶ã¡å½ããã¾ãã
func centralManagerDidUpdateState(central: CBCentralManager) { NSLog("manufacturer data:%@", advertisementData[CBAdvertisementDataManufacturerDataKey]) }
ï¼å®è¡çµæï¼
manufacturer data:(null)
åããã¼ã³ã³ã¢ã¸ã¥ã¼ã«ã®ã¢ããã¿ã¤ãºã¡ã³ããã±ããã Bluetooth Explorer ã§è¦ã¦ã¿ãã¨ã¡ãã㨠Manufacturer Data ãå
¥ã£ã¦ããã®ã§ãééããªãAppleæ§ãæå³çã«iOSã«èª²ããå¶ç´ã®ããã§ãã
ãã® Manufacturer Data ã®ä¸ã« Proximity UUID, Major, Minor ã¨ãã iBeacon ã® iBeacon ããæ å ±ãå ¥ã£ã¦ãã ã®ã§ãããã«ãã Core Location ã® iBeacon é¢é£å®è£ ã Core Bluetooth 使ã£ã¦èªåã§ãããã¨ãããã¨ã¯å®è³ªä¸å¯è½ã§ãããã¨ããã¾ããï¼ã¨ããããã§æå±ãããã®ã AltBeacon ï¼
ã§ããã㧠Eddystone ã®ããªã¼ãã³ãã¨ããç¹ãçãã¦ãã¾ããå
¬éããã¦ããä»æ§ã«åã£ã¦å¥½ããªããã«å®è£
ãããã¨ãã§ãã¾ããåé ã®ã±ã¼ã¹ã§ã¯ãæå°100msecééã§ã¬ã³ã¸ã³ã°ã§ããããã«å®è£
ãã¾ããã
ãã¡ãªããï¼ èªåå®è£ ã®å¤§å¤ãã»æªãã
好ããªããã«èªåå®è£ ã§ãããã¨ããã¡ãªããã¨ã¯è£è ¹ã«ãèªåå®è£ ããªãã¨ãããªããã¨ããã®ã¯ãã¡ãªããã§ãããã¾ãã
Eddystone ãæ¤åºãããã¨ãããã¨èªä½ã¯ Core Bluetooth ã«æ £ãã¦ããã°ä¸ç¬ã§ã§ãã¾ããããã®ã¢ããã¿ã¤ãºã¡ã³ããã±ããããã¼ã¹ããã³ã¼ã㯠Googleのサンプル ããこちらの実装 ãåèã«ãªãã®ã§ãããå°ã£ãã®ã¯ãRSSI / TxPower ããã®è·é¢æ¨å®ã®å®è£ ã§ããè¨ç®å¼ã¯ã°ã°ãã°è¦ã¤ãããã®ã®ãç´°ããæé©åã®ã¨ããã§ï¼å°é家ãããªãã®ã§ï¼ãã¾ãèªä¿¡ãããã¾ããã
ããã¦ãã£ã¦ãããã¡ã«ã
- RSSIã¯ã¬ã³ã¬ã³ããããªè¦å ã§ã¶ããã®ã§ç´°ããå·®ã¯ä¿¡ç¨ã§ããªããããèããã¨Appleã®Proximityã®3段éãããã妥å½
- æ¨å®è·é¢ã®ãã¬ãæ¸ããããã«ç§»åå¹³åããã
- ãã®éã®ã©ãããããã¬ãããã®ããè©ä¾¡ãããï¼Core Location ã® `accuracy`ï¼
ã¨ãã£ãæãã§ãçµå± Core Location ã®å®è£ ã«è¿ã¥ãã¦ãã ã¨ããã¸ã¬ã³ããããã¾ããã
ãã®è¾ºããiOSåãEddystoneãµãã¼ãå®è£ ã®æ±ºå®çã¿ãããªOSSãåºã¦ãããã¨ãæå¾ ãã¾ãã
ã¡ãªã¿ã« Google ã«ãã iOS å®è£
ã¯ããã¾ã§ãµã³ãã«ã¨ããæãã§ãããã¾ã綺éºãªå®è£
ã¨ã¯æããªãã£ãããEddystone-URLããµãã¼ããã¦ãªããã¨ããç¶æ³ã§ããï¼対応して Pull Request 送った ãã®ã®ãããã«å¯¾ããã¬ã¹ãã³ã¹ãé
ãããï¼
ãã¬ã¼ã ã¿ã¤ã Eddystone-URL ã®å©ç¹
3ã¤ãããã¬ã¼ã ã¿ã¤ãã®ã²ã¨ã¤ãEddystone-URL ã§ã¯ URL ãç´æ¥ã¢ããã¿ã¤ãºã¡ã³ããã±ããã«å«ãããã¨ãã§ããããã
ããã«ãã£ã¦ã¦ã¼ã¶ã¼ã¯Google Chromeãåãã£ã¦ããããã°ãiBeaconã®ããã«ããããåºèæ¯ã«å°ç¨ã¢ããªãã¤ã³ã¹ãã¼ã«ããã¨ãEddystoneããã®æ å ±ãåå¾ã§ããããã«ãªãã¾ããï¼beaconlabo.com - このウェブサイトは販売用です! - 活用 ビーコン アプリ ティング マーケ システム 位置情報 開始 リソースおよび情報ï¼
ã¨ããç¹ã Eddystone ã®ãããããã iBeacon ã¨ã®éãã¨ãã¦ããæãããã¾ãã
ããéã«è¨ãã°ãå°ç¨ã¢ããªã®ãã¦ã³ãã¼ããåæã¨ãã¦ãããµã¼ãã¹ã»ãããã¯ãã«ã¨ã£ã¦ã¯ã¢ããã³ãã¼ã¸ã«ãªããªããã¨ãããã¾ãã
ã¨ãã«ãï¼å人çãªè©±ã§æ縮ã§ãããï¼iOSå°æ¥ã¨ã³ã¸ãã¢ã§ããèªåã¯ããããå°ç¨ã¢ããªã®éçºããã¸ã§ã¯ãã«ããå¼ã°ããªãã®ã§ãèªåã«ã¯ãã£ã¨é¢ä¿ãªãããªã¨ãã
ããã¨ãiBeacon ã§ã¯ãç£è¦é åå
ã«å
¥ãã¤ã¤ãã¢ããªãã¤ã³ã¹ãã¼ã«ããã¦ããªãå ´åã«ã¯ã¹ãã¢ã¸ã®ãªã³ã¯ãããã¯ç»é¢ã«è¡¨ç¤ºããããã¨ããæ©è½ãããã¾ããURLã®ä»£ããã«ã¯ãªã£ã¦ããªãã§ããã
ãã¬ã¼ã ã¿ã¤ã Eddystone-TLM ã®å©ç¹
ãã®ãã¬ã¼ã ã¿ã¤ãã®ãã±ããããã¯ä»¥ä¸ã®ãããªã¡ã³ããã³ã¹ç¨æ å ±ãåå¾ãããã¨ãã§ãã¾ãã
- ããããªã¼é»å§(mV/bit)
- ãã¼ã³ã³ã®æ¸©åº¦
- ã¢ããã¿ã¤ãºåæ°ï¼ååèµ·åæããã®ç·æ°ï¼
- èµ·åæéï¼ååèµ·åæããï¼
ï¼公式仕様ï¼
ãããã¯iBeaconã§ã¯åå¾ã§ããªããã¼ã¿ãªã®ã§ãä½ãé常ã«ããããããã§ã¯ããã¾ãã
ã»ã»ã»ããå ·ä½çãªæ´»ããæ¹ãã¾ã ãã¾ãæãã¤ãã¦ãã¾ããã
ããããªã¼é»å§ã«ã¤ãã¦ã¯ãããã«ãã TxPower & RSSI ããç®åºããæ¨å®è·é¢ãè£æ£ã§ããããªã¨æã£ãã®ã§ããï¼ããããªã¼é»å§ãä¸ããã¨åã TxPower ãè¨å®ãã¦ãã¦ã観測ããã RSSI ã¯ä¸ããï¼ã¨èããï¼ããã¼ã³ã³ã¢ã¸ã¥ã¼ã«ã®ã¡ã¼ã«ã¼ã«åãåãããã¨ãããããããªã¼é»å§ãé»æ³¢ã®å¼·ãã«ï¼å¤§ããã¯ï¼å½±é¿ããªããããªããããªã¼ã使ç¨ãã¦ããããã¤åè·¯ã工夫ãã¦ãããã¨ã®ãã¨ããããä»ã®ãã¼ã³ã³ã¢ã¸ã¥ã¼ã«ã¯ã©ããªã®ããã¨ããã®ã¯ããããªãã®ã§ãããå½±é¿ããã¨ãã¦ãã©ããªè¨ç®å¼ã§è£æ£å¯è½ãªã®ãããããã¾ããã
ãã¼ã³ã³ã®æ¸©åº¦ã¯ãバッテリー消費量に影響する ãããã®ã§æ´»ãããããªæ°ããã¾ããããã®ç¹ã«ã¤ãã¦ã¯ããããªã¼ã¬ãã«ãç´æ¥è¦ãã»ããããæ°ããã¾ãã
ã¢ããã¿ã¤ãºåæ°ãèµ·åæéããé»æ± 交æã®ã¿ã¤ãã³ã°ãç¥ããããªããã¯ãããããªã¼ã¬ãã«ãç´æ¥è¦ãã»ããããããã¢ããã¿ã¤ãºééãªãè¨å®å¤ã¨ãã¦ç¥ã£ã¦ããããã¨ããã¨ããã§ãã¯ãå
·ä½çãªä½¿ãã©ãããæãã¤ããªããã
ããã¯ã°ã©ã¦ã³ãã§ãç£è¦å¯è½ï¼
iBeaconã¯ããã¯ã°ã©ã¦ã³ãã§ãé åç£è¦å¯è½ã§ãããEddystoneãããã¯ã°ã©ã¦ã³ãã§ç£è¦å¯è½ã§ããCore Bluetooth ã§ã¯ããããã¯ã°ã©ã¦ã³ãã§ã®ã¹ãã£ã³æã«ã¯å¯¾è±¡ã¨ãã Service UUID ãæ示çã«æå®ããªãã¨ãããªããã¨ããå¶ç´ãããã¾ãããEddystone ã¨ãã¦ã® Service UUID ãå®ç¾©ããã¦ããã®ã§ãã¹ãã£ã³éå§æã«æ示çã«æå®ãããã¨ãã§ãã¾ãã
let services = [CBUUID(string: "FEAA")] centralManager.scanForPeripheralsWithServices(services, options: nil)
ã¨ããããã§ãã®ç¹ã«ã¤ãã¦ã¯ iBeacon ã¨æ¯è¼ãã¦ããã¡ãªããã«ã¯ãªããªããã¨ããã ãããã¯ã¹ã¯ãªã¼ã³ã¸ã®ã¢ã¤ã³ã³è¡¨ç¤ºã¯ iBeacon ãç¨ããªãã¨ã§ããªãæ©è½ã§ãã
ã¾ã¨ã
ããªããã£ãã°ããã«æ¸ãã¾ããããçµè«ã¨ãã¦ã"iOSã¢ããªéçºè ããã¿ã" Eddystone ãæ¡ç¨ããã¡ãªããã¨ããã®ã¯ãä»ã®ã¨ãããã«ã¹ã¿ãã¤ãºæ§ãã¨ããã¨ããã«å°½ããããªã¨ãä»ã«ãTLMãã±ããã®ããã«ãEddystone ã«ãã£ã¦ iBeacon ã«ãªããã®ãã¯è²ã ã¨ãããã®ã®ãæ§ã ãªä»£æ¿æ段ãèããã¨ãå ·ä½çãªä½¿ãã©ãããå人çã«ã¯ã¾ã ãã³ã¨æ¥ã¦ãã¾ããã
ã¨ã¯ãããã¬ã³ã¸ã³ã°ã®ä»¶å«ããèªåã§å¥½ããªããã«å®è£ ã§ãããã¨ããã®ã¯ååã« Eddystone æ¡ç¨ã®çç±ã«è¶³ãã¡ãªãããã¨æãã¾ããå®éã®ãµã¼ãã¹ããããã¯ãã§iBeaconã使ããã¨ããã¨ãã®ãã©ãã¯ããã¯ã¹ã«è¸ã¿è¾¼ã¿ããå ´é¢ã¯çµæ§ããã®ã§ã¯ãªãã§ããããã
ããã®2ãã§ã¯ãå®è£ ãã¦ã¿ã¦è²ã ã¨æ°ã¥ããç¹ãæ¸ãã¦ã¿ããã¨æãã¾ãã
*1:ãã å½æ¹Androidã¢ããªãæ¸ããªãã®ã§ããã¡ãã®è¦ç¹ã«ç«ã¤ã¨ä½ãããã®ããããã¾ãã