Change Advertisement Data

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
Kevleo94
Offline
Last seen:2 years 7 months ago
Joined:2017-09-05 07:18
Change Advertisement Data

Hi,
I want to ask about changing advertisement data. I have change "USER_ADVERTISE_DATA" and "USER_ADVERTISE_DATA_LEN" in user_config.h to send Mac Address ble
But it doesn't work. What I want to do is to send MAC Address/Physical Address of ble to application in IOS. I cannot get BLE MAC Address in IOS, because it seems IOS block the MAC Address.

So how I send Mac Address/ Physhical Address of BLE through advertisement data so it can work in iOS ?
Please help me with the solution.

Thank you

Device:
PM_Dialog
Offline
Last seen:20 hours 56 min ago
Staff
Joined:2018-02-08 11:03
Hi Kevleo94,

Hi Kevleo94,

The advertising string should have a specific format, like . You can use the ADV_TYPE_MANUFACTURER_SPECIFIC_DATA flag and append the MAC address into the manufacturer data of the advertising string.

For example let’s say that your MAC address is: x00 x01 x02 x03 x04 x05 So your advertising data will be like below

#define BLE_MAC_ADDR "\x00\x01\x02\x03\x04\x05"
#define BLE_MAC_ADDR_LEN "\x07"
#define USER_ADVERTISE_DATA BLE_MAC_ADDR_LEN\
ADV_TYPE_MANUFACTURER_SPECIFIC_DATA\
BLE_MAC_ADDR

Thanks, PM_dialog

chenpenglai
Offline
Last seen:1 week 1 day ago
Joined:2018-12-24 02:24
Hi PM_Dialog

Hi PM_Dialog

I have a question about SDK version 5.0.4.

I want to change USER_ADVERTISE_DATA at run time, but when I change nvds_data_storage.NVDS_TAG_APP_BLE_ADV_DATA at run time, the program dies.

How do I change it at run time?

PM_Dialog
Offline
Last seen:20 hours 56 min ago
Staff
Joined:2018-02-08 11:03
Hi chenpenglai,

Hi chenpenglai,

Please check ble_app_barebone example which is included in SDK5.0.4. In this example, the manufacturer specific data are stored into the advertising string and they are updated every APP_ADV_DATA_UPDATE_TO seconds. You should stop advertising first and then update the advertising string.

Thanks, PM_Dialog

chenpenglai
Offline
Last seen:1 week 1 day ago
Joined:2018-12-24 02:24
I'll try again Thank you

I'll try again

Thank you

chenpenglai
Offline
Last seen:1 week 1 day ago
Joined:2018-12-24 02:24
I'll contact you if I have

I'll contact you if I have any questions

PM_Dialog
Offline
Last seen:20 hours 56 min ago
Staff
Joined:2018-02-08 11:03
Hi chenpenglai,

Hi chenpenglai,

Thank you for posting online. If you have any follow up question or issue, I would suggest you to raise a new forum thread, as this one is very old and closed.

Thanks, PM_Dialog