Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Bluetooth BLE writeCharateristic problem.
Forum Updated to NodeBB v4.3 + New Features

Bluetooth BLE writeCharateristic problem.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 841 Views
  • 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.
  • G Offline
    G Offline
    Giorgio
    wrote on last edited by Giorgio
    #1

    Hi,
    I am trying to make a simple Pc software able to communicate with my Bluetooth BLE peripheral.

    My BLE peripheral includes a Custom Service (named as “Server_UART" with UUID 0003CDD0-0000-1000-8000-00805f9b0131 ) witch has two Characteristic:

    • Server_UART_Tx_data (UUID 0003CDD1-0000-1000-8000-00805f9b0131 ) with Notify Property and a Client Characteristic Configuration Descriptor to Notification enable
    • Server_UART_Rx_data (UUID 0003CDD2-0000-1000-8000-00805f9b0131 ) with
      WriteWithoutResponse Properties.

    Using heartlistener demo project (QT Demo project Page) as example, I realized a software able to scan, recognize and receive data from my Bluetooth BLE peripheral.
    Any data sent from my BLE peripheral, arrived to my PC application and I am able to catch them.

    Now, I want send data from my PC application to my bluetooth BLE peripheral.
    I tried with this code:

    void HeartRate::write(QByteArray data){

    // Take Charateristic UUID - 0003CDD2-0000-1000-8000-00805f9b0131
    const QLowEnergyCharacteristic hrChar = m_service->characteristic(
            m_service->characteristics().at(1).uuid());
    if (!hrChar.isValid()) {
        setMessage("Data not found.");
        return;
    }
    m_service->writeCharacteristic(hrChar,data);
    

    }

    Nothing Happens!
    No error signal is triggered by the service, no data arrived on BLE peripheral, nothing happens.

    My BLE peripheral works because I tried with another App and all worked well.

    Have you any idea?
    Is there another way to write data into a specific BLE Characteristic?

    My O.S. is Ubuntu 14.04 (32-bit) and Qt 5.5.

    Giorgio.

    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