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.

CC2650DK: How to make GAP GATT Attribute attDeviceName[GAP_DEVICE_NAME_LEN] dynamic?

Part Number: CC2650DK

Hello,

I'm working on multirole project on stack ble_sdk_2_02_01_18 and tirtos_cc13xx_cc26xx_2_20_01_08 cc2650 custom made sensortag devices.

I need to make the attDeviceName for IOS devices dynamic by adding variable.

For eg: 

attDeviceName[GAP_DEVICE_NAME_LEN]="Sensor01"

For next device : 

attDeviceName[GAP_DEVICE_NAME_LEN]="Sensor02"

I made this dynamic by using variables in multi_role init like

attDeviceName[0]="S";
attDeviceName[1]="e";
attDeviceName[2]="n";
attDeviceName[3]="s";
attDeviceName[4]="o";
attDeviceName[5]="r";

attDeviceName[6]=a+0x30;
attDeviceName[7]=b+0x30;

But by using this method the device name on IOS devices is not visible after we connect and disconnect the device, it shows sometimes garbage name or blank.

By using dynamic method I'm able to change in scanRspData and that is visible on android applications but with IOS i have problem

Please can anyone help with some suggestion on how to work this out.

Thanks.

  • Hello Abhishek,

    Did you confirm with the debugger that the attDeviceName[] contains a valid ASCII string? Normally you would use single quotes ' ' for individual chars and double quotes for a string.

    Note that iOS does not use the scanRspData after an initial connection has been made and the GAP Device Name has been read.

    Best wishes
  • Thanks for the reply JXS,

    Ya I should use single quotes for individual chars.

    But does the IOS for next connection read the scanRspData properly if we update the attDeviceName after sometime.

    Thanks.