07-15-2019, 03:16 PM
@Tim Curtis
[Haven't looked at your Pairing Agent code, but at first blush it doesn't seem to matter in the following if the Agent is on or off.]
In a nutshell: scan, pair, enter PIN, connect, trust.
Notes
Regards,
Kent
[Haven't looked at your Pairing Agent code, but at first blush it doesn't seem to matter in the following if the Agent is on or off.]
In a nutshell: scan, pair, enter PIN, connect, trust.
Code:
pi@moode54b23a:~ $ sudo bluetoothctl
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:FB:1A:BE Discovering: yes
[NEW] Device B8:27:EB:41:35:CF MoodeLR Bluetooth
[CHG] Device B8:27:EB:41:35:CF RSSI: -72
[NEW] Device DC:2C:26:01:82:8A Bluetooth Media Control & Camera Shutter Click ## NOTE 1
[bluetooth]# pair DC:2C:26:01:82:8A
Attempting to pair with DC:2C:26:01:82:8A
[CHG] Device DC:2C:26:01:82:8A Connected: yes
[agent] PIN code: 932042 ## NOTE 2
[CHG] Device DC:2C:26:01:82:8A Modalias: usb:v05ACp023Cd011B
[CHG] Device DC:2C:26:01:82:8A UUIDs: 00001000-0000-1000-8000-00805f9b34fb
[CHG] Device DC:2C:26:01:82:8A UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device DC:2C:26:01:82:8A UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device DC:2C:26:01:82:8A ServicesResolved: yes
[CHG] Device DC:2C:26:01:82:8A Paired: yes
Pairing successful
[CHG] Device DC:2C:26:01:82:8A ServicesResolved: no
[CHG] Device DC:2C:26:01:82:8A Connected: no
[bluetooth]# connect DC:2C:26:01:82:8A
Attempting to connect to DC:2C:26:01:82:8A
[CHG] Device DC:2C:26:01:82:8A Connected: yes
Connection successful
[CHG] Device DC:2C:26:01:82:8A ServicesResolved: yes
[Bluetooth Media Control & Camera Shutter Click]# trust DC:2C:26:01:82:8A
[CHG] Device DC:2C:26:01:82:8A Trusted: yes
Changing DC:2C:26:01:82:8A trust succeeded
[Bluetooth Media Control & Camera Shutter Click]# info DC:2C:26:01:82:8A
Device DC:2C:26:01:82:8A (public)
Name: Bluetooth Media Control & Camera Shutter Click
Alias: Bluetooth Media Control & Camera Shutter Click
Class: 0x00002540
Icon: input-keyboard
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: yes
UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
Modalias: usb:v05ACp023Cd011B
RSSI: -66
[Bluetooth Media Control & Camera Shutter Click]# ## NOTE 3
Notes
- Satechi doesn't show up until I click its own scan button
- If I entered the wrong PIN (fat fingers!) then CHG reports "connected: off" and bluetoothctl offers a new PIN
- from here on, Connected sometimes transitions to "no". I think it relates to the Satechi going to sleep (or being off but doesn't seem to happen synchronously with turning off the Satechi). In any case, the connection is reestablished when the Satechi is waked up with a button press or is turned back on.
Regards,
Kent