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.

CC2640: How to get attDeviceName in simple_central project?

Part Number: CC2640

Hi TI expert,

As I know, simple_central can get adv(and scanRsp) data. Is it possible get attDeviceName in scan (like iOS APP)? thanks

  • Hi Yuhua,

    You can implement a scan for the device name. Please see how simple_central looks for a specific UUID in the incomming advertisments and scan responses in SimpleBLECentral_findSvcUuid().
  • Hi Marie,
    Thanks for your reply. I can get scan responses data in simple_central project, my question is can I get attDeviceName in simple_central project?
    From simple_peripheral project
    complete local name is "SimpleBLEPeripheral"
    attDeviceName is "Simple BLE Peripheral"(iOS use this name for display)

    thanks
  • Hi Yuhua,

    If you want to see the name of devices available you can use "devList[i].localName". For example if you want to print available devices you can do so by:

    case GAP_DEVICE_DISCOVERY_EVENT:
        {
          ...
    
          if (scanRes > 0)
          {
            uint8_t i;
            for(i = 0; i < scanRes; i++)
            {
              System_printf("Device %s\n\r", devList[i].localName);

    Does this answer your question?

    Regards,

    Klas

  • Hi TI expert,

    I change scanRsp and attDeviceName

    static uint8_t attDeviceName[GAP_DEVICE_NAME_LEN] = "12345";

    static uint8_t scanRspData[] =

    {

     // complete name

     0x06,   // length of this data

     GAP_ADTYPE_LOCAL_NAME_COMPLETE,

     'A',

     'B',

     'C',

     'D',

     'E',

    I get "ABCDE" in android and "12345" in iOS. From your suggestion, I get "ABCED" in central. My question is : Can I get "12345" in central? thanks