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

Post on 20-Dec-2014

788 Views

Category:

Self Improvement

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

さいたま開発勉強会 Vol 9

TRANSCRIPT

Raspberry Pi三分クッキング

12013年 12月 14日 土曜日

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

22013年 12月 14日 土曜日

提供

32013年 12月 14日 土曜日

提供 自己紹介

42013年 12月 14日 土曜日

お名前 淺井 浩明 (Twitter @integra)

お仕事 インフラ屋さん(サーバやネットワーク機器がお友達)

オールドタイププログラマ(技術オタ)

陸に上がったバイク乗り(Twitter IDはCBX400F INTEGRAから)

さいたま開発勉強会 機材担当

提供 自己紹介

42013年 12月 14日 土曜日

よろしくお願いします

52013年 12月 14日 土曜日

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

62013年 12月 14日 土曜日

SHINEを落としてなくしました。

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

62013年 12月 14日 土曜日

SHINEを落としてなくしました。

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

62013年 12月 14日 土曜日

SHINEを落としてなくしました。

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

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

62013年 12月 14日 土曜日

SHINEを落としてなくしました。

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

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

elgato Thunderbolt SSDが逝きました。

62013年 12月 14日 土曜日

SSDは信用しては行けません!

バックアップはこまめに!

個人的教訓

72013年 12月 14日 土曜日

以上、前置きでした。

82013年 12月 14日 土曜日

閑話休題

92013年 12月 14日 土曜日

有り物ガジェットで作るiBeacons※技適有りの安全なw

102013年 12月 14日 土曜日

材料(一人前)Raspberry Pi ••••••••••••••••••• 1台

SDカード(4GB以上) ••••••••••••• 1枚

Bluetooh 4.0+EDR/LE USB

アダプタ (BSBT4D09BK相当品) ••••• 1台

HDMIディスプレイ

USB HUB

USB キーボード

LAN ケーブル

SDカードReader/Writer

インターネット接続

112013年 12月 14日 土曜日

材料(一人前)Raspberry Pi ••••••••••••••••••• 1台

SDカード(4GB以上) ••••••••••••• 1枚

Bluetooh 4.0+EDR/LE USB

アダプタ (BSBT4D09BK相当品) ••••• 1台

HDMIディスプレイ

USB HUB

USB キーボード

LAN ケーブル

SDカードReader/Writer

インターネット接続

122013年 12月 14日 土曜日

材料(一人前)Raspberry Pi ••••••••••••••••••• 1台

SDカード(4GB以上) ••••••••••••• 1枚

Bluetooh 4.0+EDR/LE USB

アダプタ (BSBT4D09BK相当品) • 1台

HDMIディスプレイ

USB HUB

USB キーボード

LAN ケーブル

SDカードReader/Writer

インターネット接続

132013年 12月 14日 土曜日

参考にしたもの

142013年 12月 14日 土曜日

参考にしたもの

Radius Network

How to Make an iBeacon Out of a Raspberry Pi

http://developer.radiusnetworks.com/blog/

142013年 12月 14日 土曜日

参考にしたもの

Radius Network

How to Make an iBeacon Out of a Raspberry Pi

http://developer.radiusnetworks.com/blog/

142013年 12月 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

142013年 12月 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)

152013年 12月 14日 土曜日

BlueZ

162013年 12月 14日 土曜日

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

162013年 12月 14日 土曜日

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

http://www.bluez.org

162013年 12月 14日 土曜日

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

http://www.bluez.org

最新版は 5.12 (つい先日のDec/12リリース)

162013年 12月 14日 土曜日

BlueZBlueZ は 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

162013年 12月 14日 土曜日

BlueZBlueZ は 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

162013年 12月 14日 土曜日

BlueZBlueZ は 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

162013年 12月 14日 土曜日

BlueZBlueZ は 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

162013年 12月 14日 土曜日

BlueZBlueZ は 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

162013年 12月 14日 土曜日

BlueZBlueZ は 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

162013年 12月 14日 土曜日

