Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. serial port
    Log in to post

    • UNSOLVED Run test as superuser inside QtCreator
      Tools • serial port test automation root permission • • CristianoNarcisiVidex  

      2
      0
      Votes
      2
      Posts
      126
      Views

      @CristianoNarcisiVidex said in Run test as superuser inside QtCreator: because of my OS is Ubuntu, i need the super user permission for opening that port That's wrong. You simply have to add your user to the group which has access to the device file of your serial port. See https://askubuntu.com/questions/58119/changing-permissions-on-serial-port "The issue with the permissions for /dev/ttyACM0 can be permanantly solved by adding yourself to the dialout group. You can do this with: sudo usermod -a -G dialout $USER Logout and then log back in for the group changes to take effect. "
    • UNSOLVED GUI Freeze on Multi-Thread Application
      General and Desktop • database serial port threading freeze multi-thread • • mvsri  

      5
      0
      Votes
      5
      Posts
      333
      Views

      Hi, What kind of popup are triggering the freeze ?
    • UNSOLVED QT Serial Port
      General and Desktop • c++ qt serial port command line timer thread • • ADR_PT  

      3
      0
      Votes
      3
      Posts
      189
      Views

      @ADR_PT you may want to start using QSerialPort the asynchronous (non-blocking) approach, by using signals & slots. Take a look at the serial terminal example
    • UNSOLVED Open the selected port
      General and Desktop • qt5 combobox serial port • • deleted286  

      5
      0
      Votes
      5
      Posts
      234
      Views

      @suslucoder said in Open the selected port: I solved it, you can delete my post. No, the solved posts don't get deleted. They remain for the benefit of other forum users having same/similar issues. It's a community driven approach, opposite to a "my problem only" driven approach
    • UNSOLVED UI doesnt refresh correctly
      General and Desktop • qt5 serial port user interface • • deleted286  

      20
      0
      Votes
      20
      Posts
      556
      Views

      @suslucoder ok im not sure what s does. Anyway, could you try (in on_Serial_Read) memset(dizi, 0, 14); memcpy(dizi, data.constData(), data.size()); in place ot the line memcpy(dizi, data.constData(), 14); and tell if it still stops at 15 ?
    • UNSOLVED Converting binary data to String
      General and Desktop • qt5 serial port binary format • • deleted286  

      12
      0
      Votes
      12
      Posts
      991
      Views

      And that binary contains just that ?
    • UNSOLVED Open the port which selected on combo box
      General and Desktop • qt5 combobox serial port • • deleted286  

      10
      0
      Votes
      10
      Posts
      868
      Views

      @suslucoder I don't see why it would not be possible to select other entries in a combo box. Do you do anything else with ui->ports?
    • SOLVED Serial port for Qt 6
      Qt 6 • serial port qt 6.0 qt serialport • • petar.vitorac  

      7
      0
      Votes
      7
      Posts
      4785
      Views

      @SGaist Thank you very much, that saved me a lot of disk space!
    • UNSOLVED readyRead() signal is working strange
      Qt for MCUs • qserialport serial port readyread rs485 • • IRBaboon  

      14
      0
      Votes
      14
      Posts
      976
      Views

      @IRBaboon If your PC have no obvious lagging, my issue is an error direction. Here are some ideas you can try: read help doc seriously or test one other poeple's credible demo on your devie, is it possible to call it incorrectly?(for serial device, It is difficult for others to run your demo) try the lastest verion of QT
    • UNSOLVED Problem to connect serial port on android platform
      Mobile and Embedded • android serial port qt 5.14.0 • • HemantSuryawanshi  

      1
      0
      Votes
      1
      Posts
      332
      Views

      No one has replied

    • SOLVED same serial in multiple threads giving error
      Wiki Discussion • serial port multithreading • • Alphy  

      5
      0
      Votes
      5
      Posts
      1047
      Views

      @Alphy said in same serial in multiple threads giving error: it is working fine. So please don't forget to mark your post as solved!
    • UNSOLVED Reading UART (RS485) with Qt
      Mobile and Embedded • c++ qt serial port serialport-byte • • SheldonC  

      8
      0
      Votes
      8
      Posts
      1317
      Views

      @RunThiner There's no need for such a loop. QSerialPort already provides an asynchronous API and if you really want to wait for data to be available, there's a blocking API for that as shown in the QSerialPort details.
    • UNSOLVED Installing new module
      Mobile and Embedded • cross compile serial port raspberry pi 3 ubuntu 16.04 new module • • vishbynature  

      26
      0
      Votes
      26
      Posts
      2188
      Views

      @vishbynature It's config.log file located in the same directory from which you called configure. It is a text file, nothing special. Look for compile errors in that file related to to what you need.
    • SOLVED Troubles with SerialPort
      General and Desktop • qfile serial port • • Dooham  

      9
      0
      Votes
      9
      Posts
      816
      Views

      @J.Hilk Thank You it did work. You saved me.
    • UNSOLVED (Serial Port) PermissionError after publishing to AppStore
      General and Desktop • macos serial port permissionerror app store • • long  

      1
      0
      Votes
      1
      Posts
      278
      Views

      No one has replied

    • SOLVED Serial port data loss
      General and Desktop • serial port data loss • • donquixote  

      4
      0
      Votes
      4
      Posts
      912
      Views

      @donquixote said in Serial port data loss: I used it because i thought maybe the problem is that new incoming data is interrupting the function before the previous one has not finished yet. The problem was still in there before that. Slots are not interrupted. They are called one by one from the event loop in the background. Think of your slots are like a subroutine that is called from main if there is work to do. process data and block serial signals at the time QT'll continue to buffer data at the time And I guess that will not work out. Even if it works on one platform, it may fail on another one. OK, got your idea. That should be the problem since i don't wait for readyread signal in the loop, right? Yeah, but don't wait for readyRead, leave the slot and give Qt the possibility to process the data. It will call your slot again once new data is ready. Regards
    • UNSOLVED Qt Bluetooth With Non-Qt Raspberry Pi
      General and Desktop • serial port raspberry pi 3 rfcomm qt bluetooth • • zeinab  

      1
      0
      Votes
      1
      Posts
      445
      Views

      No one has replied

    • UNSOLVED Qt ModBus Master support for ASCII transmission mode
      General and Desktop • serial port modbus ascii mode • • Stanly.Thomas  

      3
      0
      Votes
      3
      Posts
      1015
      Views

      I think a tracker has been raised from long time for the same https://bugreports.qt.io/browse/QTBUG-51751 and this is still in unresolved state.
    • UNSOLVED Change values on Qt according to a serial port string
      QML and Qt Quick • serial port label read serial circulargauge bluetooth rfcom • • maxime.armand  

      4
      0
      Votes
      4
      Posts
      1821
      Views

      @maxime.armand Have you actually tried it? It does exactly what you demand in step 1. And if you look in http://doc.qt.io/qt-5/qtserialport-creaderasync-main-cpp.html you will see that the serial port and the baud rate are given as command line parameters. Just (cross-)compile the program for the Raspberry, and run it. It should work like your HypterTerminal test.
    • SOLVED Problem facing with QT serial port module
      General and Desktop • desktop serial port qt5.9.1 • • Dhani  

      5
      1
      Votes
      5
      Posts
      2315
      Views

      @Dhani - thanks from me too. This fixed the same problem I was having connecting to a virtual serial port on an NXP dev board.
    • SOLVED SerialPort in a different Thread
      General and Desktop • qthread qtimer serial port • • J.Hilk  

      2
      0
      Votes
      2
      Posts
      1136
      Views

      Never mind, I had code in my the constructor of the to be threaded class, that caused the conflict... connect(&modbusThread, &QThread::started, modbusDevice, &Modbus::setupClass); fixed the issue.
    • UNSOLVED QSerialPort handle on Windows
      General and Desktop • windows serial port native code • • Morix Dev  

      4
      0
      Votes
      4
      Posts
      1695
      Views

      The overlapped mode is the problem. If you only have a handle then ReadFile / WriteFile will fail if you don't include the overlapped structure in the call. It was opened with the OVERLAPPED flag so this parameter cannot be NULL. What exactly are you trying to do? Maybe there is another way.
    • UNSOLVED Serial port
      General and Desktop • serial port • • transistor69  

      2
      0
      Votes
      2
      Posts
      665
      Views

      Hi and welcome to devnet, You have several examples for the QtSerialPort module that should help you get started. Hope it helps
    • UNSOLVED Receiving data packets from the serial port
      General and Desktop • serial port serial frame • • Basti46  

      5
      0
      Votes
      5
      Posts
      1747
      Views

      @Wieland Well i found my problem, I chose the wrong baudrate. Now i have to adjust my code, but i think it will work sooner or later. Thanks again!
    • UNSOLVED how to convert text (real number) in LineEdit to an array of bytes in Hexadecimal
      General and Desktop • gui serial port serial interfac • • hussam.Yones  

      5
      0
      Votes
      5
      Posts
      2473
      Views

      @Wieland, this float number is represent the speed Value of DC motor in RPM, may you mean I it should be in double type or something else!!. in fact I don't know obviously whit's the type I should use this is the GUI I built link text you can see in Stack-overflow here: link text may you get what I need, I'am sory to be annoying but I spent alot of time in this problem :(
    • SOLVED Get positionSource with GPS receiver and serial port com
      General and Desktop • serial port location gps positioning positionsource • • Lulu31  

      13
      1
      Votes
      13
      Posts
      6882
      Views

      I am also trying to write a minimal qml app that uses the built in GPS to retrieve current position. I am not sure if I can use Qt positioning or if I should just parse the raw output of the GPS myself, like the OP did here, and extract the position manually. It seems very dirty to do it that way, I thought there would be a nice API in QML that I could use. Anyone can point to a simple example?
    • UNSOLVED QSerialPort Open() return error: No such file or directory
      Mobile and Embedded • error raspberry pi serial port raspbian ttyusb0 • • Myg0t  

      6
      0
      Votes
      6
      Posts
      4335
      Views

      Then I'd recommend taking a look the example code and rewrite yours to match it.
    • SOLVED read and write in serial port
      QML and Qt Quick • qml serial port • • neda  

      13
      0
      Votes
      13
      Posts
      22947
      Views

      https://www.youtube.com/watch?v=7ny6Hrdc_2M&t=47s
    • UNSOLVED Serial Port : Unique Read Error
      General and Desktop • serial port • • Dhinesh  

      2
      0
      Votes
      2
      Posts
      833
      Views

      @Dhinesh said: HI and welcome The signal readyRead (serialReceived) is sent when QSerialPort reads some data. Try to not call serial->write("1",1); in your serialReceived as it might make controller send more data and it might never get out of there. (end less loop) as its called pretty fast. Else they code seems fine. Maybe say QByteArray data.append( serial->readAll()); (and move QByteArray data to MainWindow.h) and then when data.size() == 8 then DOSTUFF data.clear();
    • QSerialport hardwarecontrol, do I get this rigth?
      General and Desktop • qserialport serial port • • PimD  

      8
      0
      Votes
      8
      Posts
      4883
      Views

      @Rondog @kuzulis I'm going to give the bytesWritten()signal a try, I will let you know how it worked out. I don't have a separate thread set up, but it's definitely worth the try! Big thanks for the reply's!
    • Qt to arduino Serial number
      3rd Party Software • serial port serial arduino • • r31lly  

      2
      0
      Votes
      2
      Posts
      2372
      Views

      Hi and welcome to devnet, Why the double conversion to stdString and c_str ? You can use something like toLatin1 if you want a QByteArray to write to your serial port.
    • Qt4 -i want serial communication
      General and Desktop • serial port serial • • ForestPoem  

      2
      0
      Votes
      2
      Posts
      1051
      Views

      Use QtSerialPort instead (branch qt4-dev): http://code.qt.io/cgit/qt/qtserialport.git/?h=qt4-dev Wiki: https://wiki.qt.io/Qt_Serial_Port PS: Also you can install QtSerialPort from the Fedora's repo
    • Problem with using QIODevice.read inherited by QSerialPort
      General and Desktop • serial port read qiodevice.read • • PabloF  

      11
      0
      Votes
      11
      Posts
      3002
      Views

      Thanks for your reply... I agree that may be my code is not the best practice, as i learn Qt by myself only with doc and tutorials... but the program was working perfectly when i delivered it to the researchers... In fact, is working perfectly if i compile it on windows... few hour ago i borrowed a windows machine, installed qt, compiled the same project and worked just fine... So i doubt is really a code problem, because it should appear in both Windows and Linux, as the code is exactly the same... I'm starting to think that is a linux driver problem, so i will try in another linux when i get the chance... If someone has ubuntu 15.04 and is kind enough to reproduce this problem and tell me i would be very happy! If anybody else reproduce this problem in other linux machine i will start a bug report
    • QtSerialPort does not detect parity error under linux
      General and Desktop • serial port space error detection parity mark • • ivanperino  

      11
      0
      Votes
      11
      Posts
      4650
      Views

      @kuzulis I used putty just to send data to my app. As you suggest, putty doesn´t detect parity errors.
    • QSerialPort communication
      General and Desktop • qserialport serial port com • • CKoch  

      2
      0
      Votes
      2
      Posts
      1328
      Views

      This might be the culprit: while (serial->waitForReadyRead(200)) This will put your thread to sleep until data has arrived or 200 ms has elapsed. QSerialPort seems to rely on the message loop to handle data so this might interfere with it (?). There is no guarantee that you will have 512 bytes of data back at once either. There is a signal (QSerialPort::readyRead() ) you can use when received data arrives. Connect this to a suitable slot and buffer what has arrived each time the signal is fired (I assume you will not get all the data at once). Do this until you have 512 bytes then process it. Keep the event loop active if you have some other 'heavy' function somewhere (QApplication::processEvents() ).
    • QSerialPort Buffer Problems
      General and Desktop • qserialport serial port buffer overflow • • metty  

      19
      0
      Votes
      19
      Posts
      13726
      Views

      I am sorry about my last post. I made a stupid error. I updatet to QT5.5, but I haven't reconfigurated the project, so I was still using QT5.4. Now I tried also the Chipi-X10 USB-RS converters. I have to say, they work a lot better. I have now for all three ports, this converter. With the others, a lot of times I had to unplug and replug the connectors to get dem work. So there is something strange. The Chipi worked really good until now, thank you jeroen3, this will save a lot of time. After building the programm with QT5.5, the programm also work a lot better. I saw that the qcustemplot keeps plotting while I drag and drop the window. I have sometimes errors but now only sporadic. For example when I resize the window very fast, I can provoke it. But in general the errorrate is about one or two percent, and with that I can live. PS: We here do not play in telepathists and predictors. If you want to get help, you should provide the minimal and simple example.... My problem was, that with the minimal simple example all seems to working. This communication problem I had only, wenn all the data was coming and when I was plotting someting in the same time. And I checked my code a lot of times. The problem is, my knowhow about QT and generell about programming with PCs is not very big. So I think there is something I do not know. So when I check my code a hundet times more, I will not find an error. I made also an easy experiment to isolate the error: My I slowed up the replot, so that I plot only every tenth time, but ten points at the same time. Like this I can see, that this error, comes only when the window is plotting. The error comes more, the more points he has to plot on the screen. So if I make fullscreen, and I set up the scale so that I have the maximum of points in the axis, the error comes every time again. So QT has an influence to this problem. I think there is an overflow in some buffer, beause the program is to slow to read it or that he overwrites any part for some other reasons. But anyway.. For me I will pay attention now to not overcharge my comuter :) Thank you for all help!
    • Terminal example for QTSerialPort doesn't work
      Mobile and Embedded • serial port beaglebone blac • • Ramon  

      2
      0
      Votes
      2
      Posts
      1119
      Views

      I used Qextserialport from git clone https://code.google.com/p/qextserialport/ and the problem is solved to a great extent. With Qextserialport, around 4% of the bytes get dropped at 115200 baud. On decreasing the speed to 9600, data reception is much better. Only issue is that of the initial 160-190 bytes that are received, some bytes are missing. After the initial 190 bytes, there is no loss at all. Since the loss seems to be predictable, I plan to append some known value 200 times ahead of the actual data and send the whole sequence. The known value will be neglected at the receiver end in software.
    • SIGSEGV - segmentation fault
      Tools • serial port debugging serialport sigsegv segmentation fa unexpectedly fi exe crashed the inferior st • • FabioSO  

      6
      0
      Votes
      6
      Posts
      1963
      Views

      You're welcome ! Since you have it working now, please update the thread title prepending [solved] so other forums users may know a solution has been found :)
    • Arduino Serial Port Communications - Can't Open Arduino
      General and Desktop • serial port serialport read arduino write • • MagicalJourney  

      6
      0
      Votes
      6
      Posts
      3490
      Views

      Workaround: Start an application (QProcess) that pipes the serialport to a localhost socket.