Custom Bluetooth address Murata Type ZY

5 posts / 0 new
Last post
valex05
Offline
Last seen:5 years 5 months ago
加入:2015-02-05 15:29
Custom Bluetooth address Murata Type ZY

Hi !

My project is going well : i've been able to program my murata TYPE ZY chip in the RAM memory of the DA14580 with Smartsnippet. Nevertheless the bluetooth address isn't the one specified in the code (the one obtained when I program the dev kit).

.NVDS_TAG_BD_ADDRESS = {0x01, 0x00, 0x00, 0xCA, 0xEA, 0x81},

Is it possible to have some enlightments on this "issue" ?

The Bluetooth address obtained has been specified by murata ?
Where is it stored ?
Can I still custom it when I'll burn the OTP ? (have the final bluetooth address to be as specified in Smartsnippet before burning).

One more little thing : in the following document (http://wireless.murata.com/datasheet?/RFM/data/lbca2hnzyz-711.pdf), page 16, Vbat isn't required to program the chip throught UART (not in the jumper list in green), is that correct ?

Thanks in advance !

Device:
Joacimwe
Offline
Last seen:1 year 3 months ago
Guru
加入:2014-01-14 06:45
So what mac address are you

So what mac address are you getting instead? An address of just zeros? An address that appears random? Something else?

In the da14580_config.h, there are basically two #defines that will affect which mac address is used: APP_BOOT_FROM_OTP and READ_NVDS_STRUCT_FROM_OTP. When you run your program in RAM and not from OTP, these two must be undefined (otherwise the result will be undefined). Somewhat simplified, if the mac address in the OTP header is programmed, that one is used, otherwise the one in the nvds struct is used. This is done by checking if the OTP contains 6 zeros or not.

This assumes you have configured your device to use a public address (this is default) and not a private one, which is done in the function app_configuration_func in your application's proj file.

valex05
Offline
Last seen:5 years 5 months ago
加入:2015-02-05 15:29
I've both the flags APP_BOOT

I've both the flags APP_BOOT_FROM_OTP and READ_NVDS_STRUCT_FROM_OTP undifined.

My NVDS struct is defined as follow :
.NVDS_TAG_DEVICE_NAME = "LoveTracker",
.NVDS_TAG_BD_ADDRESS = {0x01, 0x00, 0x00, 0xCA, 0xEA, 0x81},
I have the correct name (ie this structure is considered during the upload) but the bluetooth address is :
98:F1:70:62:59:BB (Every time, not a random one).

Plus when I try to search it in the code, no occurence is found.
I really don't know where it comes from.

To finish, when I send the same code in my DEV kit, the correct BLE address is optained.

When i look in the function app_configuration_func and the gapm_set_dev_config_cmd definition, I can't find which field defines a public or private BD address.

Joacimwe
Offline
Last seen:1 year 3 months ago
Guru
加入:2014-01-14 06:45
Aha! That MAC address is

Aha! That MAC address is assigned to "Murata Manufacturing Co., Ltd." which means they have already pre-programmed in a MAC-address into OTP. As I said before, If there is a programmed MAC address in OTP, that one is favored over the one you specify in your nvds.c file.

If you can connect SmartSnippets to your Murata chip, you should be able to use the OTP tool to read the header contents and find that this address is already burnt in at "Device specific Id" at address 0x(4)7fd4. If you prefer to use another MAC address you want to program to OTP, you must store it at another free address in OTP. Preferably in the same section "Device specific Id" but 8 bytes forward, 0x(4)7fdc. If this and 0x7fe0 is unoccupied (you see zeros in SmartSnippets), you can store your own MAC address here instead. Just make sure you update
#定义BDADDR_FROM_OTP 0x7fd4
to
#定义BDADDR_FROM_OTP 0x7fdc
in nvds.c. If you update this define and leave that OTP area blank (for debugging), your MAC address written in the nvds struct will be used instead.

valex05
Offline
Last seen:5 years 5 months ago
加入:2015-02-05 15:29
Hi Joacinwe,

Hi Joacinwe,
That's what I thought !
Thanks for the last tip ! I'll try it for curiosity. This issue isn't harful for my system, but I wanted to kown what was happening.
Thanks again for your help !
Regards,
瓦尔

Topic locked