Raspberry Pi三分クッキング
2013年 12月 14日 土曜日

1
有り物ガジェットで作るiBeacons
淺井 浩明(@integra)

2013年 12月 14日 土曜日

2
提供

2013年 12月 14日 土曜日

3
提供 自己紹介

2013年 12月 14日 土曜日

4
提供 自己紹介
お名前 淺井 浩明 (Twitter @integra)
お仕事 インフラ屋さん(サーバやネットワーク機器がお友達)
オールドタイププログラマ(技術オタ)
陸に上がったバイク乗り(Twitter IDはCBX400F INTEGRAから)
さいたま開発勉強会 機材担当

2013年 12月 14日 土曜日

4
よろしくお願いします

2013年 12月 14日 土曜日

5
個人的トピック(さいたまdev Vol.8の後)

2013年 12月 14日 土曜日

6
個人的トピック(さいたまdev Vol.8の後)
SHINEを落としてなくしました。

2013年 12月 14日 土曜日

6
個人的トピック(さいたまdev Vol.8の後)
SHINEを落としてなくしました。

2013年 12月 14日 土曜日

6
個人的トピック(さいたまdev Vol.8の後)
SHINEを落としてなくしました。

MacBook Air のSSD(OWC Aura Pro)が逝きました。

2013年 12月 14日 土曜日

6
個人的トピック(さいたまdev Vol.8の後)
SHINEを落としてなくしました。

MacBook Air のSSD(OWC Aura Pro)が逝きました。
elgato Thunderbolt SSDが逝きました。

2013年 12月 14日 土曜日

6
個人的教訓

SSDは信用しては行けません!
バックアップはこまめに!

2013年 12月 14日 土曜日

7
以上、前置きでした。

2013年 12月 14日 土曜日

8
閑話休題

2013年 12月 14日 土曜日

9
有り物ガジェットで作るiBeacons
※技適有りの安全なw
2013年 12月 14日 土曜日

10
材料(一人前)
Raspberry Pi ••••••••••••••••••• 1台
SDカード(4GB以上) ••••••••••••• 1枚
Bluetooh 4.0+EDR/LE USB
アダプタ (BSBT4D09BK相当品) ••••• 1台

HDMIディスプレイ
USB HUB
USB キーボード
LAN ケーブル
SDカードReader/Writer
インターネット接続

2013年 12月 14日 土曜日

11
材料(一人前)
Raspberry Pi ••••••••••••••••••• 1台
SDカード(4GB以上) ••••••••••••• 1枚
Bluetooh 4.0+EDR/LE USB
アダプタ (BSBT4D09BK相当品) ••••• 1台

HDMIディスプレイ
USB HUB
USB キーボード
LAN ケーブル
SDカードReader/Writer
インターネット接続

2013年 12月 14日 土曜日

12
材料(一人前)
Raspberry Pi ••••••••••••••••••• 1台
SDカード(4GB以上) ••••••••••••• 1枚
Bluetooh 4.0+EDR/LE USB
アダプタ (BSBT4D09BK相当品) • 1台

HDMIディスプレイ
USB HUB
USB キーボード
LAN ケーブル
SDカードReader/Writer
インターネット接続

2013年 12月 14日 土曜日

13
参考にしたもの

2013年 12月 14日 土曜日

14
参考にしたもの
Radius Network
How to Make an iBeacon Out of a
Raspberry Pi
http://developer.radiusnetworks.com/
blog/

2013年 12月 14日 土曜日

14
参考にしたもの
Radius Network
How to Make an iBeacon Out of a
Raspberry Pi
http://developer.radiusnetworks.com/
blog/

2013年 12月 14日 土曜日

14
参考にしたもの
Radius Network
How to Make an iBeacon Out of a
Raspberry Pi
http://developer.radiusnetworks.com/
blog/

GitHub
carsonmcdonald / bluez-ibeacon
https://github.com/carsonmcdonald/
bluez-ibeacon

2013年 12月 14日 土曜日

14
Raspberry Pi設定
Raspbian(Wheezy)のセットアップ
パッケージ更新とライブラリの導入(apt-get)
ntpでの時刻同期設定(Raspberry Piはクロックを覚えてくれません)
BlueZの導入

