Pairing device via CLI


This section covers pairing the relay with the console from the command line interface (CLI).
Though it was written specifically for two non-GUI units, it should apply for both GUI and non-GUI units. (With GUI piACC consoles it is much easier to simply use the GUI interface in the task bar.)

To note, you should make sure you set the host name on both sides.
If the host changes, I think you will have to repeat this process.

Log in via SSH to both units. (relay & controller)
(You can do this from one or the other but having third machine makes it easier.)
On both units type:
sudo bluetoothctl
Make note of both MAC addresses.

Pair the piACC Console with the piACC Relay

On the both units type the following:
agent on
default agent
discoverable on
pairable on
scan on

On the console type (replacing %mac% with the mac address of the relay, excluding the percent chars):
pair %mac address of relay%
On both devices you should see:
Request confirmation
[agent] Confirm passkey %random number% (yes/no): yes
On both devices, accept the pairing key by typing yes
You should then see the pairing results similar to:
[CHG] Device XX:XX:XX:XX:XX:XX Modalias: usb:v1D6Bp0246d052B
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: 0000110c-0000-1000-800f-00805f9bggfb
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: 0000110e-0000-1000-800f-00805f9bggfb
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: 00001200-0000-1000-800f-00805f9bggfb
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: 00001800-0000-1000-800f-00805f9bggfb
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: 00001801-0000-1000-800f-00805f9bggfb
[CHG] Device XX:XX:XX:XX:XX:XX ServicesResolved: yes
[CHG] Device XX:XX:XX:XX:XX:XX Paired: yes
[CHG] Device XX:XX:XX:XX:XX:XX ServicesResolved: no
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no

Add Trusts

Finally, make sure both sides trust the other side by typing Trust and the MAC of the other machine...

At this point your units should be able to communicate with each other.
It may take a few tries, it does not seem to be an exact science on pairing.
Tip: If you are using a third device as mentioned, you can use the GUI to see when the relay unit is discoverable.
At this point the "pair" should work from the console unit.