Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cc13x2x7_26x2x7] Change to 16Bit UUID for Matter BLE service #11721

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/platform/cc13x2_26x2/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ void BLEManagerImpl::ConfigureAdvertisements(void)
/* Default device name is CHIP-<DISCRIMINATOR> */
deviceDiscriminator = mDeviceIdInfo.GetDeviceDiscriminator();

localDeviceNameLen = strlen(CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX) + sizeof(deviceDiscriminator);
localDeviceNameLen = strlen(CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX) + CHIPOBLE_DEVICE_DESC_LENGTH;

memset(sInstance.mDeviceName, 0, GAP_DEVICE_NAME_LEN);
snprintf(sInstance.mDeviceName, GAP_DEVICE_NAME_LEN, "%s%04u", CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX,
Expand Down
2 changes: 2 additions & 0 deletions src/platform/cc13x2_26x2/BLEManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ using namespace chip::Ble;

#define CHIPOBLE_ADV_DATA_MAX_SIZE (GAP_DEVICE_NAME_LEN + CHIPOBLE_SCANRES_SIZE_NO_NAME)

#define CHIPOBLE_DEVICE_DESC_LENGTH (4)

// How often to read current current RPA (in ms)
#define READ_RPA_EVT_PERIOD 3000

Expand Down
21 changes: 12 additions & 9 deletions src/platform/cc13x2_26x2/chipOBleProfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
* GLOBAL VARIABLES
*/
// CHIPoBLE GATT Profile Service UUID
const uint8 chipOBleServUUID[ATT_UUID_SIZE] = { CHIPOBLEPROFILE_SERV_UUID_BASE128(CHIPOBLE_SERV_UUID) };
const uint8 chipOBleServUUID[ATT_BT_UUID_SIZE] = {
// 0xF6, 0xFF
LO_UINT16(CHIPOBLE_SERV_UUID), HI_UINT16(CHIPOBLE_SERV_UUID)
};

// CHIPoBLE Tx characteristic UUID
const uint8 chipOBleProfileTxCharUUID[ATT_UUID_SIZE] = {
Expand All @@ -56,27 +59,27 @@ const uint8 chipOBleProfileRxCharUUID[ATT_UUID_SIZE] = {
* Profile Attributes - variables
*/

// Remote Display Profile Service attribute
static const gattAttrType_t chipoBleProfile = { ATT_UUID_SIZE, chipOBleServUUID };
// CHIPoBLE GATT Profile Service attribute
static const gattAttrType_t chipoBleProfile = { ATT_BT_UUID_SIZE, chipOBleServUUID };

// ChipOBLE Tx Characteristic Properties
// CHIPoBLE Tx Characteristic Properties
static uint8_t chipOBleProfileTxCharProps = GATT_PROP_READ | GATT_PROP_NOTIFY;

// ChipOBLE Tx Characteristic Value
// CHIPoBLE Tx Characteristic Value
static uint8_t chipOBleProfileTxCharVal[CHIPOBLEPROFILE_CHAR_LEN] = { 0x00 };

// ChipOBLE Tx Characteristic User Description
// CHIPoBLE Tx Characteristic User Description
static uint8_t chipOBleProfileTxdDataUserDesp[CHIPOBLEPROFILE_MAX_DESCRIPTION_LEN] = "ChipOBLE Tx Char";

static gattCharCfg_t * chipOBleProfileTxStateDataConfig;

// ChipOBLE Rx Characteristic Properties
// CHIPoBLE Rx Characteristic Properties
static uint8_t chipOBleProfileRxCharProps = GATT_PROP_WRITE;

// ChipOBLE Rx Characteristic Value
// CHIPoBLE Rx Characteristic Value
static uint8_t chipOBleProfileRxCharVal[CHIPOBLEPROFILE_CHAR_LEN] = { 0x00 };

// ChipOBLE Rx Characteristic User Description
// CHIPoBLE Rx Characteristic User Description
static uint8_t chipOBleProfileRxdDataUserDesp[CHIPOBLEPROFILE_MAX_DESCRIPTION_LEN] = "ChipOBLE Rx Char";

/*********************************************************************
Expand Down