⚠️ 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.
The advertising string should have a specific format. The manufacturer specific data is a flag that developer could include his own data and populate them while the device is advertising. In order to add advertising data into the advertising string, the format should be like . The ble_app_barebone example of the SDK stores the manufacturer specific data into the advertising string. Please check the mnf_data_update() function. Let me give you an example for how to use the ADV_TYPE_MANUFACTURER_SPECIFIC_DATA. Suppose that you would like to append the BD address into the advertising data. 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
Regarding the unique serial number, could you please provide me more inputs about this?
There will be cases where multiple units will be installed near eachother. We would like a way to distinguish which unit we are connecting to by including a serial number into the manufacturer specific data.
Hi ant777222,
The advertising string should have a specific format. The manufacturer specific data is a flag that developer could include his own data and populate them while the device is advertising. In order to add advertising data into the advertising string, the format should be like. The ble_app_barebone example of the SDK stores the manufacturer specific data into the advertising string. Please check the mnf_data_update() function. Let me give you an example for how to use the ADV_TYPE_MANUFACTURER_SPECIFIC_DATA. Suppose that you would like to append the BD address into the advertising data. 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
Regarding the unique serial number, could you please provide me more inputs about this?
Thanks, PM_Dialog
There will be cases where multiple units will be installed near eachother. We would like a way to distinguish which unit we are connecting to by including a serial number into the manufacturer specific data.
Hi ant777222,
Can you please indicate if you are able to add a SN to the manufacturer specific data?
Thanks, PM_Dialog
I am able to add the serial number, I think we will go a different route to distinguish however.
Thanks, Anthony
Hi ant777222,
如果你找到了答案有用,请标记为ccepted. How many units should be programmed with a unique SN? Why don’t you change the BD address?
Thanks, PM_Dialog