(http://www.bluez.org) ※最新は5.12 (Dec/12リリース)

bluez-ibeacon導入                 
(https://github.com/carsonmcdonald/bluez-ibeacon)

2013年 12月 14日 土曜日

15
BlueZ

2013年 12月 14日 土曜日

16
BlueZ
BlueZ は Linux および Android で動作するオープンソース
の Bluetooth プロトコルスタック

2013年 12月 14日 土曜日

16
BlueZ
BlueZ は Linux および Android で動作するオープンソース
の Bluetooth プロトコルスタック
http://www.bluez.org

2013年 12月 14日 土曜日

16
BlueZ
BlueZ は Linux および Android で動作するオープンソース
の Bluetooth プロトコルスタック
http://www.bluez.org

最新版は 5.12

2013年 12月 14日 土曜日

(つい先日のDec/12リリース)

16
BlueZ
BlueZ は Linux および Android で動作するオープンソース
の Bluetooth プロトコルスタック
http://www.bluez.org

最新版は 5.12

(つい先日のDec/12リリース)

bug-fixおよびいくつかの機能追加
•
•
•
•

PS3 (sixaxis) controller support
smp-tester for LE Security Manager Protocol testing
AVDTP qualification test cases (unit/test-avdtp)
LE Connection Oriented Channel test support with l2test (LE CoC is a feature of the newly released
Bluetooth 4.1 specification)
• btmon decoding support for LE CoC signaling commands, CSA4 and Core spec 4.1 HCI commands

2013年 12月 14日 土曜日

16
BlueZ
BlueZ は Linux および Android で動作するオープンソース
の Bluetooth プロトコルスタック
http://www.bluez.org

最新版は 5.12

(つい先日のDec/12リリース)

bug-fixおよびいくつかの機能追加
•
•
•
•

PS3 (sixaxis) controller support
smp-tester for LE Security Manager Protocol testing
AVDTP qualification test cases (unit/test-avdtp)
LE Connection Oriented Channel test support with l2test (LE CoC is a feature of the newly released
Bluetooth 4.1 specification)
• btmon decoding support for LE CoC signaling commands, CSA4 and Core spec 4.1 HCI commands

2013年 12月 14日 土曜日

16
BlueZ
BlueZ は Linux および Android で動作するオープンソース
の Bluetooth プロトコルスタック
http://www.bluez.org

最新版は 5.12

(つい先日のDec/12リリース)

bug-fixおよびいくつかの機能追加
•
•
•
•

PS3 (sixaxis) controller support
smp-tester for LE Security Manager Protocol testing
AVDTP qualification test cases (unit/test-avdtp)
LE Connection Oriented Channel test support with l2test (LE CoC is a feature of the newly released
Bluetooth 4.1 specification)
• btmon decoding support for LE CoC signaling commands, CSA4 and Core spec 4.1 HCI commands

2013年 12月 14日 土曜日

16
BlueZ
BlueZ は Linux および Android で動作するオープンソース
の Bluetooth プロトコルスタック
http://www.bluez.org

最新版は 5.12

(つい先日のDec/12リリース)

bug-fixおよびいくつかの機能追加
•
•
•
•

PS3 (sixaxis) controller support
smp-tester for LE Security Manager Protocol testing
AVDTP qualification test cases (unit/test-avdtp)
LE Connection Oriented Channel test support with l2test (LE CoC is a feature of the newly released
Bluetooth 4.1 specification)
• btmon decoding support for LE CoC signaling commands, CSA4 and Core spec 4.1 HCI commands

2013年 12月 14日 土曜日

16
BlueZ
BlueZ は Linux および Android で動作するオープンソース
の Bluetooth プロトコルスタック
http://www.bluez.org

最新版は 5.12

(つい先日のDec/12リリース)

bug-fixおよびいくつかの機能追加
•
•
•
•

PS3 (sixaxis) controller support
smp-tester for LE Security Manager Protocol testing
AVDTP qualification test cases (unit/test-avdtp)
LE Connection Oriented Channel test support with l2test (LE CoC is a feature of the newly released
Bluetooth 4.1 specification)
• btmon decoding support for LE CoC signaling commands, CSA4 and Core spec 4.1 HCI commands

2013年 12月 14日 土曜日

16
BlueZ
BlueZ は Linux および Android で動作するオープンソース
の Bluetooth プロトコルスタック
http://www.bluez.org

最新版は 5.12

(つい先日のDec/12リリース)

bug-fixおよびいくつかの機能追加
•
•
•
•

PS3 (sixaxis) controller support
smp-tester for LE Security Manager Protocol testing
AVDTP qualification test cases (unit/test-avdtp)
LE Connection Oriented Channel test support with l2test (LE CoC is a feature of the newly released
Bluetooth 4.1 specification)
• btmon decoding support for LE CoC signaling commands, CSA4 and Core spec 4.1 HCI commands

2013年 12月 14日 土曜日

16
BlueZ
Bluetoothデバイスは hciconfig でLinuxのネットワークI/F
と同じ感じで使う
root@rasp-orange2:/home/pi/config/bluez-5.11# hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:1B:DC:06:8A:2B ACL MTU: 310:10 SCO MTU: 64:8
DOWN
RX bytes:467 acl:0 sco:0 events:18 errors:0
TX bytes:317 acl:0 sco:0 commands:18 errors:0
root@rasp-orange2:/home/pi/config/bluez-5.11# hciconfig hci0 up
root@rasp-orange2:/home/pi/config/bluez-5.11# hciconfig rstat
hci0: Type: BR/EDR Bus: USB
BD Address: 00:1B:DC:06:8A:2B ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:934 acl:0 sco:0 events:36 errors:0
TX bytes:634 acl:0 sco:0 commands:36 errors:0

2013年 12月 14日 土曜日

17
bluez-ibeacon
Bluezを使用した iBeaconのExample
https://github.com/carsonmcdonald/bluez-ibeacon
Beacon側向けプロセスとiOS側アプリの参照実装
Beacon側は以下のコマンドでアドバタイズを開始

# ./ibeacon 200 <UUID> <major> <minor> <1m先でのRSSI値>

2013年 12月 14日 土曜日

18
demo

2013年 12月 14日 土曜日

19
one more things ?

2013年 12月 14日 土曜日

20
iBeacons
2013年 12月 14日 土曜日

21
Bluetoohでの測距って?
2013年 12月 14日 土曜日

22
Bluetoothでの位置測定

2013年 12月 14日 土曜日

23
Bluetoothでの位置測定

2013年 12月 14日 土曜日

24
Bluetoothでの位置推定

2013年 12月 14日 土曜日

25
Bluetoothでの位置推定

実用になるの?

2013年 12月 14日 土曜日

25
Bluetoothでの位置推定
iOS7でのBluetoothでの測距については
さいたま開発勉強会 Vol.8
岸川さんのターン参照

2013年 12月 14日 土曜日

26
Bluetoothでの位置推定
iOS7でのBluetoothでの測距については
さいたま開発勉強会 Vol.8
岸川さんのターン参照
大変勉強になりました!
2013年 12月 14日 土曜日

26
論文等を参考にしてみる(ちょっと探した範囲)
RSSI方式における減衰定数の位置推定時決定手法(ユビキタス・センサネットワー
ク・プラットフォーム,一般)  
http://ci.nii.ac.jp/naid/110006453266
Bluetooth による位置情報提供システムの開発とその評価
http://www.sharp.co.jp/corporate/rd/22/pdf/87-06.pdf
無線センサネットワークにおける 電波到達特性の実測に基づくスニファ配置手法
http://www-nishio.ise.eng.osaka-u.ac.jp/Thesis/bachelor/2011/isobe/
thesis.pdf
Bluetooth の電波強度を用いた位置推定方式の検討
http://db-event.jpn.org/deim2011/proceedings/pdf/b9-4.pdf

2013年 12月 14日 土曜日

27
Bluetoothでの位置推定

2013年 12月 14日 土曜日

28
Bluetoothでの位置推定
2.4 GHz帯の電波を使うBluetoothでの位置測定とは?

2013年 12月 14日 土曜日

28
Bluetoothでの位置推定
2.4 GHz帯の電波を使うBluetoothでの位置測定とは?
ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等

2013年 12月 14日 土曜日

28
Bluetoothでの位置推定
2.4 GHz帯の電波を使うBluetoothでの位置測定とは?
ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等
Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread
Spectrum)を採用しているから干渉には強いけど

2013年 12月 14日 土曜日

28
Bluetoothでの位置推定
2.4 GHz帯の電波を使うBluetoothでの位置測定とは?
ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等
Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread
Spectrum)を採用しているから干渉には強いけど
2.4GHz帯の電波が出ていないクリアなロケーションばかりではない

