Hi Everyone,
We have 25 DA14580 devices. We want to broadcast the own MAC Address in the advertisement packet. How to get theown MAC addressof each device that?
as IOS apps can't get the MAC address of the broadcaster device due to security reasons.
Regards,
Harish
Device:
Hi HarishKumar,
Let me ask in order to check if I understood what you are trying to accomplish:
Do you mean the BLE BD address that the devices are advertising?
>>> How to get the own MAC address of each device that?
Do you mean how to get the BD address in the application code?
If you could provide some extra information on your requirement, it would be very helpful.
Thanks, PM_Dialog
Yes
how to get theOWNBD地址在应用程序代码中?
Regards,
Harish
Hi Harish ,
The BD address is stored in the cmd->op.addr.addr - please check the cmd in the user_app_advertise() function.
gapm_air_operation sctructure includes the struct bd_addr addr sctructure which provideds own static private random address .
Thanks, PM_Dialog
Where do I need to call this structure? Can you provide the logic here?
Regards,
Harish
Hi Harish,
What kind of BD address are you using in your code?
Thanks, PM_Dialog
I'm using GAPM_PUBLIC_ADDR.
static const struct advertise_configuration user_adv_conf = {
/// Own BD address source of the device:
/// - GAPM_PUBLIC_ADDR: Public Address
.addr_src = GAPM_PUBLIC_ADDR,
please share the line of code to print the device own mac address.
Regards,
Harish.
Hi Harish,
So, if I understood correctly, the device starts advertising with the BB that is set in CFG_NVDS_TAG_BD_ADDRESS macro. Is that correct? And you would like to print that macro?
Thanks, PM_Dialog
Dear PM_Dialog,
> gapm_air_operation sctructure includes the struct bd_addr addr sctructure which provideds own static private random address .
this structure only contains address type, not the address:
HarishKumar, if in app_on_init(), use
or anytime later
Hi bojanpotocnik,
Thanks for your inputs and for your indication.
Thanks, PM_Dialog