Skip to content

Commit

Permalink
[BLE] Revise adv data structure (#13319)
Browse files Browse the repository at this point in the history
Fix BLE can't connect after #13206
  • Loading branch information
pankore authored and pull[bot] committed Dec 14, 2023
1 parent ef464a9 commit 1381882
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/platform/Ameba/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,11 +599,11 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void)

/**************** Prepare advertising data *******************************************/
memset(advData, 0, sizeof(advData));
advData[index++] = 0x02; // length
advData[index++] = CHIP_ADV_DATA_TYPE_FLAGS; // AD type : flags
advData[index++] = CHIP_ADV_DATA_FLAGS; // AD value
advData[index++] = 0x0A; // length
advData[index++] = 0x16; // AD type: (Service Data - 16-bit UUID)
advData[index++] = 0x02; // length
advData[index++] = CHIP_ADV_DATA_TYPE_FLAGS; // AD type : flags
advData[index++] = CHIP_ADV_DATA_FLAGS; // AD value
advData[index++] = static_cast<uint8_t>(sizeof(deviceIdInfo) + CHIP_ADV_SHORT_UUID_LEN + 1); // length
advData[index++] = CHIP_ADV_DATA_TYPE_SERVICE_DATA; // AD type: (Service Data - 16-bit UUID)
advData[index++] = static_cast<uint8_t>(ShortUUID_CHIPoBLEService.value & 0xFF); // AD value
advData[index++] = static_cast<uint8_t>((ShortUUID_CHIPoBLEService.value >> 8) & 0xFF); // AD value

Expand Down

0 comments on commit 1381882

Please sign in to comment.