/var/log/messages

Oct 30, 2014 - 4 minute read - Comments - Linux

intel edison

火を入れて接続してみました。

Breakout Board のソレが以下。

uname の出力が以下です。

Linux edison 3.10.17-poky-edison+ #1 SMP PREEMPT Wed Aug 20 16:09:18 CEST 2014 i686 GNU/Linux

lsmod の出力が以下。

root@edison:~# lsmod
Module                  Size  Used by
usb_f_acm              14335  1 
u_serial               18556  6 usb_f_acm
g_multi                70540  0 
libcomposite           39245  2 usb_f_acm,g_multi
bcm_bt_lpm             13676  0 
bcm4334x              578947  0 

ちなみにコンソールからの接続では root のパスワード入力は略でした。

  • systemd が動いている
  • wlan0 がある
  • usb0 という nic があって IP address 付いてる

/etc/versoin の中身が以下。

# cat /etc/version 
edison-weekly_build_56_2014-08-20_15-54-05
  • hciconfig は何も出力せず

/etc/bluetooth の中が以下。

# ls /etc/bluetooth/
input.conf      main.conf       network.conf    proximity.conf

bluetooth 関連は /etc/systemd/system/bluetooth.target.wants/bluetooth.service?

# cat /etc/systemd/system/bluetooth.target.wants/bluetooth.service 
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)

