Topics

Why the default MAC address is not shown in the host when using hciconfig command in linux #ble #nrf52840 #nrf52 #hci

Venkatesh Dyagala
 

Hi,
We are willing to do the LE USB controller with the nrf52840 dongle
By looking into this case https://devzone.nordicsemi.com/f/nordic-q-a/46036/mac-address-ranges. I came to know that there will be random address loaded into the device in production of nrf52840 Dongle.
 
Then Make that as a controller followed this https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf5x-support-within-the-zephyr-project-rtos and  https://docs.zephyrproject.org/latest/getting_started/index.html to compile and build an hex file. The respective build is done for the hci_usb.
 
The build is done and loaded to the dongle using nrfutil.
 
Now when we insert into linux PC and when i check the device using the hciconfig command the MAC address of the dongle is 00:00:00:00:00:00
But when we used bluetoothctl show command a 6byte MAC address is shown.
 
 
 
I can change the MAC address manually using hcitool commands. But my question is that
 
1-->The nordic assigned MAC address in production for every device. Why that MAC address cannot be seen when the dongle is acting as a controller. Why its showing all zeros ?
 
2--> The bluetoothctl is showing the MAC address of the device But it cannot be updated in the hciconfig ?
 
3--> If we have a MAC how we can burn it into the flash what was the memory locations ?
 
4--> The MAC that we seen using bluetoothctl show is zepher hardcoded ?
 
 

--

Thanks,
venkatesh

Johan Hedberg
 

Hi Venkatesh,

On 10. Dec 2019, at 15.18, Venkatesh Dyagala <venkatesh.dyagala@...> wrote:
Now when we insert into linux PC and when i check the device using the hciconfig command the MAC address of the dongle is 00:00:00:00:00:00
But when we used bluetoothctl show command a 6byte MAC address is shown.
hciconfig uses a legacy ioctl kernel interface which is only able to retrieve the public address of a controller. nRF controllers do not come with any public address by default, which is why you only see zeroes. What controllers do need is an identity address, and that can be either a public address or a static random address. It’s the latter that gets automatically set by bluetoothd and what bluetoothctl shows you. bluetoothctl is a D-Bus client that simply shows the “Address” property of the Adapter object. That needs to be combined with the “AddressType” property to know that type of address it is (in your case it would be “random”).

Johan