Re: Unable to set Static Address on nRF52 using Zephyr v1.11.0
Carles Cufi
Hi Gurpreet,
I do not know why you get that behavior. Typically BlueZ should detect that this is an LE-only controller with no public address and would assign one to it. Maybe it’s because you seem to have more than one controller? you are using hci1 on your btmgmt log.
I just tested this locally by doing:
sudo btattach -B /dev/ttyACM0 -S 1000000 -P h4 Attaching Primary controller to /dev/ttyACM0 Switched line discipline from 0 to 15 Device index 0 attached
and then:
$ sudo btmgmt --index 0 [hci0]# auto-power Found controller with index 0 [hci0]# advertising on hci0 Set Advertising complete, settings: powered bondable le advertising secure-conn static-addr
And in btmon it clearly set a random static address:
@ MGMT Command: Set Advertising (0x0029) plen 1 {0x0004} [hci0] 123.901998 Advertising: Enabled (0x01) < HCI Command: LE Set Scan Response Data (0x08|0x0009) plen 32 #77 [hci0] 123.902018 Length: 13 Name (complete): zephyr-nrf > HCI Event: Command Complete (0x0e) plen 4 #78 [hci0] 123.904563 LE Set Scan Response Data (0x08|0x0009) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Random Address (0x08|0x0005) plen 6 #79 [hci0] 123.904604 Address: 32:82:D4:FE:B2:0F (Non-Resolvable) > HCI Event: Command Complete (0x0e) plen 4 #80 [hci0] 123.906514 LE Set Random Address (0x08|0x0005) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15 #81 [hci0] 123.906548 Min advertising interval: 1280.000 msec (0x0800) Max advertising interval: 1280.000 msec (0x0800) Type: Non connectable undirected - ADV_NONCONN_IND (0x03) Own address type: Random (0x01) Direct address type: Public (0x00) Direct address: 00:00:00:00:00:00 (OUI 00-00-00) Channel map: 37, 38, 39 (0x07) Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00) > HCI Event: Command Complete (0x0e) plen 4 #82 [hci0] 123.907511 LE Set Advertising Parameters (0x08|0x0006) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1 #83 [hci0] 123.907569 Advertising: Enabled (0x01) > HCI Event: Command Complete (0x0e) plen 4 #84 [hci0] 123.909506 LE Set Advertise Enable (0x08|0x000a) ncmd 1 Status: Success (0x00)
From: Gurpreet Singh <gurpreet@...>
Sent: 30 May 2018 14:32 To: Cufi, Carles <carles.cufi@...> Cc: users@... Subject: Re: [Zephyr-users] Unable to set Static Address on nRF52 using Zephyr v1.11.0
Hi Carles
Yes. I've been doing that but the Mac address comes up as all zeroes. Which is my original problem. So how do I set a Mac address? Or why is it all zeroes?
Gurpreet
|
|||||||||||||||||||||||
|