2013年 12月 14日 土曜日

28
Bluetoothでの位置推定
2.4 GHz帯の電波を使うBluetoothでの位置測定とは?
ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等
Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread
Spectrum)を採用しているから干渉には強いけど
2.4GHz帯の電波が出ていないクリアなロケーションばかりではない
自分自身がWiFiの電波を出している場合もある

2013年 12月 14日 土曜日

28
Bluetoothでの位置推定
2.4 GHz帯の電波を使うBluetoothでの位置測定とは?
ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等
Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread
Spectrum)を採用しているから干渉には強いけど
2.4GHz帯の電波が出ていないクリアなロケーションばかりではない
自分自身がWiFiの電波を出している場合もある
電波強度(RSSI)は目安(RSSIの値自体の変動、ロケーションによる減衰率の差
などを考慮が必要) -> RSSIを正しく得るには、サンプリング数をある程度取
らないといけないようだ

2013年 12月 14日 土曜日

28
Bluetoothでの位置推定
2.4 GHz帯の電波を使うBluetoothでの位置測定とは?
ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等
Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread
Spectrum)を採用しているから干渉には強いけど
2.4GHz帯の電波が出ていないクリアなロケーションばかりではない
自分自身がWiFiの電波を出している場合もある
電波強度(RSSI)は目安(RSSIの値自体の変動、ロケーションによる減衰率の差
などを考慮が必要) -> RSSIを正しく得るには、サンプリング数をある程度取
らないといけないようだ

