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. Problem with QSerialPort
QtWS25 Last Chance

Problem with QSerialPort

Scheduled Pinned Locked Moved Unsolved General and Desktop
qserialport
7 Posts 4 Posters 2.5k 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.
  • A Offline
    A Offline
    AngrySkarpeta
    wrote on last edited by A Former User
    #1

    Hi,
    I tried to open port (i want to send letter 'F' to arduino via bluetooth) but immediately i get error "Semaphore limit exceeded " (it can be a little bit different because i get error in my language ).
    Below i post part of the code

            serial.setPortName("COM6");
            if(!serial.open(QIODevice::ReadOnly)){
            QMessageBox::critical(this, tr("Error"), serial.errorString());
            return;}
                   serial.setBaudRate(9600);
                   serial.setDataBits(QSerialPort::Data8);
                   serial.setParity(QSerialPort::NoParity);
                   serial.setStopBits(QSerialPort::OneStop);
                   serial.setFlowControl(QSerialPort::NoFlowControl);
                    if (serial.isOpen() && serial.isWritable()){
                           qDebug() << "Serial is open";
    

    It would be awesome if someon could help me.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! Have you tried to run one of the Qt Serial Port Examples?

      A 1 Reply Last reply
      1
      • ? A Former User

        Hi! Have you tried to run one of the Qt Serial Port Examples?

        A Offline
        A Offline
        AngrySkarpeta
        wrote on last edited by
        #3

        @Wieland Yes i tried one of them, also tried project blubot from github. It seems to be problem not with code but with windows, does you ever encouter something like that?

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Did you try other function of BT ?
          Are the board and the pc connected`?

          You could also try
          http://doc.qt.io/qt-5/qtbluetooth-btfiletransfer-example.html

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AngrySkarpeta
            wrote on last edited by
            #5

            Pc and arduino are connected :-) I was thinking about using qbluetooth but it seems to be excesive if i want just send letter ;-)

            mrjjM 1 Reply Last reply
            0
            • A AngrySkarpeta

              Pc and arduino are connected :-) I was thinking about using qbluetooth but it seems to be excesive if i want just send letter ;-)

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              @AngrySkarpeta
              Well it might be overkill
              but it“sounds like its not really connected but
              without actual errors then its not possible to guess at all.
              Could be a driver issue or trust issue.
              You should use other tools to try to test if they are really paired.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kuzulis
                Qt Champions 2020
                wrote on last edited by
                #7
                This post is deleted!
                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