OpenBlocks IoT BX1でbluetooth有効化
Posted on: 2014-12-28 /
Categories: OpenBlocks IoT BX1
OpenBlocks IoT BX1でbluetoothを有効にするには下記のコマンドを入力します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# bluetooth_rfkill_event & [1] 2528 root@obsbx1:~# 1419774465.263297: idx 2 type 2 op 0 soft 1 hard 0 # rfkill unblock bluetooth 1419774477.241033: idx 2 type 2 op 2 soft 0 hard 0 # execute brcm_patchram_plus --use_baudrate_for_download --no2bytes --enable_fork --enable_lpm --enable_hci --baudrate 3000000 --patchram /etc/firmware/bcm43341.hcd --bd_addr XX:XX:XX:XX:XX:XX /dev/ttyMFD0 Done setting line discipline 1419774477.703569: idx 3 type 2 op 0 soft 0 hard 0 # hciconfig hci0: Type: BR/EDR Bus: UART BD Address: 98:4F:EE:03:D8:58 ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING PSCAN RX bytes:954 acl:0 sco:0 events:42 errors:0 TX bytes:987 acl:0 sco:0 commands:42 errors:0 |
“bluetooth_rfkill_event &”を入力したら一度Enterキーを押してコンソールに戻ります。
続けて”rfkill unblock bluetooth”を入力した時にもEnterキーを押してコンソールに戻ります。
有効になっているかの確認のために”hciconfig”を実行します。
bluetoothの起動方法
1 |
# /etc/init.d/bluetooth start |
bluetoothの停止方法
1 |
# /etc/init.d/bluetooth stop |
bluetoothのデバイス確認方法
1 |
# hcitool dev |
bluetoothのデバイススキャン
1 |
# hcitool scan |
bluetoothのLE(ローエナジー)デバイススキャン
1 |
# hcitool lescan |