Hi,
I am having problems reading a BLE characteristics. I cannot clearly find any examples or documentation that explain how this is done.
So far I have tried these:
GATTC_READ_CMD_IND
GATTC_READ_IND
GATTC_READ_CMD
and the callback functions are never called. It is unclear to me which one I need
Can you help?
Thanks
Hi I read here:
http://support.dialog-semiconductor.com/read-data-sample128-profile
That GATTC_READ_CMD_IND is only supported on the DA14581 and we are using DA14580.
Is this correct? This is important as we need to do reads and need to know if we are using the correct chip or not.
Hi,
It is correct that only the DA14581 supports the read indication callback. This shouldn't be an issue, however. The stack and the GATT database are tied together so that any read from a client is responded to directly from the database. In other words, as long as your application stores the characteristic value in the database, a remote client will be able to read it. It is actually more energy efficient to handle read actions this way, since it does not involve the application layer. The downside is that you are unable to create the characteristic value as aresultof a read action. Most data is in fact generated completely asynchronously from the Bluetooth activity, and using the database as interface makes for more efficient code.
I hope this helps shed some light on the issue.
Hi,
The problem is that our host (a tablet) needs to read a block 128 bytes using this characteristic. I need to know the host wants to read from it so I can let it read the next 20 bytes
Do you know of any other way that my host can read 128 bytes from a characteristic? We are using a format that works and was written some time ago so we are very reluctant to change how it works on the host side.
你想改变你的数据怪罪别人r path, that is use "notification".
The problem is our host software was written already and works, so we don't want to change anything to much. In the end I got around it by writting to another characteristic which told the device which index of the datablock to write to the database so the next read would work ok...its still frustrating to have to do workarounds because basic functionality is missing