Add serial number to manufacture specific 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.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
ant777222
Offline
Last seen:1 month 4 weeks ago
Joined:2019-07-11 17:03
Add serial number to manufacture specific data

我would like to assign a unique serial number to manufacture specific data for each production unit we produce. How would I go about this.

Thanks

Device:
PM_Dialog
Offline
Last seen:2 days 8 hours ago
Staff
Joined:2018-02-08 11:03
Hi ant777222,

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

ant777222
Offline
Last seen:1 month 4 weeks ago
Joined:2019-07-11 17:03
There will be cases where

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.

PM_Dialog
Offline
Last seen:2 days 8 hours ago
Staff
Joined:2018-02-08 11:03
Hi ant777222,

Hi ant777222,

Can you please indicate if you are able to add a SN to the manufacturer specific data?

Thanks, PM_Dialog

ant777222
Offline
Last seen:1 month 4 weeks ago
Joined:2019-07-11 17:03
我am able to add the serial

我am able to add the serial number, I think we will go a different route to distinguish however.

Thanks, Anthony

PM_Dialog
Offline
Last seen:2 days 8 hours ago
Staff
Joined:2018-02-08 11:03
Hi ant777222,

Hi ant777222,

我f you found the answer useful, pleas mark it as accepted. How many units should be programmed with a unique SN? Why don’t you change the BD address?

Thanks, PM_Dialog