DA14681 Wearable Dev Kit add any custom data into advertising

⚠️
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.
5 posts / 0 new
Last post
Lionel03
Offline
Last seen:6 months 5 days ago
加入:2020-10-23 12:15
DA14681 Wearable Dev Kit add any custom data into advertising

Hello Dialog,

i use DA14681 Wearable Development Kit and i want to add my own custom data into the adverting over the manufactuerer specific data.

how can i do that?

Thank you

Lionel03

Device:
PS_Dialog
Offline
Last seen:5 months 5 days ago
加入:2018-01-15 10:36
Hi,
Lionel03
Offline
Last seen:6 months 5 days ago
加入:2020-10-23 12:15
hello Dialog,

hello Dialog,

thank you for your Answer,

when i´m debugging the code I have seen manufaturer specific data in advertsising data of ble in ble scanner app.

The Link that you sharing me talk about the Adversting Data and i want to write my custoom Data in the manufaturer specific data.

the Data format look like this:

Result = 1604937913613 ScanResult{device=80:EA:CA:80:00:01,
scanRecord=ScanRecord [mAdvertiseFlags=6,
mServiceUuids = [00002 ea7 - 0000 - 1000 - 8000 - 00805f9b34fb,
0000180f-0000-1000-8000-00805f9b34fb,
0000c8c5-0000-1000-8000-00805f9b34fb,
0000180d-0000-1000-8000-00805f9b34fb,
0000fef5-0000-1000-8000-00805f9b34fb],
mServiceSolicitationUuids=[],
mManufacturerSpecificData={210=[-128, 0, 1]},
mServiceData={},
mTxPowerLevel=-2147483648,
mDeviceName=Dialog WRBL],
rssi=-62,
timestampNanos=18950393039360,
eventType=27,
primaryPhy=1,
secondaryPhy=0,
advertisingSid=255,
txPower=127,
periodicAdvertisingInterval=0}

thank you

Lionel03

Lionel03
Offline
Last seen:6 months 5 days ago
加入:2020-10-23 12:15
Hello Dialog,

Hello Dialog,

i want to fill this mManufacturerSpecificData={210=[-128, 0, 1]} with my customer Data. and what is the manufacturerId?

Thank you

Lionel03

PM_Dialog
Offline
Last seen:6 hours 14 min ago
Staff
加入:2018-02-08 11:03
Hi Lionel03,

Hi Lionel03,

The manufacturer specific data is a part of the advertising string, so the suggested tutorial should be taken as reference. In step #1 there is an example demonstrating how to set the adv data.

The GAP Advertising Data Types, as defined by Bluetooth Core specification can be found in gap_data_type_t structure in ble_gap.h.

The GAP_DATA_TYPE_MANUFACTURER_SPEC should be used for the Manufacturer Specific Data. Again you should follow the concept from the GAP_DATA_TYPE_LOCAL_NAME. Additionally the ble_gap_adv_data_set() should be used in order to set either the adv or scan response data.

Please see an example below :

static const uint8_t adv_data[] = { 0x04, GAP_DATA_TYPE_LOCAL_NAME , 'A','B', 'C', 0x05, GAP_DATA_TYPE_MANUFACTURER_SPEC, 0x00, 0x01,0x02, 0x03, }; static const uint8_t scan_resp[] = { 0x11, GAP_DATA_TYPE_UUID128_LIST, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0x00, 0x00, 0x00, 0x00, 0xAA, }; /* Set advertising data */ ble_gap_adv_data_set(sizeof(adv_data), adv_data, sizeof(scan_resp), scan_resp);

Thanks, PM_Dialog