Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for MCUs
  4. Device or resource busy
Forum Updated to NodeBB v4.3 + New Features

Device or resource busy

Scheduled Pinned Locked Moved Solved Qt for MCUs
9 Posts 4 Posters 1.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.
  • F Offline
    F Offline
    fedito
    wrote on last edited by
    #1

    Hello everyone, I hope you are well. I am having the following problem:

    I am wanting to make a serial port connection with my ESP32 using Arduino IDE. Issue that does not let me open the port and returns "Device or resource busy". I have searched a lot but I can't find the solution and for this reason, I am making this post. My operating system is Ubuntu. I have done these things in Windows and nothing similar has ever happened to me, I hope you can help me, thank you very much in advance!

    P.S: I'm using google translate

    ademmlerA 1 Reply Last reply
    0
    • F fedito

      Hello everyone, I hope you are well. I am having the following problem:

      I am wanting to make a serial port connection with my ESP32 using Arduino IDE. Issue that does not let me open the port and returns "Device or resource busy". I have searched a lot but I can't find the solution and for this reason, I am making this post. My operating system is Ubuntu. I have done these things in Windows and nothing similar has ever happened to me, I hope you can help me, thank you very much in advance!

      P.S: I'm using google translate

      ademmlerA Offline
      ademmlerA Offline
      ademmler
      wrote on last edited by
      #2

      @fedito

      Make sure that your application has access to the /dev/tty ...
      Put your user tiny "dial out" group to grant access.

      sudo usermod -a -G dialout  <username>
      
      F 1 Reply Last reply
      1
      • ademmlerA ademmler

        @fedito

        Make sure that your application has access to the /dev/tty ...
        Put your user tiny "dial out" group to grant access.

        sudo usermod -a -G dialout  <username>
        
        F Offline
        F Offline
        fedito
        wrote on last edited by
        #3

        @ademmler Thanks for the quick reply. I estimate that it must have access since I can open the port from QT but when I connect the ESP32 and I want to load the program it won't let me, so I close the port from QT and load the program there. But then I can't connect from QT to that same port.

        ademmlerA 1 Reply Last reply
        0
        • F fedito

          @ademmler Thanks for the quick reply. I estimate that it must have access since I can open the port from QT but when I connect the ESP32 and I want to load the program it won't let me, so I close the port from QT and load the program there. But then I can't connect from QT to that same port.

          ademmlerA Offline
          ademmlerA Offline
          ademmler
          wrote on last edited by
          #4

          @fedito I don't get the issue ... maybe a translation thing.

          F 1 Reply Last reply
          0
          • ademmlerA ademmler

            @fedito I don't get the issue ... maybe a translation thing.

            F Offline
            F Offline
            fedito
            wrote on last edited by
            #5

            @ademmler Maybe I'm expressing myself wrong. The problem is that I can't link the same serial port from my ESP32 board and my QT app. It tells me that the serial port is full.

            This line of code is what returns the following image.

            QMessageBox::information(this, "Serial PORT", "NO SE PUDO ABRIR EL PUERTO (" + QSerialPort1->errorString() + ")");

            Screenshot from 2023-12-15 13-05-34.png

            SGaistS 1 Reply Last reply
            0
            • F fedito

              @ademmler Maybe I'm expressing myself wrong. The problem is that I can't link the same serial port from my ESP32 board and my QT app. It tells me that the serial port is full.

              This line of code is what returns the following image.

              QMessageBox::information(this, "Serial PORT", "NO SE PUDO ABRIR EL PUERTO (" + QSerialPort1->errorString() + ")");

              Screenshot from 2023-12-15 13-05-34.png

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              Something is really not clear. Connecting a device to your computer should not make the serial port "busy".

              Do you maybe have another application accessing the same serial port ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • F Offline
                F Offline
                fedito
                wrote on last edited by
                #7

                I ran Qt as root and problem solved.

                jsulmJ 1 Reply Last reply
                0
                • F fedito has marked this topic as solved on
                • F fedito

                  I ran Qt as root and problem solved.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @fedito said in Device or resource busy:

                  I ran Qt as root and problem solved

                  You should rather change access rights to the device file (allow your normal user access to it) instead of running whole application as root. Usually it is enough to add your user to a group which has access to the device file.

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

                  ademmlerA 1 Reply Last reply
                  2
                  • jsulmJ jsulm

                    @fedito said in Device or resource busy:

                    I ran Qt as root and problem solved

                    You should rather change access rights to the device file (allow your normal user access to it) instead of running whole application as root. Usually it is enough to add your user to a group which has access to the device file.

                    ademmlerA Offline
                    ademmlerA Offline
                    ademmler
                    wrote on last edited by
                    #9

                    @jsulm As I wrote above:

                    sudo usermod -a -G dialout <username>

                    1 Reply Last reply
                    1

                    • Login

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