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

Failed to modify the Bluetooth name of matter (CON-1583) #1312

Open
MaplestoryAlen opened this issue Mar 5, 2025 · 1 comment
Open

Failed to modify the Bluetooth name of matter (CON-1583) #1312

MaplestoryAlen opened this issue Mar 5, 2025 · 1 comment

Comments

@MaplestoryAlen
Copy link

I want to change the Bluetooth name, but I have tried many ways and cannot change the Bluetooth name,
May I ask how to allow users to customize BLE names? Additionally, I noticed that there is a 16 byte limit. Does this 16 byte limit require subtracting 4 bytes from the description code?

Method 1:

Change and set in menuconfig

Image

Method 2:

void SetBLEDeviceName(void)
{
const char *deviceName = "Xz_NC";
chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(deviceName);
}

Image

Method 3:

#define CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX “81MtCn01”

@github-actions github-actions bot changed the title Failed to modify the Bluetooth name of matter Failed to modify the Bluetooth name of matter (CON-1583) Mar 5, 2025
@Jerry-ESP
Copy link
Contributor

Do you want to change the BLE advertisement name, you can add as below in the file :

    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++] = 0x04;                                                                // length
    advData[index++] = 0x9;                                            // AD type : flags
    advData[index++] = 'T';                                                 // AD value
    advData[index++] = 'S';                                                 // AD value
    advData[index++] = 'T';                                                 // AD value
    advData[index++] = kServiceDataTypeSize + sizeof(ESP32ChipServiceData);                 // 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

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants