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.

CCS/CC2650: Changing the name of the ble device

Part Number: CC2650


Tool/software: Code Composer Studio

Hello,

Can someone help me with this problem. I want to change the name of the ble device that is being displayed while it is scanning/discoverable on my mobile app. I ran the temperature broadcast example and have made changes based on my project requirements and it displays MSP432 Thermometer when it is in advertising mode. Is there a way I can change it to something else of my own choosing? 

Thank you

  • Magloire,

    You will need to change snpDeviceName and the scanRspData. Keep in mind that after you have scanned and connected to it with a phone, you may need to clear the ble cache on your phone/device you are using to see the new name as the old name will sometimes be stored in the cache and after you change it in the program, compile and download, it won't appear updated unless you clear the cache sometimes. This code is located in the temperature_sensor_broadcaster.c file

    /* SAP Parameters for opening serial port to SNP */
    static SAP_Params sapParams;
    static uint8_t snpDeviceName[] = { 'M', 'S', 'P', '4', '3', '2', ' ', 'T', 'h',
                                       'e', 'r', 'm', 'o', 'm', 'e', 't', 'e', 'r' };
    
    /* GAP - SCAN RSP data (max size = 31 bytes) */
    static uint8_t scanRspData[] = {
            /* Complete Name */
            19, /* Length of this data */
             SAP_GAP_ADTYPE_LOCAL_NAME_COMPLETE, 'M', 'S',
             'P', '4', '3', '2', ' ', 'T', 'h', 'e', 'r',
             'm', 'o', 'm', 'e', 't', 'e', 'r',
    
             /* connection interval range */
             0x05, /* length of this data */
             0x12, /* GAP_ADTYPE_SLAVE_CONN_INTERVAL_RANGE, */
             LO_UINT16(DEFAULT_DESIRED_MIN_CONN_INTERVAL),
             HI_UINT16(DEFAULT_DESIRED_MIN_CONN_INTERVAL),
             LO_UINT16(DEFAULT_DESIRED_MAX_CONN_INTERVAL),
             HI_UINT16(DEFAULT_DESIRED_MAX_CONN_INTERVAL),
    
             /* TX power level */
             0x02, /* Length of this data */
             0x0A, /* GAP_ADTYPE_POWER_LEVEL, */
             0
    };

  • Thank you!