The real issue now is that we need to do the pairing from the phone and not from Edison.
What works:
1) Pair from Edison.
2) Connect once paired from phone
3) Pass data from Edison to the phone.
What doesn't work:
1) Do the pairing from the phone.
What happens:
1) Press BlueZ for pairing request on phone
2) "Unable to pair with BlueZ 5.18. Incorrect PIN or password.
3) Note, we were never asked by the phone to enter a pin.
What we see in bluetoothctl:
[bluetooth]# discoverable yes
Changing discoverable on succeeded
[CHG] Device BC:B1:F3:BC:01:93 Connected: yes
[CHG] Device BC:B1:F3:BC:01:93 Connected: no
[bluetooth]#
What we see on hcidump (notice the passkey but no request for a passkey was displayed on the phone) :
> HCI Event: User Confirmation Request (0x33) plen 10
bdaddr BC:B1:F3:BC:01:93 passkey 535479
< HCI Command: User Confirmation Request Negative Reply (0x01|0x002d) plen 6
bdaddr BC:B1:F3:BC:01:93
> HCI Event: Command Complete (0x0e) plen 10
User Confirmation Request Negative Reply (0x01|0x002d) ncmd 1
status 0x00 bdaddr BC:B1:F3:BC:01:93
> HCI Event: Simple Pairing Complete (0x36) plen 7
status 0x05 bdaddr BC:B1:F3:BC:01:93
Error: Authentication Failure
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 12 reason 0x13
Reason: Remote User Terminated Connection
It is clear that an application running on Edison cannot try and initiate a pairing with every phone that walks by and as this is an embedded system, there is no way to tell Edison what device to connect to.
What do I need to do?