16. ラズパイをBluemix IoT
Foundationにつなぐ (1)
¡ ラズパイにログインする.
¡ 接続⽤用プログラムをダウンロードする
10/5/15
16
$ sudo dpkg -i iot_1.0-1_armhf.deb
Selecting previously unselected package iot.
(Reading database ... 78520 files and directories currently installed.)
Unpacking iot (from iot_1.0-1_armhf.deb) ...
Setting up iot (1.0-1) ...
Starting the iot program
$ curl -LO https://github.com/ibm-messaging/iot-
raspberrypi/releases/download/1.0.2/iot_1.0-1_armhf.deb
% Total % Received % Xferd Average Speed Time Time Time Current ….
100 397 0 397 0 0 482 0 --:--:-- --:--:-- --:--:-- 644
100 108k 100 108k 0 0 44019 0 0:00:02 0:00:02 --:--:-- 115k
¡ 接続⽤用プログラムをインストールする
17. ラズパイをBluemix IoT
Foundationにつなぐ (2)
¡ プログラムの稼働状況を確認する
10/5/15
17
$ service iot status
[ ok ] iot is running.
引数にはstausの代わりにstart, stopも使える
¡ デバイスの識識別⼦子(MACアドレスを使う)を取得する
$ service iot getdeviceid
The device ID is b837eb388eda
For Real-time visualization of the data, visit
http://quickstart.internetofthings.ibmcloud.com/?deviceId=b837eb388eda
¡ 表⽰示されるURLにアクセスする.