Micro:bit : Raspberry Piとのペアリング

関連投稿
Micro:bit Bluetooth関連の調査
LinuxのBluetooth関連のコマンド
Micro:bit : gatttoolを使ってアクセスしてみる

project-settings

no-pairing

blue-hex

> sudo hciconfig hci0 down
> sudo hciconfig hci0 up
>sudo bluetoothctl
[bluetooth]# scan on
Discovery started
[CHG] Device DB:88:10:28:D8:61 UUIDs: e95d93b0-251d-470a-a062-fa1922dfa9a8
[NEW] Primary Service
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0016
        e95d93af-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0016/char0017
        e95d9775-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Descriptor
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0016/char0017/desc0019
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0016/char001a
        e95d5404-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0016/char001c
        e95d23c4-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0016/char001e
        e95db84c-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Descriptor
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0016/char001e/desc0020
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
[NEW] Primary Service
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0021
        e95d9882-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0021/char0022
        e95dda90-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Descriptor
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0021/char0022/desc0024
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0021/char0025
        e95dda91-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Descriptor
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0021/char0025/desc0027
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
[NEW] Primary Service
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0028
        e95d127b-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0028/char0029
        e95d5899-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0028/char002b
        e95db9fe-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0028/char002d
        e95dd822-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0028/char002f
        e95d8d00-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Descriptor
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0028/char002f/desc0031
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
[NEW] Primary Service
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0032
        e95dd91d-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0032/char0033
        e95d7b77-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0032/char0035
        e95d93ee-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_DB_88_10_28_D8_61/service0032/char0037
        e95d0d2d-251d-470a-a062-fa1922dfa9a8
        Vendor specific
[CHG] Device DB:88:10:28:D8:61 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device DB:88:10:28:D8:61 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device DB:88:10:28:D8:61 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device DB:88:10:28:D8:61 UUIDs: e95d127b-251d-470a-a062-fa1922dfa9a8
[CHG] Device DB:88:10:28:D8:61 UUIDs: e95d93af-251d-470a-a062-fa1922dfa9a8
[CHG] Device DB:88:10:28:D8:61 UUIDs: e95d93b0-251d-470a-a062-fa1922dfa9a8
[CHG] Device DB:88:10:28:D8:61 UUIDs: e95d9882-251d-470a-a062-fa1922dfa9a8
[CHG] Device DB:88:10:28:D8:61 UUIDs: e95dd91d-251d-470a-a062-fa1922dfa9a8
[CHG] Device DB:88:10:28:D8:61 ServicesResolved: yes
[CHG] Device DB:88:10:28:D8:61 ServicesResolved: no
[CHG] Device DB:88:10:28:D8:61 Connected: no
[CHG] Device DB:88:10:28:D8:61 RSSI: -73
[CHG] Device DB:88:10:28:D8:61 RSSI: -87
[CHG] Device DB:88:10:28:D8:61 RSSI: -75
[CHG] Device DB:88:10:28:D8:61 RSSI: -83
[CHG] Controller 00:1B:DC:06:BE:29 Discovering: yes
[CHG] Device DB:88:10:28:D8:61 RSSI: -42
[bluetooth]# connect DB:88:10:28:D8:61
[CHG] Device DB:88:10:28:D8:61 Connected: yes
Connection successful
[CHG] Device DB:88:10:28:D8:61 ServicesResolved: yes
[BBC micro:bit [vutaz]]# trust DB:88:10:28:D8:61
Changing DB:88:10:28:D8:61 trust succeeded
[bluetooth]# info DB:88:10:28:D8:61
Device DB:88:10:28:D8:61
        Name: BBC micro:bit [vutaz]
        Alias: BBC micro:bit [vutaz]
        Appearance: 0x0200
        Paired: no
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific           (e95d127b-251d-470a-a062-fa1922dfa9a8)
        UUID: Vendor specific           (e95d93af-251d-470a-a062-fa1922dfa9a8)
        UUID: Vendor specific           (e95d93b0-251d-470a-a062-fa1922dfa9a8)
        UUID: Vendor specific           (e95d9882-251d-470a-a062-fa1922dfa9a8)
        UUID: Vendor specific           (e95dd91d-251d-470a-a062-fa1922dfa9a8)
        RSSI: -42

もう一度リセットして最初から

cropped_20180328092403

[bluetooth]# connect DB:88:10:28:D8:61
Attempting to connect to DB:88:10:28:D8:61
[CHG] Device DB:88:10:28:D8:61 Connected: yes
Connection successful
[CHG] Device DB:88:10:28:D8:61 ServicesResolved: yes
[BBC micro:bit [vutaz]]#

cropped_20180328092449

[BBC micro:bit [vutaz]]# disconnect DB:88:10:28:D8:61
Attempting to disconnect from DB:88:10:28:D8:61
[CHG] Device DB:88:10:28:D8:61 ServicesResolved: no
Successful disconnected
[CHG] Device DB:88:10:28:D8:61 Connected: no

cropped_20180328092505