0
0

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.

bluetoothctl を使ってデバイスの検出

0
Posted at

「gatttool を使って NUS( Nordic UART Service ) とつなぐ実験」
https://qiita.com/nanbuwks/items/7c448837eedf439b8ee9

では、hcitoolを使ってデバイスの検出を行いました。ここでは bluetoothctl を使って同様に検出をしてみます。

環境

以下の2つで同様に動作することを確認しました

Ubuntu 18.04 (AMD64)

Raspberry Pi + Raspbian Buster Lite(2019-07-10)版

インストール

特にインストール作業しなくても入っているみたいです。

Ubuntu18.04 では bluetoothctl: 5.48

Raspbian2019-07-10 ではbluetoothctl: 5.50

検出

以下は Ubuntu18.04での操作。
Raspberry Pi では sudo をつけないと動きませんでした。


$ bluetoothctl
[NEW] Controller 48:D2:24:08:71:57 nanbuwks-ThinkPad-X230-Tablet [default]
[NEW] Device EC:FB:26:04:7A:E9 Nordic_BMS
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 48:D2:24:08:71:57 Discovering: yes
[NEW] Device D1:7C:18:BB:9E:96 Penbe
[NEW] Device 5B:FB:29:CA:9C:78 5B-FB-29-CA-9C-78
[NEW] Device 9A:F1:99:7F:9D:7A 63d170-bt
[CHG] Device 9A:F1:99:7F:9D:7A TxPower: 10
[CHG] Device 9A:F1:99:7F:9D:7A Class: 0x00200404
[CHG] Device 9A:F1:99:7F:9D:7A Icon: audio-card
[CHG] Device 9A:F1:99:7F:9D:7A Modalias: usb:v1D6Bp0246d0525
[CHG] Device 9A:F1:99:7F:9D:7A UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 9A:F1:99:7F:9D:7A UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 9A:F1:99:7F:9D:7A UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -60
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -73
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -64
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -75
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -59
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -68
[NEW] Device 72:F5:C6:30:6F:CD 72-F5-C6-30-6F-CD
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -76
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -66
[CHG] Device 5B:FB:29:CA:9C:78 RSSI: -81
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -74
[CHG] Device D1:7C:18:BB:9E:96 RSSI: -65
[bluetooth]# 
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?