[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/lib/bluez5/bluetooth/bluetoothd
NotifyAccess=main
#WatchdogSec=10
#Restart=on-failure
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1

[Install]
WantedBy=bluetooth.target
Alias=dbus-org.bluez.service

bluetooth な daemon の状態が以下?

root@edison:~# systemctl status bluetooth.service
   bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
   Active: inactive (dead)
     Docs: man:bluetoothd(8)

とりあえず、BT なデバイスがあるみたいなので接続試験とかしてみます。何かあれば追記の方向。

追記

ログイン時のナニが以下でした。

Poky (Yocto Project Reference Distro) 1.6 edison ttyMFD2

edison login: 

そして bluetooth 関連が色々アレ。

# bluetoothctl
[bluetooth]# scan on
No default controller available

とか

# hcitool scan
Device is not available: No such device

だったりとか。hciconfig で up を、とかってそもそもデバイスファイルが分からない。直球で「edison bluetooth no default controller available」でググッたら以下がでてきた。

でびあんなイメージがあるのか、つうかどうやってアレするんでしょ。

それは良いとして以下で認識できた模様。

# rfkill unblock bluetooth
# hciconfig hci0 up
# bluetoothctl
[NEW] Controller 98:4F:EE:03:90:EA BlueZ 5.18 [default]
[bluetooth]# 

いやはや。その後、bluetoothctl から scan on したらデバイス発見できてますね。

[bluetooth]# scan on
Discovery started
[CHG] Controller 98:4F:EE:03:90:EA Discovering: yes
[NEW] Device 00:00:16:00:2A:11 BTSP10

こいつとペアリングしてみます。

[bluetooth]# pair 00:00:16:00:2A:11
Attempting to pair with 00:00:16:00:2A:11
[CHG] Device 00:00:16:00:2A:11 Connected: yes
[CHG] Device 00:00:16:00:2A:11 UUIDs:
        00001108-0000-1000-8000-00805f9b34fb
        0000110b-0000-1000-8000-00805f9b34fb
        0000110e-0000-1000-8000-00805f9b34fb
        0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 00:00:16:00:2A:11 Paired: yes
Pairing successful
[CHG] Device 00:00:16:00:2A:11 Connected: no
[CHG] Device 00:24:EF:67:D4:02 RSSI: -83

状態の確認の方法がよくわからんな。こうか。

[bluetooth]# paired-devices
Device 00:00:16:00:2A:11 BTSP10

ペアリングはされている模様。その後紆余曲折の後にパケジが足りていないのでは、ということになりましてパッケージマネージャを探しております。

どうも opkg というヤツを使っているらしい、ってことで以下ドキュメント参照しつつ設定ファイルを書き換え。

で、opkg update してインターネットに接続されていないことに気づいていたりなど。

とりあえず、

# systemctl start wpa_supplicant
# wpa_cli

にて何とかなっているのかどうか。

> add_network
0
> set_network 0 ssid "fugahoge"
OK
> set_network 0 psk "hogepiyo"
OK
> enable_network 0
OK

でプロンプトが戻ってこず、困っているのが今です (ぇ

あ、enter 押したらプロンプトが出た。一応 wlan0 に IP address もらえてるみたいです。とりあえず opkg update を。

なんかエラー、って言われてるのかどうか。よくよく見てみるに default route に到達できていない模様。よく見れば usb0 も同じネットワークになってて経路が微妙になってるのか。ifconfig usb0 down してリトライ。

それでも駄目だったので wlan0 を down して up したら通信できるようになりました。

root@edison:~# opkg update
Downloading http://repo.opkg.net/edison/repo/all/Packages.gz.
Inflating http://repo.opkg.net/edison/repo/all/Packages.gz.
Updated list of available packages in /var/lib/opkg/all.
Downloading http://repo.opkg.net/edison/repo/edison/Packages.gz.
Inflating http://repo.opkg.net/edison/repo/edison/Packages.gz.
Updated list of available packages in /var/lib/opkg/edison.
Downloading http://repo.opkg.net/edison/repo/core2-32/Packages.gz.
Inflating http://repo.opkg.net/edison/repo/core2-32/Packages.gz.
Updated list of available packages in /var/lib/opkg/core2-32.
Downloading http://iotdk.intel.com/repos/1.1/intelgalactic/Packages.
Updated list of available packages in /var/lib/opkg/intel-iotdk.
Downloading http://iotdk.intel.com/repos/1.1/iotdk/all/Packages.
Updated list of available packages in /var/lib/opkg/intel-all.
Downloading http://iotdk.intel.com/repos/1.1/iotdk/i586/Packages.
Updated list of available packages in /var/lib/opkg/intel-i586.
Downloading http://iotdk.intel.com/repos/1.1/iotdk/x86/Packages.
Updated list of available packages in /var/lib/opkg/intel-x86.

そして、スルーしてたのですがとりあえず flash しなきゃいけないの?

flash は別途で

以下を確認させて頂きつつ

opkg list|wc してみたら 24770 行って出てきてびっくりしてたら一つのパケジで一行ではなかった模様。blue で grep したら以下。

root@edison:~# opkg list |grep blue
bluetooth-rfkill-event - 1.0-r0 - bluetooth-rfkill-event version 1.0-r0  Bluetooth rfkill event daemon for
bluetooth-rfkill-event-dbg - 1.0-r0 - bluetooth-rfkill-event version 1.0-r0 - Debugging files  Bluetooth rfkill
bluetooth-rfkill-event-dev - 1.0-r0 - bluetooth-rfkill-event version 1.0-r0 - Development files  Bluetooth
bluez5 - 5.18-r0 - Linux Bluetooth Stack Userland V5  Linux Bluetooth stack V5 userland
bluez5 - 5.18+git0+cdfdc6b2b6-r0 - Linux Bluetooth Stack Userland V5  Linux Bluetooth stack V5 userland
bluez5-dbg - 5.18-r0 - Linux Bluetooth Stack Userland V5 - Debugging files  Linux Bluetooth
bluez5-dbg - 5.18+git0+cdfdc6b2b6-r0 - Linux Bluetooth Stack Userland V5 - Debugging files  Linux Bluetooth
bluez5-dev - 5.18-r0 - Linux Bluetooth Stack Userland V5 - Development files  Linux Bluetooth
bluez5-dev - 5.18+git0+cdfdc6b2b6-r0 - Linux Bluetooth Stack Userland V5 - Development files  Linux Bluetooth
bluez5-doc - 5.18-r0 - Linux Bluetooth Stack Userland V5 - Documentation files  Linux Bluetooth
bluez5-doc - 5.18+git0+cdfdc6b2b6-r0 - Linux Bluetooth Stack Userland V5 - Documentation files  Linux Bluetooth
bluez5-obex - 5.18-r0 - Linux Bluetooth Stack Userland V5  Linux Bluetooth stack V5 userland
bluez5-obex - 5.18+git0+cdfdc6b2b6-r0 - Linux Bluetooth Stack Userland V5  Linux Bluetooth stack V5 userland
bluez5-testtools - 5.18-r0 - Linux Bluetooth Stack Userland V5  Linux Bluetooth stack V5 userland
bluez5-testtools - 5.18+git0+cdfdc6b2b6-r0 - Linux Bluetooth Stack Userland V5  Linux Bluetooth stack V5 userland
kernel-module-bcm-bt-lpm - 3.10.17+git0+6ad20f049a_c03195ed6e-r0 - bcm-bt-lpm kernel module  bcm-bt-lpm kernel module; bcm43xx_bluetooth
libasound-module-bluez - 5.18-r0 - Linux Bluetooth Stack Userland V5  Linux Bluetooth stack V5 userland
libasound-module-bluez - 5.18+git0+cdfdc6b2b6-r0 - Linux Bluetooth Stack Userland V5  Linux Bluetooth stack V5 userland

libasound-module-bluez なんてのがありますね。

あとパケジの導入は例えば http://repo.opkg.net/edison/repo/ 配下から .ipk なファイルを download してきて opkg install で導入、なのかな。

とりあえず libasound-module-bluez 確認します。

蛇足ですが

lspci の出力が以下。

00:00.0 Host bridge: Intel Corporation Device 1170 (rev 01)
00:01.0 SD Host controller: Intel Corporation Device 1190 (rev 01)
00:01.2 SD Host controller: Intel Corporation Device 1190 (rev 01)
00:01.3 SD Host controller: Intel Corporation Device 1190 (rev 01)
00:02.0 Display controller: Intel Corporation Device 1182 (rev 01)
00:04.0 Serial controller: Intel Corporation Device 1191 (rev 01)
00:04.1 Serial controller: Intel Corporation Device 1191 (rev 01)
00:04.2 Serial controller: Intel Corporation Device 1191 (rev 01)
00:04.3 Serial controller: Intel Corporation Device 1191 (rev 01)
00:05.0 Serial controller: Intel Corporation Device 1192 (rev 01)
00:06.0 System peripheral: Intel Corporation Device 1193 (rev 01)
00:06.1 System peripheral: Intel Corporation Device 1193 (rev 01)
00:07.0 System peripheral: Intel Corporation Device 1194 (rev 01)
00:07.1 System peripheral: Intel Corporation Device 1194 (rev 01)
00:07.2 System peripheral: Intel Corporation Device 1194 (rev 01)
00:08.0 Communication controller: Intel Corporation Device 1195 (rev 01)
00:08.1 Communication controller: Intel Corporation Device 1195 (rev 01)
00:08.2 Communication controller: Intel Corporation Device 1195 (rev 01)
00:08.3 Communication controller: Intel Corporation Device 1195 (rev 01)
00:09.0 Communication controller: Intel Corporation Device 1196 (rev 01)
00:09.1 Communication controller: Intel Corporation Device 1196 (rev 01)
00:09.2 Communication controller: Intel Corporation Device 1196 (rev 01)
00:0a.0 Communication controller: Intel Corporation Device 1197 (rev 01)
00:0b.0 Encryption controller: Intel Corporation Device 1198 (rev 01)
00:0c.0 System peripheral: Intel Corporation Device 1199 (rev 01)
00:0d.0 Multimedia audio controller: Intel Corporation Device 119a (rev 01)
00:0e.0 System peripheral: Intel Corporation Device 119b (rev 01)
00:11.0 USB controller: Intel Corporation Device 119e (rev 01)
00:12.0 Signal processing controller: Intel Corporation Device 119f (rev 01)
00:13.0 Co-processor: Intel Corporation Device 11a0 (rev 01)
00:14.0 Co-processor: Intel Corporation Device 11a1 (rev 01)
00:15.0 System peripheral: Intel Corporation Device 11a2 (rev 01)
00:16.0 Co-processor: Intel Corporation Device 11a3 (rev 01)
00:16.1 Co-processor: Intel Corporation Device 11a4 (rev 01)
00:17.0 System peripheral: Intel Corporation Device 11a5 (rev 01)
00:18.0 Display controller: Intel Corporation Device 11a6 (rev 01)

/proc/meminfo とかもとっときゃよかった。

sendBroadcast の action でハマった件 BMX

comments powered by Disqus