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 Jan 5, 2022
1 parent 41ca9c8 commit e0475db
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 e0475db

Please sign in to comment.