Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Write DATA affect Read DATA



  • void MainWindow::BleServiceCharacteristicChanged(const QLowEnergyCharacteristic &c, const QByteArray &value)
    {

    Read_package_long = value.length();
    for (int i = 0; i <  value.length(); i++)
    {
       ReadBuffer[i] =value[i];
    }
    
    Read_count++;
    
    test = BufferCopyToU32_(ReadBuffer,100);
    

    // test = BufferCopyToU32(ReadBuffer,100);

    }

    void MainWindow::on_pushButton_send_clicked()
    {
    QByteArray array;

    for(int i=0;i<64;i++) array[i]=i;
    
    
    m_service->writeCharacteristic(hrChar_w,array, m_writeMode);
    

    }

    Before Write DATA PC can get DATA from bluetooth device, but after excute writing DATA
    a few times read DATA will be stop. How can avoid?



  • Who can help me?


Log in to reply