Bluetooth device address

3 posts / 0 new
Last post
ciano
Offline
Last seen:3 weeks 1 day ago
Joined:2014-10-03 08:13
Bluetooth device address

Dear Dialog

I have noticed, that the Bluetooth device address (BDADDR) is both present in the OTP NVDS and the OTP header

In OTP NVDS at address 0x40098, which at boot time is copied to the sysram at 0x20000340 + 0x98
In OTP header at address 0x47FD4

My questions are:
Why is the BDADDR stored in two locations?
一个位置否决其他吗?
Which location is used by the bluetooth stack(ROM)?
Is the bluetooth stack(ROM) not reading the BDADDR directly, and only getting the BDADDR from messages send from user app?

Thank you in advance
Best Regards,
Ciano
Denmark

Device:
MT_dialog
Offline
Last seen:1 week 1 day ago
Staff
Joined:2015-06-08 11:34
Hi Ciano,

Hi Ciano,

Is just another location for the bd address to be stored in, the code is using the OTP header in order to read the bd address, if this is empty it goes to the NVDS and populates the bd address from there. You can have a look to the symdef.txt file to check the location of the ROM code. The ROM code calls the nvds_get overided by the custom_nvds_get_func in the nvds.c in order to get the BD address. If you read the OTP and populate the dev_bdaddr variable with a value from the OTP and the value is not zeros then the OTP bd address will be chosen else the code will call the nvds_get_func to read from the NVDS.

Thanks MT_dialog

ciano
Offline
Last seen:3 weeks 1 day ago
Joined:2014-10-03 08:13
Thank you Dialog.

Thank you Dialog.
This gave me very usefull info, and a good understanding.

Topic locked