0

I am trying to connect to a glucose sensor using the default bluetooth profile 0x1808. I have already connected to the device, discovered all services and characteristics but I can not read the Glucose Measurement 0x2A18

{
  "service":"1808",
  "characteristic":"2a18",
  "properties":["Notify"],
  "descriptors":[{
    "uuid":"2902"
  }]
},
{
  "service":"1808",
  "characteristic":"2a34",
  "properties":["Notify"],
  "descriptors":[{
    "uuid":"2902"
  }]
},
{
  "service":"1808",
  "characteristic":"2a51",
  "properties":["Read"]
},
{
  "service":"1808",
  "characteristic":"2a52",
  "properties":["Write","Indicate"],
  "descriptors":[{
    "uuid":"2902"
  }]
}

Can anyone help me how to read the value of 0x2a18? Do I have to write anything to 0x2a52 (Record Access Control Point) to gain access?

I am new to Bluetooth Connection. Thank you in advance.

Mario Shtika
  • 1,436
  • 19
  • 31

2 Answers2

4

In the Glucose Service (https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx?u=org.bluetooth.service.glucose.xml) there is 3 mandatory characteristics. One of them is Glucose Measurement where you get glucose reading notifications. In order to get notifications you have to request for them using Record Access Control Point characteristic. It allows you to get all glucose readings, only the latest, only the first, delete saved readings from the device etc.

For example,

  • Enable notifications on Glucose Measurement characteristic.
  • Enable indications on Record Access Control Point characteristic.
  • Send f.e. 0x0101 = Report stored records | All records

You should get N notifications on Glucose Measurement char. followed by an indication on RACP char. with value: 0x06000101 = Response for "Report stored records" | success. N may be 0 if no readings are saved on the glucose device.

Read the GLS documentation: https://www.bluetooth.org/en-us/specification/adopted-specifications -> GLS -> PDF for more information about Glucose Service and Record Access Control Point format.

Amalina Aziz
  • 204
  • 2
  • 18
0

The characteristic you are trying to 'read' is most probably NOT readable, but can be delivered through a 'Notification' or an 'Indication' callback method. You'd better check first if this Characteristic is 'Notifiable' and/or 'Indicatable' and then, set up the required callback events in your code: - write the DescriptorValue as being 'notifiable' and/or 'indicatable' - register a callback event for this characteristic.

adanteny
  • 181
  • 1
  • 5