This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is a GATT server application notified of a client read?

I looked at the following question

nrRF2 GATT attribute read callback

and it does not quite answer what I want to know.

What I need to know is do I get signaled by the nrRF2* BLE hardware when a client attempts to read a characteristic such that I can populate that characteristic with some data that I want the client to receive as a result of the read?  For example, the high level Android server has such an event - but the Renesas RL78 BLE chip does not.

The original question had a yes answer with an 'authorized' read. I am not sure if 'authorized' is a BLE thing or a Nordic thing in this context. I do not want to have to configure the read characteristic to be secured or anything special. The characteristic should only need read permission.

I was looking though the SoftDevice API and did not see any GATT event for a generic client read.  I did see the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event noted above but I do not really understand that. To be fair, I have just started looking at the nrRF2* and the pc-ble-driver and supporting systems as a possible use for a BLE client test suite (thus the need to have the application run on the PC using the BLE functionality on the nrRF2*). However, it is critical that the application get signaled that a client attempted to read any readable characteristic so its value can be set (and 'sent') to the client.

I would like to know if it is possible to get evented of a generic read (I assumed it was) because if it is not, all I will lose at this time is the $30 I spent on getting a few test dongles which have not yet arrived.

Parents
  • I was looking at some other API documentation of SoftDevice (can't find it now). From the wording there I got the impression that the word 'authorize' in the event name had nothing to do with the security settings meaning of the word. It looked like it simply meant the characteristic had read permissions. 

    Thus I have much more confidence that my peripheral application will be notified when the client tries to read ANY characteristic that has read permissions regardless of its security settings. The application can then set the characteristic value that the client will receive in the read response. Please vindicate that this is true!

    A re-read of the SoftDevice API elsewhere sounds like this event is just for the peripheral to set the permissions of the characteristic.

    Now it strongly looks like my peripheral application will NOT be signaled of a client read.

Reply
  • I was looking at some other API documentation of SoftDevice (can't find it now). From the wording there I got the impression that the word 'authorize' in the event name had nothing to do with the security settings meaning of the word. It looked like it simply meant the characteristic had read permissions. 

    Thus I have much more confidence that my peripheral application will be notified when the client tries to read ANY characteristic that has read permissions regardless of its security settings. The application can then set the characteristic value that the client will receive in the read response. Please vindicate that this is true!

    A re-read of the SoftDevice API elsewhere sounds like this event is just for the peripheral to set the permissions of the characteristic.

    Now it strongly looks like my peripheral application will NOT be signaled of a client read.

Children
No Data
Related