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. How to send the Data from Qt App to Arduino by serial communication
Forum Updated to NodeBB v4.3 + New Features

How to send the Data from Qt App to Arduino by serial communication

Scheduled Pinned Locked Moved Solved General and Desktop
25 Posts 8 Posters 4.7k Views 3 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.
  • S Offline
    S Offline
    sankarapandiyan
    wrote on 16 Dec 2019, 07:48 last edited by sankarapandiyan
    #1

    I have tried to send the data from Qt app to Arduino and i want to display the Received data in the serial monitor (Arduin IDE)
    In Qt , i have develop some code to sending the data stored in the text file ,
    THIS IS THE CODE..

    void MainWindow::on_pushButton_clicked()
    {
        serial = new QSerialPort (this) ;
        serial->setPortName(ui->comboBox->currentText());
        serial->setBaudRate (QSerialPort::Baud9600);
        serial->setDataBits(QSerialPort::Data8);
        serial->setParity (QSerialPort::NoParity);
        serial->setStopBits (QSerialPort::OneStop);
        serial->setFlowControl(QSerialPort::NoFlowControl);
        serial->open(QIODevice::ReadWrite);
       connect(serial,SIGNAL(readyRead()),this, SLOT (serialReceived()));
    
       ui->progressBar->setValue(100);
    //    ui->receive->clear();
    }
    void MainWindow::checkAndSendData()
    {
        if(!m_lines.isEmpty()){
            QByteArray baToSend = m_lines.takeFirst().toUtf8();
            serial->write(baToSend);
            ui->aknowmnt->setText("Sent Message -->" +  QString(baToSend) + "\n");
        }
        else
        {
            ui->aknowmnt->setText("Receiving ");
        }
    }
    
    
    void MainWindow ::on_send_clicked()
    {
            line = ui->sender->toPlainText();
            QString txt1 = ui->receive->toPlainText();
            /*QString*/ txt3 = ui->aknowmnt->toPlainText();
             if(m_lines.isEmpty()){
                QFile inputFile(QString("/home/adx-soft1/Shankar/serial/myfile1.txt"));
                inputFile.open(QIODevice::ReadOnly);
                if (!inputFile.isOpen())
                    return;
    
                QTextStream stream(&inputFile);
                while(!stream.atEnd()){
                    QString line = stream.readLine();
                    m_lines.append(line + QString("\r\n"));
                }
            }
    
            checkAndSendData();
    }
    

    And i have develop the code in Aurdino IDE also ,

    int incomingByte = 0; // for incoming serial data
    
    void setup() {
      Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
    }
    
    void loop() {
      // reply only when you receive data:
      if (Serial.available() > 0) {
        // read the incoming byte:
        incomingByte = Serial.read();
    
        // say what you got:
        Serial.print("I received: ");
        Serial.println(incomingByte, DEC);
      }
    }
    

    If i Clicked the send button .. I am not able to see the data Received in Arduino . And i want to show the Received data in the Serial monitor , And i am new to this topic (ARDUINO-SERIAL-PORT-COMMUNICATION-QT)
    I think I need to modify the Aurdino IDE Code ,
    Please say me some suggestion to read the data from qt App in Arduino

    //Finally
    With the knowldge of @mrjj

    I have solved this issue ,
    𝐭𝐡𝐚𝐭 𝐢𝐭𝐬 𝐧𝐨𝐭 𝐡𝐨𝐰 𝐢𝐭 𝐰𝐨𝐫𝐤𝐬. 𝐈𝐓 𝐜𝐚𝐧 𝐣𝐮𝐬𝐭 𝐬𝐡𝐨𝐰 𝐰𝐡𝐚𝐭 𝐜𝐨𝐦𝐞𝐬 𝐟𝐫𝐨𝐦 𝐭𝐡𝐞 𝐀𝐑𝐃 𝐛𝐨𝐚𝐫𝐝. 𝐥𝐢𝐤𝐞 𝐚 𝐝𝐞𝐛𝐮𝐠𝐠𝐢𝐧𝐠 𝐜𝐨𝐧𝐬𝐨𝐥𝐞.

    𝐬𝐨 𝐢𝐟 𝐲𝐨𝐮 𝐨𝐩𝐞𝐧 𝐜𝐨𝐦𝐩𝐨𝐫𝐭 𝐰𝐢𝐭𝐡 𝐢𝐭 𝐟𝐢𝐫𝐬𝐭. 𝐭𝐡𝐞𝐧 𝐐𝐭 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 𝐰𝐢𝐥𝐥 𝐠𝐞𝐭 𝐩𝐞𝐫𝐦𝐢𝐬𝐢𝐬𝐨𝐧 𝐞𝐫𝐫𝐨𝐫

    𝐬𝐨 𝐢𝐭 𝐰𝐨𝐧𝐭 𝐬𝐡𝐨𝐰 𝐭𝐡𝐞𝐫𝐞 𝐰𝐡𝐚𝐭 𝐐𝐭 𝐬𝐞𝐧𝐝𝐬. 𝐨𝐧𝐥𝐲 𝐰𝐡𝐚𝐭 𝐛𝐨𝐚𝐫𝐝 𝐬𝐞𝐧𝐝𝐬

    𝐡𝐭𝐭𝐩𝐬://𝐰𝐰𝐰.𝐢𝐧𝐬𝐭𝐫𝐮𝐜𝐭𝐚𝐛𝐥𝐞𝐬.𝐜𝐨𝐦/𝐢𝐝/𝐇𝐎𝐖-𝐓𝐎-𝐮𝐬𝐞-𝐭𝐡𝐞-𝐀𝐑𝐃𝐔𝐈𝐍𝐎-𝐒𝐄𝐑𝐈𝐀𝐋-𝐌𝐎𝐍𝐈𝐓𝐎𝐑/

    𝐬𝐨 𝐮 𝐜𝐚𝐧𝐭 𝐮𝐬𝐞 𝐬𝐞𝐫𝐢𝐚𝐥 𝐦𝐨𝐧𝐢𝐭𝐨𝐫 𝐚𝐭 𝐬𝐚𝐦𝐞 𝐭𝐢𝐦𝐞 𝐚𝐬 𝐭𝐡𝐞 𝐐𝐭 𝐩𝐫𝐨𝐠𝐫𝐚𝐦

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 16 Dec 2019, 08:12 last edited by
      #2

      Hi
      You should add check to the

      serial->open(QIODevice::ReadWrite);

      to see if it fails.

      It might not open at all and hence nothing will be seen on the board.

      S 2 Replies Last reply 16 Dec 2019, 09:23
      2
      • M mrjj
        16 Dec 2019, 08:12

        Hi
        You should add check to the

        serial->open(QIODevice::ReadWrite);

        to see if it fails.

        It might not open at all and hence nothing will be seen on the board.

        S Offline
        S Offline
        sankarapandiyan
        wrote on 16 Dec 2019, 09:23 last edited by sankarapandiyan
        #3

        @mrjj Yes i checked in Qt App , by qDebug() its print in qt app and the data is getting in the function
        Edited code

        void MainWindow ::on_send_clicked()
        {
              serial->open(QIODevice::ReadWrite);
              qDebug () << baToSend ; // Here i have checked in Qt
                line = ui->sender->toPlainText();
                QString txt1 = ui->receive->toPlainText();
                /*QString*/ txt3 = ui->aknowmnt->toPlainText();
                 if(m_lines.isEmpty()){
                    QFile inputFile(QString("/home/adx-soft1/Shankar/serial/myfile1.txt"));
                    inputFile.open(QIODevice::ReadOnly);
                    if (!inputFile.isOpen())
                        return;
        
                    QTextStream stream(&inputFile);
                    while(!stream.atEnd()){
                        QString line = stream.readLine();
                        m_lines.append(line + QString("\r\n"));
                    }
                }
        
                checkAndSendData();
        }
        

        But In Arduino I did not get the data received .. @mrjj

        J 1 Reply Last reply 16 Dec 2019, 09:54
        0
        • S sankarapandiyan
          16 Dec 2019, 09:23

          @mrjj Yes i checked in Qt App , by qDebug() its print in qt app and the data is getting in the function
          Edited code

          void MainWindow ::on_send_clicked()
          {
                serial->open(QIODevice::ReadWrite);
                qDebug () << baToSend ; // Here i have checked in Qt
                  line = ui->sender->toPlainText();
                  QString txt1 = ui->receive->toPlainText();
                  /*QString*/ txt3 = ui->aknowmnt->toPlainText();
                   if(m_lines.isEmpty()){
                      QFile inputFile(QString("/home/adx-soft1/Shankar/serial/myfile1.txt"));
                      inputFile.open(QIODevice::ReadOnly);
                      if (!inputFile.isOpen())
                          return;
          
                      QTextStream stream(&inputFile);
                      while(!stream.atEnd()){
                          QString line = stream.readLine();
                          m_lines.append(line + QString("\r\n"));
                      }
                  }
          
                  checkAndSendData();
          }
          

          But In Arduino I did not get the data received .. @mrjj

          J Offline
          J Offline
          JonB
          wrote on 16 Dec 2019, 09:54 last edited by JonB
          #4

          @sankarapandiyan
          You still have not shown code which checks the result from serial->open(QIODevice::ReadWrite);. Could you please start by doing that at least. This further applies to other code of yours, e.g. serial->write(baToSend);. If you expect a solution to your issues you should start by introducing the necessary error checking code wherever possible.

          S 1 Reply Last reply 16 Dec 2019, 10:27
          1
          • Y Offline
            Y Offline
            Yunus
            wrote on 16 Dec 2019, 09:57 last edited by Yunus
            #5

            @sankarapandiyan hi, I also used arduino and Qt by serial communication. I just followed this video series steps This one was very helpful to me

            S 1 Reply Last reply 16 Dec 2019, 09:59
            3
            • Y Yunus
              16 Dec 2019, 09:57

              @sankarapandiyan hi, I also used arduino and Qt by serial communication. I just followed this video series steps This one was very helpful to me

              S Offline
              S Offline
              sankarapandiyan
              wrote on 16 Dec 2019, 09:59 last edited by
              #6

              @Yunus Hii i am not making the RGB LED Blinking , Here i am transfering the data from the text file from Qt to Arduino

              1 Reply Last reply
              0
              • Y Offline
                Y Offline
                Yunus
                wrote on 16 Dec 2019, 10:00 last edited by Yunus
                #7

                @sankarapandiyan He is also sending texts and numbers to Arduino :). He is controlling arduino by sending letters, and numbers. Thats why I thought maybe helpfull for you. You can also send data to arduino only by using C++. But using Qt makes it easy.

                S 1 Reply Last reply 16 Dec 2019, 10:41
                1
                • M mrjj
                  16 Dec 2019, 08:12

                  Hi
                  You should add check to the

                  serial->open(QIODevice::ReadWrite);

                  to see if it fails.

                  It might not open at all and hence nothing will be seen on the board.

                  S Offline
                  S Offline
                  sankarapandiyan
                  wrote on 16 Dec 2019, 10:24 last edited by
                  #8

                  @mrjj @JonB

                  alternate text

                  Yes both of you are right .. above image shows my output ,
                  if i clicked the send button first time ,
                  "" is printed like this
                  while clicked second time
                  line 5 is printed
                  while third time same is printed

                  i Dont know why its came like this

                  J 1 Reply Last reply 16 Dec 2019, 11:24
                  0
                  • J JonB
                    16 Dec 2019, 09:54

                    @sankarapandiyan
                    You still have not shown code which checks the result from serial->open(QIODevice::ReadWrite);. Could you please start by doing that at least. This further applies to other code of yours, e.g. serial->write(baToSend);. If you expect a solution to your issues you should start by introducing the necessary error checking code wherever possible.

                    S Offline
                    S Offline
                    sankarapandiyan
                    wrote on 16 Dec 2019, 10:27 last edited by
                    #9

                    @JonB

                    @JonB said in How to send the Data from Qt App to Arduino by serial communication:

                    You still have not shown code which checks the result from serial->open(QIODevice::ReadWrite);.

                    YEs i have shown in above reply

                    1 Reply Last reply
                    0
                    • Y Yunus
                      16 Dec 2019, 10:00

                      @sankarapandiyan He is also sending texts and numbers to Arduino :). He is controlling arduino by sending letters, and numbers. Thats why I thought maybe helpfull for you. You can also send data to arduino only by using C++. But using Qt makes it easy.

                      S Offline
                      S Offline
                      sankarapandiyan
                      wrote on 16 Dec 2019, 10:41 last edited by
                      #10

                      @Yunus Sure thanks a lot i will refer

                      1 Reply Last reply
                      0
                      • S sankarapandiyan
                        16 Dec 2019, 10:24

                        @mrjj @JonB

                        alternate text

                        Yes both of you are right .. above image shows my output ,
                        if i clicked the send button first time ,
                        "" is printed like this
                        while clicked second time
                        line 5 is printed
                        while third time same is printed

                        i Dont know why its came like this

                        J Offline
                        J Offline
                        JonB
                        wrote on 16 Dec 2019, 11:24 last edited by
                        #11

                        @sankarapandiyan
                        You cannot expect people to help if you show output which simply does not correspond to anywhere in the code you have shown, can you? For example, you have a screenshot showing output where the code you have shown simply does not include any such output lines....

                        S O 2 Replies Last reply 16 Dec 2019, 11:47
                        2
                        • J JonB
                          16 Dec 2019, 11:24

                          @sankarapandiyan
                          You cannot expect people to help if you show output which simply does not correspond to anywhere in the code you have shown, can you? For example, you have a screenshot showing output where the code you have shown simply does not include any such output lines....

                          S Offline
                          S Offline
                          sankarapandiyan
                          wrote on 16 Dec 2019, 11:47 last edited by
                          #12

                          @JonB ok fine.. thanks

                          1 Reply Last reply
                          0
                          • J JonB
                            16 Dec 2019, 11:24

                            @sankarapandiyan
                            You cannot expect people to help if you show output which simply does not correspond to anywhere in the code you have shown, can you? For example, you have a screenshot showing output where the code you have shown simply does not include any such output lines....

                            O Offline
                            O Offline
                            ODБOï
                            wrote on 16 Dec 2019, 13:07 last edited by ODБOï
                            #13

                            @JonB said in How to send the Data from Qt App to Arduino by serial communication:

                            you have a screenshot showing output where the code you have shown simply does not include any such output lines..

                            hi, the 2nd line in his on_send_clicked method doas qDebbug() << "serial opened-"

                            @sankarapandiyan you should put it in a if statement to call qDebug only if open() returns true

                            if(serial->open(QIODevice::ReadWrite))
                            
                            J S 2 Replies Last reply 16 Dec 2019, 13:20
                            0
                            • O ODБOï
                              16 Dec 2019, 13:07

                              @JonB said in How to send the Data from Qt App to Arduino by serial communication:

                              you have a screenshot showing output where the code you have shown simply does not include any such output lines..

                              hi, the 2nd line in his on_send_clicked method doas qDebbug() << "serial opened-"

                              @sankarapandiyan you should put it in a if statement to call qDebug only if open() returns true

                              if(serial->open(QIODevice::ReadWrite))
                              
                              J Offline
                              J Offline
                              JonB
                              wrote on 16 Dec 2019, 13:20 last edited by JonB
                              #14

                              @LeLev said in How to send the Data from Qt App to Arduino by serial communication:

                              hi, the 2nd line ot his on_send_clicked method doas qDebbug() << "serial opened-"

                              You are right. I searched the whole page for serial opened (or even seral opened), I have only just seen it is in a screenshot. However, I still do not see where the baToSend used there is declared or set, I only see it elsewhere (local variable inside on_send_clicked()). Nor do I know what it is the text file read in. So it's still pretty hard to know what is going on....

                              S 3 Replies Last reply 16 Dec 2019, 15:07
                              0
                              • J JonB
                                16 Dec 2019, 13:20

                                @LeLev said in How to send the Data from Qt App to Arduino by serial communication:

                                hi, the 2nd line ot his on_send_clicked method doas qDebbug() << "serial opened-"

                                You are right. I searched the whole page for serial opened (or even seral opened), I have only just seen it is in a screenshot. However, I still do not see where the baToSend used there is declared or set, I only see it elsewhere (local variable inside on_send_clicked()). Nor do I know what it is the text file read in. So it's still pretty hard to know what is going on....

                                S Offline
                                S Offline
                                sankarapandiyan
                                wrote on 16 Dec 2019, 15:07 last edited by
                                #15

                                @JonB In text file i have 5 lines ,

                                line 1
                                line 2
                                line 3
                                line 4
                                line 5

                                i want to print these five line in arduino serial monitor , While i clicking send button

                                1 Reply Last reply
                                0
                                • J JonB
                                  16 Dec 2019, 13:20

                                  @LeLev said in How to send the Data from Qt App to Arduino by serial communication:

                                  hi, the 2nd line ot his on_send_clicked method doas qDebbug() << "serial opened-"

                                  You are right. I searched the whole page for serial opened (or even seral opened), I have only just seen it is in a screenshot. However, I still do not see where the baToSend used there is declared or set, I only see it elsewhere (local variable inside on_send_clicked()). Nor do I know what it is the text file read in. So it's still pretty hard to know what is going on....

                                  S Offline
                                  S Offline
                                  sankarapandiyan
                                  wrote on 16 Dec 2019, 15:54 last edited by sankarapandiyan
                                  #16

                                  @JonB Tried to Edit my code in correct form

                                  #include "mainwindow.h"
                                  #include "ui_mainwindow.h"
                                  #include <QList>
                                  #include <QComboBox>
                                  #include <QString>
                                  #include <QTextEdit>
                                  #include <QTime>
                                  #include <QDebug>
                                  #include <QtSerialPort/QSerialPortInfo>
                                  #include <QtSerialPort>
                                  #include <QFile>
                                  #include <QList>
                                  #include <QSerialPort>
                                  
                                  MainWindow::MainWindow(QWidget *parent)
                                      : QMainWindow(parent)
                                      , ui(new Ui::MainWindow)
                                  {
                                  
                                        ui->setupUi(this);
                                        QString filename1="/home/adx-soft1/Shankar/serial/myfile1.txt";
                                        QFile file(filename1);
                                        if(!file.exists()){
                                            qDebug() << "NO FILE "<<filename1;
                                        }else{
                                            qDebug() << filename1<<" ...";
                                        }
                                        QString line1;
                                        ui->sender->clear();
                                        if (file.open(QIODevice::ReadOnly | QIODevice::Text)){ ui->sender->setText(file.readAll()); }
                                  
                                        QList<QSerialPortInfo> list;
                                        list = QSerialPortInfo::availablePorts();
                                  
                                        for (int i= 0; i < list.length(); i++)
                                        {
                                          ui->comboBox->addItem(list[i].portName());
                                  
                                        }
                                  }
                                  
                                  MainWindow::~MainWindow()
                                  {
                                      serial->close();
                                      delete ui;
                                  }
                                  
                                  void MainWindow::on_pushButton_clicked()
                                  {
                                      serial = new QSerialPort(this);
                                      serial->setPortName(ui->comboBox->currentText());
                                      serial->setBaudRate(QSerialPort::Baud9600);
                                      serial->setDataBits(QSerialPort::Data8);
                                      serial->setParity(QSerialPort::NoParity);
                                      serial->setStopBits(QSerialPort::OneStop);
                                      serial->setFlowControl(QSerialPort::NoFlowControl);
                                      serial->open(QIODevice::ReadWrite);
                                      connect(serial, &QSerialPort::readyRead, this, &MainWindow::serialReceived);
                                  
                                     ui->progressBar->setValue(100);
                                  //    ui->receive->clear();
                                  }
                                  void MainWindow::checkAndSendData()
                                  {
                                      if(!m_lines.isEmpty()){
                                          baToSend = m_lines.takeFirst().toUtf8();
                                          serial->write(baToSend);
                                          //qDebug() << baToSend << "serial Writed---" ;
                                  
                                          ui->aknowmnt->setText("Sent Message -->" +  QString(baToSend) + "\n");
                                      }
                                      else
                                      {
                                          ui->aknowmnt->setText("Receiving ");
                                      }
                                  }
                                  
                                  
                                  void MainWindow ::on_send_clicked()
                                  {
                                        //serial->open(QIODevice::ReadWrite);
                                        qDebug () << baToSend << "seral opened ----" ;
                                  
                                        qDebug() << "Serial: " << serial->isOpen();
                                        qDebug() << "Error: " << serial->error() << " | " << serial->errorString();
                                  
                                        line = ui->sender->toPlainText();
                                          QString txt1 = ui->receive->toPlainText();
                                          /*QString*/ txt3 = ui->aknowmnt->toPlainText();
                                  
                                          qDebug() << "m_lines: " << m_lines;
                                  
                                           if(m_lines.isEmpty()){
                                              QFile inputFile(QString("/home/adx-soft1/Shankar/serial/myfile1.txt"));
                                              inputFile.open(QIODevice::ReadOnly);
                                  
                                              if (!inputFile.isOpen()) {
                                                  return;
                                              }
                                  
                                              QTextStream stream(&inputFile);
                                  
                                              while(!stream.atEnd()) {
                                                  QString strline = stream.readLine();
                                                  m_lines.append(strline + QString("\r\n"));
                                  
                                                  qDebug() << "m_lines: " << m_lines;
                                              }
                                          }
                                          checkAndSendData();
                                  }
                                  
                                  
                                  void MainWindow::serialReceived()
                                  {
                                  
                                      qDebug() << "serial->readAll().trimmed(): " << serial->readAll().trimmed();
                                  
                                      QString glen = serial->readAll().trimmed();
                                  
                                      qDebug() << "glen: " << glen;
                                  
                                       if (glen.length() > 0) {
                                           ui->receive->append(glen);
                                          /*QString*/ //line = ui->receive->toPlainText();
                                          //ui->receive->setText(ui->receive->toPlainText() + line + "\n");
                                          //ui->receive->setText(line + "\r\n" + glen + "\r\n");
                                          //line = txt3;
                                      }
                                      checkAndSendData();
                                  }
                                  

                                  But i did not get the data received in arduino side

                                  LematL 1 Reply Last reply 18 Dec 2019, 08:41
                                  0
                                  • O ODБOï
                                    16 Dec 2019, 13:07

                                    @JonB said in How to send the Data from Qt App to Arduino by serial communication:

                                    you have a screenshot showing output where the code you have shown simply does not include any such output lines..

                                    hi, the 2nd line in his on_send_clicked method doas qDebbug() << "serial opened-"

                                    @sankarapandiyan you should put it in a if statement to call qDebug only if open() returns true

                                    if(serial->open(QIODevice::ReadWrite))
                                    
                                    S Offline
                                    S Offline
                                    sankarapandiyan
                                    wrote on 16 Dec 2019, 15:56 last edited by
                                    #17

                                    @LeLev ok fine i will correct it

                                    1 Reply Last reply
                                    0
                                    • J JonB
                                      16 Dec 2019, 13:20

                                      @LeLev said in How to send the Data from Qt App to Arduino by serial communication:

                                      hi, the 2nd line ot his on_send_clicked method doas qDebbug() << "serial opened-"

                                      You are right. I searched the whole page for serial opened (or even seral opened), I have only just seen it is in a screenshot. However, I still do not see where the baToSend used there is declared or set, I only see it elsewhere (local variable inside on_send_clicked()). Nor do I know what it is the text file read in. So it's still pretty hard to know what is going on....

                                      S Offline
                                      S Offline
                                      sankarapandiyan
                                      wrote on 17 Dec 2019, 07:39 last edited by
                                      #18

                                      @JonB @LeLev @mrjj cant open port : QSerialPort::SerialPortError(PermissionError)
                                      I get the error like this ..

                                      Thanks

                                      jsulmJ 1 Reply Last reply 17 Dec 2019, 07:45
                                      0
                                      • S sankarapandiyan
                                        17 Dec 2019, 07:39

                                        @JonB @LeLev @mrjj cant open port : QSerialPort::SerialPortError(PermissionError)
                                        I get the error like this ..

                                        Thanks

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on 17 Dec 2019, 07:45 last edited by
                                        #19

                                        @sankarapandiyan said in How to send the Data from Qt App to Arduino by serial communication:

                                        PermissionError

                                        Make sure your user has needed access rights for the serial port device file.
                                        See for example https://askubuntu.com/questions/58119/changing-permissions-on-serial-port

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        S 1 Reply Last reply 17 Dec 2019, 08:02
                                        2
                                        • jsulmJ jsulm
                                          17 Dec 2019, 07:45

                                          @sankarapandiyan said in How to send the Data from Qt App to Arduino by serial communication:

                                          PermissionError

                                          Make sure your user has needed access rights for the serial port device file.
                                          See for example https://askubuntu.com/questions/58119/changing-permissions-on-serial-port

                                          S Offline
                                          S Offline
                                          sankarapandiyan
                                          wrote on 17 Dec 2019, 08:02 last edited by
                                          #20

                                          @jsulm Is it possible to open the port in both Qt app and Arduino in a same OS ..
                                          Here if i open the port in Qt means , in Arduino ,i got a error the port is changed or not found

                                          while if i open the port in Arduino first means , I got a error message in Qt as (PERMISSION ERROR)

                                          I am Stucked here for a day, I am very new to this arduino topic , So give me some idea abouth this .

                                          Thanks in advance .

                                          jsulmJ JKSHJ 2 Replies Last reply 17 Dec 2019, 09:05
                                          0

                                          8/25

                                          16 Dec 2019, 10:24

                                          topic:navigator.unread, 17
                                          • Login

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