Try this experiment with a cheap Bluetooth speaker with no user interface:
- pair your tablet with the Bluetooth speaker
- turn the speaker off
- unpair the tablet from the speaker
- turn the speaker on
- pair the tablet successfully with the speaker
Now try the same experiment with a headless controller running Bluez. If inside the controller (such as a Raspberry Pi) you use hciconfig hci0 sspmode 1
then the controller will automatically pair with the tablet's Bluetooth.
But if you then turn off the controller, un-pair the tablet, and turn the controller back on, it will now refuse to pair. The tablet shows the controller in its 'advertising' list, eligible for pairing. But inside the controller, the tablet appears in its 'paired' list. The working theory is the controller thinks the tablet is paired and hence refuses to pair again.
How do cheap headless Bluetooth speakers get around this problem? Opening up the controller with SSH or a keyboard are not optional.