BlueZBluetoothデバイスは hciconfig でLinuxのネットワークI/F と同じ感じで使う

root@rasp-orange2:/home/pi/config/bluez-5.11# hciconfighci0: 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:0root@rasp-orange2:/home/pi/config/bluez-5.11# hciconfig hci0 uproot@rasp-orange2:/home/pi/config/bluez-5.11# hciconfig rstathci0: 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

172013年 12月 14日 土曜日

bluez-ibeaconBluezを使用した iBeaconのExample

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

Beacon側向けプロセスとiOS側アプリの参照実装

Beacon側は以下のコマンドでアドバタイズを開始

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

182013年 12月 14日 土曜日

demo

192013年 12月 14日 土曜日

one more things ?

202013年 12月 14日 土曜日

iBeacons212013年 12月 14日 土曜日

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

Bluetoothでの位置測定

232013年 12月 14日 土曜日

Bluetoothでの位置測定

242013年 12月 14日 土曜日

Bluetoothでの位置推定

252013年 12月 14日 土曜日

Bluetoothでの位置推定

実用になるの?

252013年 12月 14日 土曜日

Bluetoothでの位置推定

iOS7でのBluetoothでの測距については

さいたま開発勉強会 Vol.8

岸川さんのターン参照

262013年 12月 14日 土曜日

Bluetoothでの位置推定

iOS7でのBluetoothでの測距については

さいたま開発勉強会 Vol.8

岸川さんのターン参照

大変勉強になりました!

262013年 12月 14日 土曜日

論文等を参考にしてみる(ちょっと探した範囲)

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

272013年 12月 14日 土曜日

Bluetoothでの位置推定

282013年 12月 14日 土曜日

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

282013年 12月 14日 土曜日

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

ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等

282013年 12月 14日 土曜日

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

ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等

Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread Spectrum)を採用しているから干渉には強いけど

282013年 12月 14日 土曜日

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

ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等

Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread Spectrum)を採用しているから干渉には強いけど

2.4GHz帯の電波が出ていないクリアなロケーションばかりではない

282013年 12月 14日 土曜日

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

ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等

Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread Spectrum)を採用しているから干渉には強いけど

2.4GHz帯の電波が出ていないクリアなロケーションばかりではない

自分自身がWiFiの電波を出している場合もある

282013年 12月 14日 土曜日

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

ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等

Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread Spectrum)を採用しているから干渉には強いけど

2.4GHz帯の電波が出ていないクリアなロケーションばかりではない

自分自身がWiFiの電波を出している場合もある

電波強度(RSSI)は目安(RSSIの値自体の変動、ロケーションによる減衰率の差などを考慮が必要) -> RSSIを正しく得るには、サンプリング数をある程度取らないといけないようだ

282013年 12月 14日 土曜日

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

ISMバンド(WiFi、Bluetooth、HomeRF)、電子レンジ等

Bluetooth は周波数ホッピング方式(FHSS:Frequency Hopping Spread Spectrum)を採用しているから干渉には強いけど

2.4GHz帯の電波が出ていないクリアなロケーションばかりではない

自分自身がWiFiの電波を出している場合もある

電波強度(RSSI)は目安(RSSIの値自体の変動、ロケーションによる減衰率の差などを考慮が必要) -> RSSIを正しく得るには、サンプリング数をある程度取らないといけないようだ

282013年 12月 14日 土曜日

Bluetoothでの位置推定

正確な誘導の為にはBeaconの配置、電波環境なども制御しないとならない。

ノウハウの積み重ねとBluetoothの電波だけに頼らない工夫が必要?

292013年 12月 14日 土曜日

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

302013年 12月 14日 土曜日

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

312013年 12月 14日 土曜日

ありがとうございました

322013年 12月 14日 土曜日

案(どうしても誘導をしたい場合)

誘導を想定して指向性を持たせたBeaconを組み合わせる

※進行方向左右のBeaconのペアのRSSI値を見て真ん中を通るように誘導

332013年 12月 14日 土曜日

top related