Pairing and connecion with bluez 5.49

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pairing and connecion with bluez 5.49

541 Views
sergio_dorazio
Contributor IV

Dear,

I am working with a target board IMX6ULL EVK with Linux and Bluez 5.49, I want to connect a Samsung smartphone with my board through Bluetooth.

I use this command on the target for start Bluetooth:

 

hciattach /dev/ttymxc1 texas 3000000

hciconfig hci0 name 'Target'

bluetoothctl

power on

discoverable on

default-agent

 

On the smartphone I start the pairing procedure, the smarphore ask pin code, I put 1234, the target ask pin code, I put 1234.

On the smartphone the connection is failed, on the target the connection is OK and after few second is failed.

I read in some forum that Bluez 5.49 generate automatically 6 char of random pin that the 2 bluetooth exchange  and activate, the operator don’t put the pin manually.

Why the pairing procedure ask me the pin ?

Why the connection is failed ?

 

I test an other start sequence that not use default-agent :

hciattach /dev/ttymxc1 texas 3000000

hciconfig hci0 name 'Target'

bluetoothctl

power on

discoverable on

agent off

agent KeyboardDisplay

 

In this case the pairing procedure don’t ask me the pin code (correct) but the connection is failed as previous case. Why ?

If I put agent DisplayOnly or NoInputNoOutput  or DisplayYesNo or KeyboardOnly  the pairing procedure don’t ask me the pin code (correct) but the connection is failed as previous case. Why ?

 

Probably my start sequence is not correct.

Can you send me an example of start sequence that work ?

 

Our customer ask us to use a programmable pin code for Bluetooth and not random pin code, is it possible in Bluez 5.49 ?

Can I change the pin code of default-agent ?

0 Kudos
0 Replies