Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Questions about Qt bluetooth notifications

Questions about Qt bluetooth notifications

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 186 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AndreaFurlani
    wrote on last edited by
    #1

    Hello everybody, I am developing a program to read some characteristics from a smart watch (heart rate, battery level, humidity and temperature).
    To doing this, I am following the heart rate game example. From this example I am able to get notifications about heart rate from a simulator on my smartphone, but for the other parameters I am not able to get the values.
    For example, for heart rate I'm doing this:

    if (uuid == QBluetoothUuid(QBluetoothUuid::HeartRate)) {
                const QLowEnergyCharacteristic hrChar = m_service->characteristic(QBluetoothUuid(QBluetoothUuid::HeartRateMeasurement));
                m_notificationDesc = hrChar.descriptor(QBluetoothUuid::ClientCharacteristicConfiguration);
                m_service->writeDescriptor(m_notificationDesc, QByteArray::fromHex("0100"));
    

    If i run my program, it finds the device and connect to it and I get correctly the new heart rate value everytime I push "notify" button on the simulator.

    For the other services I don't have the equivalent of HeartRateMeasurment.
    For the battery I tried to use BatteryService and then BatteryLevel as characteristic but my program does not read the values while standing still (but not blocked).
    Which services and characteristics should I use to get the same result I get with heart rate?
    Thank you very much for all the help.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved