This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC2640R2: Change device name with HCI cmd

Part Number: LAUNCHXL-CC2640R2

Hello,

I have an MSP342 evaluation board and the LAUNCHXL-CC2640R2. The simple central project runs on the MSP board and the simple host project runs on the LAUNCHXL-CC2640R2 board. 
I would like to change the name of the BLE device via an HCI command. Unfortunately the name will not be changed. I track the communication with an nRF2 stick.

I use this HCI Command

GAP_UpdateAdvertisingData with opCode 0xFE07
adType, 0x00
dataLen,
advertData

HCI_StatusCodes_t setDeviceName(void)
{

       HCI_StatusCodes_t status;

       unsigned char pData[8]=

       {
           0x00,
           0x06,
           0x05,
           0x09,
           't',
           'e',
           's',
           't'
       };

      status = HCI_sendHCICommand( 0xFE07 , pData, 8);

     // Return Status
     return status;
}

This sends over the UART

0x01 0x07 0xFE 0x08 0x00 0x06 0x05 0x09 0x74 0x65 0x73 0x74

Thanks

  • Hi,

    To change the device name that is advertised by the CC2640R2, then the advertising data itself must be changed. To do this, you would need to leverage the advertData and scanRspData variables and update the relevant fields. Specifically, you could use the GAPRole_SetParameter() function. I recommend leveraging the Bluetooth Low Energy Scanning and Advertising. This lab contains information on changing the advertising parameters.

    Best Regards,

    Jan