2013年 12月 14日 土曜日

28
Bluetoothでの位置推定

正確な誘導の為にはBeaconの配置、電波環境なども制御
しないとならない。
ノウハウの積み重ねとBluetoothの電波だけに頼らない工
夫が必要?

2013年 12月 14日 土曜日

29
iBeaconsのエリアへの出入りを通知する
落とし所って妥当な気がしてきた。

2013年 12月 14日 土曜日

30
AppleStoreでの設置例が見てみたいです

2013年 12月 14日 土曜日

31
ありがとうございました

2013年 12月 14日 土曜日

32
案(どうしても誘導をしたい場合)
誘導を想定して指向性を持たせたBeaconを組み合わせる

※進行方向左右のBeaconのペアのRSSI値を見て真ん中を通るように誘導
2013年 12月 14日 土曜日

33

More Related Content

PDF
Rust-DPDK
PDF
HTTP 2.0のヘッダ圧縮(HPACK)
PPTX
HTTP/2でも初めてみます?
PDF
HTTP/2の現状とこれから
PDF
ネットワークOS野郎 ~ インフラ野郎Night 20160414
PDF
Prometheus meetup tokyo#3 slide
PDF
How to run P4 BMv2
PDF
HTTP2 時代の Web - web over http2
Rust-DPDK
HTTP 2.0のヘッダ圧縮(HPACK)
HTTP/2でも初めてみます?
HTTP/2の現状とこれから
ネットワークOS野郎 ~ インフラ野郎Night 20160414
Prometheus meetup tokyo#3 slide
How to run P4 BMv2
HTTP2 時代の Web - web over http2

What's hot (20)

PDF
HTTP/2 でリバプロするだけでグラフツールを 高速化できた話
PDF
ONIC2017 プログラマブル・データプレーン時代に向けた ネットワーク・オペレーションスタック
PPTX
Software forwarding path
PDF
03 第3.6節-第3.8節 ROS2の基本機能(2/2)
PPTX
ロボットシステムのつくりかた 〜Robot Operating Systemというアプローチ〜
PDF
HTTP/2.0と標準化
PDF
関数型言語ElixirのIoTシステム開発への展開
PDF
つながるロボット 〜分散協調ロボットの開発を加速化するROSの紹介〜
PDF
HTTP/2.0がもたらす Webサービスの進化(後半)
PDF
QoS for ROS 2 Dashing/Eloquent
PDF
フラッター開発におけるシークレット情報取扱考察
PDF
Xeon dとlagopusと、pktgen dpdk
PPTX
nftables: the Next Generation Firewall in Linux
PDF
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
PPTX
VPP事始め
PPTX
FD.io VPP事始め
PDF
OpenFlowで覚えるネットワーク
PDF
2014 0228 OSC-Spring Tokyo NETMF
PPTX
Opnfv handson apex intro
HTTP/2 でリバプロするだけでグラフツールを 高速化できた話
ONIC2017 プログラマブル・データプレーン時代に向けた ネットワーク・オペレーションスタック
Software forwarding path
03 第3.6節-第3.8節 ROS2の基本機能(2/2)
ロボットシステムのつくりかた 〜Robot Operating Systemというアプローチ〜
HTTP/2.0と標準化
関数型言語ElixirのIoTシステム開発への展開
つながるロボット 〜分散協調ロボットの開発を加速化するROSの紹介〜
HTTP/2.0がもたらす Webサービスの進化(後半)
QoS for ROS 2 Dashing/Eloquent
フラッター開発におけるシークレット情報取扱考察
Xeon dとlagopusと、pktgen dpdk
nftables: the Next Generation Firewall in Linux
Grafana LokiではじめるKubernetesロギングハンズオン(NTT Tech Conference #4 ハンズオン資料)
VPP事始め
FD.io VPP事始め
OpenFlowで覚えるネットワーク
2014 0228 OSC-Spring Tokyo NETMF
Opnfv handson apex intro
Ad

Viewers also liked (8)

ODP
「BluetoothでLinuxマシンとAndroidを繋いで話が出来るようにした話」「台風で停電になって省電力の設定をした話」「ネットワークの設定が引き...
PDF
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい
PPTX
藍色小鋪一起來做, 用 beacon 控制開關的枱燈
PDF
iBeaconを使ってみよう!気軽に使える近距離無線通信
PDF
iBeacons 簡介
PPTX
藍牙BLE 低功耗系統在iBeacon - IoT 物聯網上的應用 v2
PPTX
三分鐘讓你輕鬆開發 iBeacon
PPTX
iBeacon 相關應用
「BluetoothでLinuxマシンとAndroidを繋いで話が出来るようにした話」「台風で停電になって省電力の設定をした話」「ネットワークの設定が引き...
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい
藍色小鋪一起來做, 用 beacon 控制開關的枱燈
iBeaconを使ってみよう!気軽に使える近距離無線通信
iBeacons 簡介
藍牙BLE 低功耗系統在iBeacon - IoT 物聯網上的應用 v2
三分鐘讓你輕鬆開發 iBeacon
iBeacon 相關應用
Ad

Similar to Raspberry pi三分クッキング(さいたま開発勉強会 Vol 9) (20)

PDF
Bluetoothl-Low-Energy入門講座-part1
PDF
BlueZで遊んでみる - BLE大阪勉強会
PDF
Bluetooth LE +スマートフォン勉強会@関西(2013年11月2日)
PDF
iOSアプリ開発者のための Bluetooth Low Energy体験講座
PDF
Bluetooth Low Energy入門講座 -part2
PDF
20apr2012 kernelvm7-main
PDF
Getting started raspberry pi osc hamamatsu
PDF
20130902 btleハンズオンワークショップ
PDF
IoTで使用されている Bluetoothを利用したビーコン(Beacon)の基礎と事例
PPTX
iBeacon を利用したサービス開発のポイント
PDF
Trema day 1
PDF
Osc2013 tokyospring
PDF
Open-FCoE_osc2011tokyofall_20111119
PDF
OSC Tokyo 2013 Spring JRPUG
PDF
PDF
20140922 ble bootcamp
PPTX
Arduino tank meets bluetooth
ODP
Bluetooth le for FreeBSD
PDF
IBM Cloud&sakura.io体験ハンズオン 20171208
PDF
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい2
Bluetoothl-Low-Energy入門講座-part1
BlueZで遊んでみる - BLE大阪勉強会
Bluetooth LE +スマートフォン勉強会@関西(2013年11月2日)
iOSアプリ開発者のための Bluetooth Low Energy体験講座
Bluetooth Low Energy入門講座 -part2
20apr2012 kernelvm7-main
Getting started raspberry pi osc hamamatsu
20130902 btleハンズオンワークショップ
IoTで使用されている Bluetoothを利用したビーコン(Beacon)の基礎と事例
iBeacon を利用したサービス開発のポイント
Trema day 1
Osc2013 tokyospring
Open-FCoE_osc2011tokyofall_20111119
OSC Tokyo 2013 Spring JRPUG
20140922 ble bootcamp
Arduino tank meets bluetooth
Bluetooth le for FreeBSD
IBM Cloud&sakura.io体験ハンズオン 20171208
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい2

Raspberry pi三分クッキング(さいたま開発勉強会 Vol 9)