Hi,

On 25 February 2017 at 01:54, Christopher Collins <[email protected]> wrote:
> Hi Alan,
>
> On Sat, Feb 25, 2017 at 12:21:15AM +0000, Alan Graves wrote:
>> Well my conclusion is that the HCI mode is frustrating at best to use on the 
>> BlueZ stack!
>>
>> In my initial attempts to talk to the controller I use this command:
>> $ sudo btmgmt --index 1
>> [sudo] password for alan:
>> [hci1]#
>>
>> First thing I noticed is that the MyNewt HCI mode tutorial says to set the 
>> static address:
>> [hci1]# static-addr cc:00:00:00:00:00
>> Set static address failed with status 0x0b (Rejected)
>
> I believe you can only configure an address while the controller is
> "powered off" (scare quotes because the board doesn't actually have to
> be powered off, BlueZ just has to consider it to be in the powered off
> state).  Try the following from btmgmt:
>
>     power off
>     static-addr cc:00:00:00:00:00
>     power on
>
>> This doesn't work on my system. I'm not sure what the problem is, but
>> perhaps the initial BT addr 00:00:00:00:00:00 is a clue?
>
> The all-zero address indicates that your controller is not configured
> with a public address.  With no public address and no random address
> you are pretty restricted in what you can do.
>
> Hopefully this resolves some of the issues you're seeing.  I'm afraid my
> knowledge of BlueZ is pretty poor, so I can't say if there is any issue
> with the C program


Just released BlueZ 5.44 has added support for this :)

>From release notes:
"support for using single-mode (LE-only) controllers that lack a
public address (therefore necessitating the use of a static random
identity address). E.g. any nRF5x controller running a MyNewt or
Zephyr based firmware falls into this category."

So there should be no need for setting this up manually with btmgmt anymore.

-- 
pozdrawiam
Szymon K. Janc

Reply via email to