Would you please teach me how shall we write BLE MAC address to KW36?
I think it shall be stored in one-time flash area but the address for BLE MAC address is not described in the document.
MKW36A512RM.pdf has the description that
45.2.12.1.4.2 Function
The Radio MAC Address registers provide a unique ID that is stored in the Flash during
factory test.
However, I don't know what factory test means. Is it NXP factory test or our factory test?
Question is:
1. Do we need to pass the list of BLE MAC address for our chips to NXP and ask NXP to write them to the chips?
2. Shall we write BLE MAC address by ourselves? Then, how shall we write?
I think I misunderstood this MAC_ADDR_LSB/MSB and bluetooth address.
Please tell me the current my understanding is correct or not.
1. MAC_ADDR_LSB/MSB register gives us the unique id provided by NXP. But we don't need to use it as Bluetooth MAC address. Anyway, MAC_ADDR_LSB/MSB is 40-bits data and we need to provide 48-bits MAC address.
2. Bluetooth MAC address shall be set to global variable gBD_ADDR like this..
FLibMemCpy(gBD_ADDR, unique_mac_address_provided_by_us, 6);
3. We need to provide unique MAC address by ourselves if we don't use MAC_ADDR provided by NXP. And if we use MAC_ADDR provided by NXP, we still need to use our OUI for Bluetooth MAC address and we cannot simply add 8 bits to MAC_ADDR for Bluetooth MAC address.If we use our OUI, remaining LAP is 24 bits and uniqueness of 40-bits MAC_ADDR provided by NXP is useless.
4. The storage where we shall put the tracked (by Visteon) Bluetooth MAC address shall be decided by us.
Just copying Bluetooth MAC address to gBD_ADDR is okay for KW36?
(It seems vulnerable to use global variable to store Bluetooth MAC address run time.)
What is the use of MAC_ADDR provided by NXP for the real product?
Hello,
If you check the ControllerSetBD_ADDR function you can see that it takes the registers of the MAC in the device and it generates a random number that it's being used as well in the BD_ADDR. You can move the location of it, still, you will need to consider that the stack uses it and you will need to modify both the function that sets and check it as well as the linker file where the parameters are being used.
This function is also used for the KW.
It is not possible to provide 24 unique bits for all our devices, you can try instead of using a public address use other of the available option as it is mentioned in the Vol 6. Part B. Section 1.3 of the Bluetooth LE specification
Regards,
Estephania
What I would like to ask you is how we can use Public Device Address for KW36.
We already got our OUI from IEEE Registration Authority and will assign the unique LAP for each device.
In this case, can we just set this Public Device Address to gBD_ADDR and we can completely forget about MAC_ADDR assigned by NXP?
Then, what is the use of MAC_ADDR assigned by NXP?
Hello,
The MAC_ADDR works as a unique identifier for the KW families, you do not have to use it if you don't need it.
Regards,
Estephania
Hello,
The 40-bit MAC address is stored in MAC_ADDR_LSB and MAC_ADDR_MSB, those are read only registers.
Could you please check this application note? I believe this will solve all your questions regarding the MAC.
Regards ,
Estephania
I understand that MAC_ADDR_LSB/MSB are read only registers and we can read their value once MAC address is written to flash.
Based on the application note, I understand NXP writes BLE MAC address before shipping the KW36.
Would you please tell us what BLE MAC address do you write in the factory?
Are they the ones which are numbered as NXP product?
Or shall we provide the numbers for our (Visteon) product?
Hello,
The BD address it's set in run time by software, you will need to use your number and set those in the code.
You can check in the examples the API to set it ControllerSetBD_ADDR , you can find it in the ble_controller_task.c
Regards,
Estephania
I think what you are talking about is the 48-bits bluetooth address for QN908x. ControllerSetBD_ADDR is only enabled for QN908x.
And my question is about 40-bits Bluetooth MAC address itself.
I understand that you write it in your factory.
The point is what MAC address number is written in your factory.
Is it MAC address assigned for NXP or MAC address assigned for Visteon?
If you can write Visteon MAC address, we need to pass the list of MAC address with the request of purchase of the chips.