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
Forum Updated to NodeBB v4.3 + New Features

Problem with QSerialPort

Scheduled Pinned Locked Moved Unsolved General and Desktop
qserialport
7 Posts 4 Posters 2.6k Views 2 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.
  • A Offline
    A Offline
    AngrySkarpeta
    wrote on 28 Jan 2017, 18:22 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 28 Jan 2017, 19:14 last edited by
      #2

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

      A 1 Reply Last reply 29 Jan 2017, 07:06
      1
      • ? A Former User
        28 Jan 2017, 19:14

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

        A Offline
        A Offline
        AngrySkarpeta
        wrote on 29 Jan 2017, 07:06 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
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 29 Jan 2017, 08:31 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 29 Jan 2017, 10:12 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 ;-)

            M 1 Reply Last reply 29 Jan 2017, 10:22
            0
            • A AngrySkarpeta
              29 Jan 2017, 10:12

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

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 29 Jan 2017, 10:22 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 30 Jan 2017, 08:37 last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0

                1/7

                28 Jan 2017, 18:22

                • Login

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