none
BluetoothGATTSetDescriptorValue returns General access denied error RRS feed

  • Question

  • Wondering what it takes to set values using the Bluetooth Low Energy Functions. Anytime I try and set a value is in the following, BluetoothGATTSetDescriptorValue returns General access denied error. Here I am trying to enable event notifications for the simple keys service that comes with the TI 2540 kit using the ClientCharacteristicConfiguration descriptor (hard coded for ehis example)


    USHORTclientConfigDescIndex = 0;

    BTH_LE_GATT_DESCRIPTOR_VALUEclientConfigValue;

     

    ZeroMemory(&clientConfigValue, sizeof(clientConfigValue));

    clientConfigValue.DescriptorType =

    ClientCharacteristicConfiguration;

    clientConfigValue.ClientCharacteristicConfiguration.IsSubscribeToNotification =

    TRUE;

    HRESULThr = BluetoothGATTSetDescriptorValue(m_hGattServiceHandle,&m_pDescriptorBuffer[clientConfigDescIndex],&clientConfigValue,BLUETOOTH_GATT_FLAG_NONE);



    oregonduckman

    Wednesday, October 16, 2013 9:04 PM

Answers

All replies

  • how did you open m_hGattServiceHandle? with what access rights?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, October 16, 2013 10:11 PM
  • Was GENERIC_READ, added GENERIC_WRITE and now everything is kosher, thanks for the tip...

    oregonduckman

    Wednesday, October 16, 2013 10:26 PM