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. QSerialPort::SerialPortError(PermissionError)
Forum Update on Monday, May 27th 2025

QSerialPort::SerialPortError(PermissionError)

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 2.7k 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.
  • K Offline
    K Offline
    kar95
    wrote on last edited by
    #1

    I am trying to open the connection for reading and writing (I am working on Windows) but the program says that I have no permission and I don´t know how to open it. I have tried running as administrator but it doesn´t work.

    Here I post which part of code give me the error

    if (!serial.open(QIODevice::ReadWrite)) {

    qDebug("SERIAL PORT - NOT OPENED") ;
    qDebug()<<"error code = "<<serial.error();
    
    processError(tr("No puedo abrir el puerto %1, error code %2")
                 .arg(serial.portName()).arg(serial.error()));
    return;
    

    }

    J.HilkJ 1 Reply Last reply
    0
    • K kar95

      I am trying to open the connection for reading and writing (I am working on Windows) but the program says that I have no permission and I don´t know how to open it. I have tried running as administrator but it doesn´t work.

      Here I post which part of code give me the error

      if (!serial.open(QIODevice::ReadWrite)) {

      qDebug("SERIAL PORT - NOT OPENED") ;
      qDebug()<<"error code = "<<serial.error();
      
      processError(tr("No puedo abrir el puerto %1, error code %2")
                   .arg(serial.portName()).arg(serial.error()));
      return;
      

      }

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @kar95 give us some more Information about the code before the error where you set the port name, baudrate parity etc.

      Also a serial port my only have one open connecten across your operating system. If you have an other program that is accessing the port, opening it will always fail.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      2
      • K Offline
        K Offline
        kar95
        wrote on last edited by
        #3

        Thansk it was because I have the terminal Putty active too and it was the one which caused my conection problems. :D

        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