Hi
I am trying to provide the PIN code to BlueZ only when PIN code request event is occurring.When the PIN code request event is occurring, then the application asks the user to type in the PIN code, and then sends it to the BT Controller with HCI_pin_code_request_reply.
The problem is that bluetoothd daemon already has send the hci_pin_code_request_negative_reply without waiting to the application.
The procedure to send the PIN code is written C code does the following:
1) It looks for events Bluetooth events2) When pin_code_request_event occurs then I send the pin_code_request_reply command
Could it be that this issue is related to being in "non-bondable mode"?
Thanks,Nir
You need to register your application as an agent with the adapter interface (RegisterAgent), then the agent will be called when user input is needed. A sample c agent application exists in bluez-4.xx/test/agent.c.
Hope this helps.
Thanks,
Sinoj
If the adapter is non-pairable (org.bluez.Adapter Properties.Pairable) bluetooth daemon will be sending "PIN Code Request Negative Reply" without prompting the agent.
Hi Nir,
Is that question is still open? Or did Sinoj answer solve the issue?
Eyal
Pin code request negative reply issue was solved by writing an agent to handle the pin code requests.
Issue is closed.Thanks,Nir