logo elektroda
logo elektroda
X
logo elektroda

Raspberry Pi 3 + iNode T sensor - which UUID gives the temperature?

xnts 2406 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16702998
    xnts
    Level 10  
    I am looking for information on how to read the temperature from the iNode sensors.

    I have connected an iNode T sensor over BLE to a Raspberry Pi3 with no problems, use bluez and gatttool, however I have crashed on which 'handler' gives the temperature.

    I see the following:
    attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
    attr handle: 0x0008, end grp handle: 0x0008 uuid: 00001801-0000-1000-8000-00805f9b34fb
    attr handle: 0x0009, end grp handle: 0x0010 uuid: 0000cb4a-5efd-45be-b5be-158df376d8ad
    attr handle: 0x0011, end grp handle: 0x0017 uuid: a477e473-94df-4e22-a81b-cf8a6748898c
    attr handle: 0x0018, end grp handle: 0x001c uuid: d3d48370-bb04-11e3-a5e2-0800200c9a66
    attr handle: 0x001d, end grp handle: 0x0020 uuid: 9b4820ee-d114-4dab-a25e-cc0122b3d64d
    attr handle: 0x0021, end grp handle: 0x002b uuid: 0000180a-0000-1000-8000-00805f9b34fb
    attr handle: 0x002c, end grp handle: 0x002e uuid: 00001804-0000-1000-8000-00805f9b34fb
    attr handle: 0x002f, end grp handle: 0xffff uuid: 0000180f-0000-1000-8000-00805f9b34fb
    .
    According to https://www.bluetooth.com/specifications/gatt/services most of these describe the device, battery level and signal strength, the only suspect was
    1801 - generic attribute
    , however when I read the value from it I keep getting the same numbers:
    char-read-hnd 0x0008
    Characteristic value/descriptor: 01 18 
    .
    So back to the question - maybe someone has already worked through the topic and can point me in the right direction to read the temperature? :)
  • ADVERTISEMENT
  • Helpful post
    #2 16703211
    TvWidget
    Level 38  
    The temperature is sent in a broadcast frame. You do not need to connect to the device to read it. Take a look at what you got from the scan and compare with https://docs.google.com/document/d/1hcBpZ1RSgHRL6wu4SlTq2bvtKSL5_sFjXMu_HRyWZiQ/edit#
    These two bytes "rawTemperature" are the value read from the Si705x chip
    In the documentation for it you will find the formula how to convert it to degrees. I guess you just have to divide the measurement result by 16.

    However, you will need to establish a connection if you want to read the archive measurements from the temperature logger.
  • ADVERTISEMENT
  • #3 16703479
    xnts
    Level 10  
    Super, thank you! Just out of curiosity - how do you read the aforementioned archive measurements?
  • ADVERTISEMENT
  • #5 16704949
    xnts
    Level 10  
    Super, thank you!
ADVERTISEMENT