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.

CC2640R2F: CC2640R2F: Generic Access Service: change Read/Write permission of device name

Part Number: CC2640R2F

Hello,

I am working on CC2640r2f ble5stack firmware with SDK version 4.40.00.10 

Our product has a special requirement. The device name in the generic access service needs to be only readable, but not writable.

How do I change the permission from read/write to just readable?

I already tried GGS_SetParameter with GGS_W_PERMIT_DEVICE_NAME_ATT but it only compiles with TESTMODES enabled and also did not work.

Is there a working solution for this requirement?

regards

Alex

  • Hi Alex,

    The call should be made like this: GGS_SetParameter(GGS_W_PERMIT_DEVICE_NAME_ATT , ..., 0);

    Could you please verify this is the case for you?

    Best regards

  • Hi Clement,

    thanks for the fast response. I am not sure if your suggestion is correct. GGS_SetParameter accepts a pointer as value parameter. Passing a null pointer to this function is undefined accoding to the documentation and might result in undefined behavior.

    Nethertheless I tried:

        GGS_SetParameter(GGS_W_PERMIT_DEVICE_NAME_ATT, sizeof(uint8_t), 0);

    and

        static const uint8_t ggs_w_permit_device_name_att = 0;
        GGS_SetParameter(GGS_W_PERMIT_DEVICE_NAME_ATT, sizeof(uint8_t), &ggs_w_permit_device_name_att);

    and

        static const uint8_t ggs_w_permit_device_name_att = GATT_PERMIT_READ;
        GGS_SetParameter(GGS_W_PERMIT_DEVICE_NAME_ATT, sizeof(uint8_t), &ggs_w_permit_device_name_att);

    None of these solutions made the device name characteristic read only.

    regards

    Alex

  • Hi,

    Could you please verify the value returned by the function for each case?

    Best regards,

  • Hi Clenemt,

    all variants return 0x02 = INVALIDPARAMETER.

    regards

    Alex

  • Hi Alexander,

    I notice I have missed a part of the information you have provided, apologize for this.

    In the current implementation of the code, the function GGS_SetParameter can be called with  GGS_W_PERMIT_DEVICE_NAME_ATT only when the symbol TESTMODES is defined.

    I do not have all the reasons behind this. I have asked internally and answer if I can.

    In other words, the only way to have this working is to keep the "TESTMODES" symbol defined. 

    I hope this will help,

    Best regards,

  • Hi Clement,

    I have TESTMODES enabled in stack_library and in the app. Otherwise it would not compile.

    Is there any other way to get the required behavior?

    Is it possible to create the Generic Access Service by the application code?

    regards

    Alexander

  • Hi Alexander,

    I have requested the assistance of our R&D team here. Due to holidays, they are out of the office until next week.

    Don't hesitate to ping the thread if you haven't got an answer by the end of next week.

    Thank you for your patience.

    Best regards,

  • Hi Clement,

    any news?

    regards

    Alexander

  • Hi Alexander,

    Thank you for the ping. I am sorry you did not get the support expected.

    I'll do my best to have some comments by the end of next week.

    Thank you for your patience.

    Best regards,

  • Hi,

    Here an update on this issue.

    Actually, the libraries we provide in the SDK do not allow to address the use case you are targeting. I am currently evaluating several options to provide a workaround. I will update you mid-week next week.

    Best regards,

  • Hi Clement,

    any update on this topic? Did you find a workaround?

    regards

    Alexander