Tool/software:
Hello, I have a question about the BLE peripheral example.
This is the advertising data currently being used as default.
static uint8 advertData[32] =
{
8, // length of this data
GAP_ADTYPE_LOCAL_NAME_COMPLETE,
'G','F','M','-','4','0','0',
};
// Scan Response Data
static uint8_t scanRspData[] =
{
0x02, // length of this data
GAP_ADTYPE_FLAGS,
GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED,
// 25 byte beacon advertisement data
// Preamble: Company ID - 0x000D for TI, refer to www.bluetooth.org/.../company-identifiers
// Data type: Beacon (0x02)
// Data length: 0x15
// UUID: 00000000-0000-0000-0000-000000000000 (null beacon)
// Major: 1 (0x0001)
// Minor: 1 (0x0001)
// Measured Power: -59 (0xc5)
0x15, // length of this data including the data type byte
GAP_ADTYPE_MANUFACTURER_SPECIFIC, // manufacturer specific adv data type
0x4c, // Company ID - Fixed --> 0x4c (IOS)
0x00, // Company ID - Fixed
0x02, // Data Type - Fixed
0x15, // Data Length - Fixed
0x00, // UUID - Variable based on different use cases/applications
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x01, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID 24
0x00, // UUID
0x00, // UUID
0x00, // UUID
};
I am currently inquiring about a way to send advertising data all at once to the adverdata section without using the existing scanRspData via the AT command.
This is the current code status.
else if (strstr(uartDataBuffer, "AT+CMOD2") != NULL) {
memset(scanRspData, 0, sizeof(scanRspData));
memset(advertData, 0, sizeof(advertData));
advertData[0] = 0x02;
advertData[1] = GAP_ADTYPE_FLAGS;
advertData[2] = GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED;
advertData[3] = 0x1A;
advertData[4] = GAP_ADTYPE_MANUFACTURER_SPECIFIC;
advertData[5] = 0x4c;
advertData[6] = 0x00;
advertData[7] = 0x02;
advertData[8] = 0x15;
advertData[9] = 0x00;
advertData[10] = 0x08;
advertData[11] = 0x00;
advertData[12] = 0x00;
advertData[13] = 0x00;
advertData[14] = 0x00;
advertData[15] = 0x00;
advertData[16] = 0x00;
advertData[17] = 0x20;
advertData[18] = 0x00;
advertData[19] = 0x00;
advertData[20] = 0x30;
advertData[21] = 0x14;
advertData[22] = 0x09;
advertData[23] = 0x38;
advertData[24] = 0x00;
advertData[25] = 0x00;
advertData[26] = 0x48;
advertData[27] = 0x00;
advertData[28] = 0x40;
advertData[29] = 0x00;
advertData[30] = 0x00;
uint8_t advertDataLen = 31;
//GapAdv_disable(advHandleLegacy);
GapAdv_loadByHandle(advHandleLegacy, GAP_ADV_DATA_TYPE_ADV, advertDataLen, advertData);
//GapAdv_loadByHandle(advHandleLegacy, GAP_ADV_DATA_TYPE_SCAN_RSP, 0, NULL);
GapAdv_enable(advHandleLegacy, GAP_ADV_ENABLE_OPTIONS_USE_MAX, 0);
ble_mode_state = 2;
uart_printf("OC\r\n");
advEnableFlag = 0;
uartCloseFlag = 1;
Util_startClock(&evtAdvEnClock);
}
When the code is executed, I confirmed that data was entered into the array as shown in the capture.
However, when checking data with the nrfconnect app, only up to 0x020104 is confirmed and the remaining data is not confirmed. Is there a solution?
