2022-08-01 01:17 AM
Hello all.
I am currently testing the STEVAL-IDB008V1M development version, I am using the BlueNRG-2 example code (BLE_SensorDemo_BlueMSapp) and there is manuf_data[26] in the function (Set_DeviceConnectable) in the sensor.c file. Can anyone explain what the contents of this array stand for, I have checked the PM0257 and UM2071 files but they do not explain
Here is the content of the (Set_DeviceConnectable) function
void Set_DeviceConnectable(void)
{
uint8_t ret;
uint8_t local_name[] = {AD_TYPE_COMPLETE_LOCAL_NAME,'B','l','u','e','N','R','G'};
uint8_t manuf_data[26] = {
2,0x0A,0x00 /* 0 dBm */, // Trasmission Power
8,0x09,'B','l','u','e','N','R','G', // Complete Name
13,0xFF,0x01, /*SKD version */
0x04, /* 0x04: BlueNRG1-1/2 eval kits */
0x00,
0xD4, /* ACC+Gyro 0xC0 | 0x04 Temp | 0x10 Pressure*/
0x00, /* */
0x00, /* */
0x00, /* BLE MAC start */
0x00,
0x00,
0x00,
0x00,
0x00, /* BLE MAC stop */
};
#if ST_OTA_FIRMWARE_UPGRADE_SUPPORT
hci_le_set_scan_response_data(18,BTLServiceUUID4Scan);
#else
hci_le_set_scan_response_data(0,NULL);
#endif /* ST_OTA_FIRMWARE_UPGRADE_SUPPORT */
PRINTF("Set General Discoverable Mode.\n");
ret = aci_gap_set_discoverable(ADV_IND,
(ADV_INTERVAL_MIN_MS*1000)/625,(ADV_INTERVAL_MAX_MS*1000)/625,
STATIC_RANDOM_ADDR, NO_WHITE_LIST_USE,
sizeof(local_name), local_name, 0, NULL, 0, 0);
aci_gap_update_adv_data(26, manuf_data);
if(ret != BLE_STATUS_SUCCESS)
{
PRINTF("aci_gap_set_discoverable() failed: 0x%02x\r\n",ret);
SdkEvalLedOn(LED3);
}
else
PRINTF("aci_gap_set_discoverable() --> SUCCESS\r\n");
}