pc-ble-driver-js question: Is it possible to read value of characteristic by his instance id ?

Hi all,
I am trying to get characteristics value by caching the characteristic instance id.
Currently I am using PC-BLE-DRIVER in our central(typeScript) to read characteristic from peripheral(nrf52833). 

Our flow:
1. getServices
   1.1 get service's characteristics
       1.1.1 get char value

and its very slow (reading proccess in central)..

My questions are:
1. Is there a way to get characteristics value by  characteristic instance id(without getServices/getAttributes)?
2. Maybe by using other platforms like nRF connect SDK, Zephyr we will be able to receive characteristic values by characteristic  instance id (without getServices/getAttributes)?
3. Is it possible to edit the driver source code to make it work?(to get characteristic value by characteristic  instance id) any suggestions?/examples?


Thanks,
Ben


Parents
  • Hi,

    If you don't know the attribute table layout on the device, then you must do the service discovery, in order to figure out at which attribute handle your characteristic is found.

    If you know the attribute handle for the characteristic value, then it should be possible to read the value directly, but it looks like the APIs in pc-ble-driver-js doesn't allow for that as is. I have asked the team responsible for pc-ble-driver-js for pointers, and will get back to you if I get a response from them on the matter.

    Regards,
    Terje

Reply
  • Hi,

    If you don't know the attribute table layout on the device, then you must do the service discovery, in order to figure out at which attribute handle your characteristic is found.

    If you know the attribute handle for the characteristic value, then it should be possible to read the value directly, but it looks like the APIs in pc-ble-driver-js doesn't allow for that as is. I have asked the team responsible for pc-ble-driver-js for pointers, and will get back to you if I get a response from them on the matter.

    Regards,
    Terje

Children
No Data
Related