6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RassberyPI ibeacon化メモ

Last updated at Posted at 2015-10-15

・USBはさしておく。。。

・ライブラリインストール
sudo apt-get install libglib2.0-dev libdbus-1-dev libudev-dev libical-dev libreadline6-dev

・bluezのインストール
最新版を調べる
https://www.kernel.org/pub/linux/bluetooth
5.35だったのでとりあえず。。。
wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.35.tar.gz
tar xvf bluez-5.35.tar.gz
cd bluez-5.35/
./configure --disable-systemd --enable-library
make
sudo make install

・状態確認
hciconfig

hci0: Type: BR/EDR Bus: USB
BD Address: 00:09:DD:40:BF:84 ACL MTU: 310:10 SCO MTU: 64:8
DOWN
RX bytes:574 acl:0 sco:0 events:30 errors:0
TX bytes:368 acl:0 sco:0 commands:30 errors:0

DOWNになってる。

sudo hciconfig hci0 up

hci0: Type: BR/EDR Bus: USB
BD Address: 00:09:DD:40:BF:84 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:1148 acl:0 sco:0 events:60 errors:0
TX bytes:736 acl:0 sco:0 commands:60 errors:0

・親切な人のbeaconをDLしてビルド
cd ~
git clone https://github.com/carsonmcdonald/bluez-ibeacon.git
cd bluez-ibeacon/bluez-beacon/
make

・とりあえず動かしてみる
./ibeacon

Usage: ./ibeacon

使い方が出る。

さて。。。

TODO
・bluez-ibeaconのソースを見る
・sinatraLIKEな何かでID変えて起動・停止出来るようにする

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?