H
hgjkgk
Guest
Hi,
I am trying to write a generic BLE (Bluetooth Low Energy) Windows driver using "Bluetoothleapis.h". I am trying find out the (data)size of a charecteristics value which is write only. I was hoping to use "BluetoothGATTGetCharacteristicValue" with "CharacteristicValueDataSize andCharacteristicValue" (arg 3 & 4) set to NULL, hoping the size of the charecteristics will be returned in "*CharacteristicValueSizeRequired"(arg 5). But the function returns a "ERROR_BAD_ENVIRONMENT" error (0x8065000A).
Is there a better api or different approach to obtain the value lenght. I have read in some forums to create a buffer of 512bytes and after the first read the size can be determined. But I am hoping not to allocate the initial 512 bytes.
Thank you in advance for any suggestions.
Many Thanks,
Tony
Continue reading...
I am trying to write a generic BLE (Bluetooth Low Energy) Windows driver using "Bluetoothleapis.h". I am trying find out the (data)size of a charecteristics value which is write only. I was hoping to use "BluetoothGATTGetCharacteristicValue" with "CharacteristicValueDataSize andCharacteristicValue" (arg 3 & 4) set to NULL, hoping the size of the charecteristics will be returned in "*CharacteristicValueSizeRequired"(arg 5). But the function returns a "ERROR_BAD_ENVIRONMENT" error (0x8065000A).
Is there a better api or different approach to obtain the value lenght. I have read in some forums to create a buffer of 512bytes and after the first read the size can be determined. But I am hoping not to allocate the initial 512 bytes.
Thank you in advance for any suggestions.
Many Thanks,
Tony
Continue reading...