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.

CC2642R: How to make GapGattServer's Device name characteristic writable using BLE 5.x stack?

Part Number: CC2642R
Other Parts Discussed in Thread: CC2640,

Hello,

I have been working with a CC2640 and the BLE4.2 stack (simplelink_cc264r2_sdk_2_30_00_28) and adding the following lines allowed me to grant Write access to the Device name characterisitic:

  uint8 devNamePermission = GATT_PERMIT_READ | GATT_PERMIT_WRITE;
  GGS_SetParameter(GGS_W_PERMIT_DEVICE_NAME_ATT, sizeof(uint8_t), &devNamePermission);

Then I used the corresponding callback to save the new name in the flash and change the scan response. Now I'm trying to do the same with a CC2642R using the simplelink_cc13x2_26x2_sdk_3_20_00_68 and it doesn't work anymore.

First, the GGS_W_PERMIT_DEVICE_NAME_ATT parameter is not defined by default, I have first to define TESTMODES. Even doing so, characteristic is still read-only. Then I have tried to set GGS test mode to GGS_TESTMODE_W_PERMIT_DEVICE_NAME, but it is impossible: in gap.h are the test modes of the different parts (GAP, GATT, ATT, ...) defined, except for GGS.

Can you tell me what I have to do to grant write permission to this characteristic? As far as I know, Bluetooth specifications allow it (write permission is declared as Optional, but not Excluded).

Thank you for your help.

Regards.

  • Hi Jordi,

    Assigning an expert to follow-up.

  • Hello Jordi,

    This change was done on purpose. TESTMODES is only used for certification.

    What is the use case for being able to let the peer device change the device name?

  • Hello Eirik,

    The need comes from the possibility of having multiple devices of the same type in the same room, and the user can/has to configure each device. In my case, I'm developing a wireless light control system  consisting of motion detectors (controllers) and light actuators. It is not difficult to imagine that in a room could be more than one light actuator.

    The problem arises when you try to connect with an smartphone to one of these actuators, and you will see a list of many e.g. "LIGHT ACT". While this situation is unavoidable the first time, if later it is needed to do a change in the configuration, it would be less painful to locate the right device if user could change the device name to something more meaningful to him e.g. "ROOM1-ACT1", "ROOM1-ACT2", etc...

    I'm quite sure that this need affects other devices. Now I can think in beacons placed in a store or a museum, each having to be configured to provide information relative to the location they are placed. Even being walls in the area, is quite easy that in the smartphone list appear several "BEACON". Which one to choose? Of course, you can sort them by RSSI, but this trick doesn't work in many sistuations.

    I can understand that TESTMODES is only for certification. What I don't understand is why this feature has been assigned to "certification" purposes only.

  • Hello Jordi,

    Can you not solve this with using either a custom name service and/or changing the GAP_ADTYPE_LOCAL_NAME_COMPLETE in the advertisement? I believe a custom service implementation could also rewrite GGS_DEVICE_NAME_ATT locally.

  • Hello Eirik,

    Sure, the option of using a custom characterisitic has always been there. Indeed, I don't have an special interest in changing Device Name, it is just the way to update remotely the advertisement contents.

    But taking into account that Device Name is located in a service that is mandatory to include, why force developers to waste RAM and Flash in developing a feature that already exists, but are not allowed to use? Besides, Texas is breaking backwards compatibility, because this feature could be done in previous stacks. Maybe I should take this as a warning...

    I apreciate your help and your time, Eirik, but now I have to ask you if there is any possibility to change the stack or better I find another way to implement this feature.

  • Hello Jordi,

    Sorry, I don't know of an easier way than to implement this through a custom service, but I will take up the discussion internally without any promise of change as of now.

    BTW: The advertising payload does not reflect the GAPP GATT Device name. There has never been built in feature to automatically change the payload from the peer, only the device name value attribute is changed. This would need to be implemented some other way.

  • Hello Eirik,

    Ok, thank you.

    BTW: I have never said that the advertising payload reflects automatically the Device name characterisitic value. If you read with attention the first post, I wrote: "Then I use the corresponding callback to save the new name in the flash and change the scan response."

    Best regards.

  • Hello Eirik,

    Just for your information, please take a look at the Bluetooth LOCATION AND NAVIGATION PROFILE, v1.0, Page 10 of 32:

    " 3.1.1.3 Writable GAP Device Name characteristic
    The LN Sensor may support the write property for the Device Name characteristic in order to allow a Collector to write a device name to the LN Sensor. "

    This is just an example, maybe there are more services that rely on that functionality...

    Rgds.