Re: bt "server" how to configure requiring passkey from connecting clients

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2018-08-14 at 12:14 +0000, Libor Peltan wrote:
> Thanks Bastien for your brief, but leading answer.
> 
> Still, I feel like I'm missing something :(
> 
> I've read the links carefully. The "CHIP-bluetooth-speaker" uses
> bluez-tools' bt-agent with parameters set so that it's using
> NoInputNoOutput capabilitiy, but requiring Passkey at the same time.
> This is exactly what I want!
> 
> No having bluez-tools in my setup, I tried to make my own programmed
> agent behave similarly, i.e. according to your hint, implement the
> RequestPasskey method in my agent. However, this method is never
> called! When pairing a phone, BlueZ only calls the AuthorizeService
> method of my agent.
> 
> How can I force BlueZ  to call the RequestPasskey method of my agent?
> 
> I tried to analyze how bluez-tools do it, but I haven't find anything
> in their code. They seem to simply work...

You will also need to register the agent, and make sure it's the
default one (you'll probably want to disable whatever other one you
have running).

You would probably only ever get AuthorizeService if the device is
already paired. You would need to unpair it, and once paired, mark it
as trusted so that AuthorizeService is not called and the service is
authorised without any further prompts (or check that the device is
paired in your AuthorizeService implementation).

HTH




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux