Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QSerialPort::pinoutSignals() not working



  • Hii,
    I am using QSerialPort class for RS-232 Windows based application. When I am trying to read RS-232 pinout details using QSerialPort::pinoutSignals() function after setting RTS to high, values are not changing for DataCarrierDetectSignal,DataSetReadySignal and ClearToSendSignal enums.But it is giving correct value for QSerialPort::DataCarrierDetectSignal value. Is it an implementation problem, or I am something wrong?

    //QSerialPort::DataCarrierDetectSignal
    if(port->pinoutSignals() & QSerialPort::DataCarrierDetectSignal){
    LOG_DEBUG("QSerialPort::DataCarrierDetectSignal is TRUE");
    }
    else {
    LOG_DEBUG("QSerialPort::DataCarrierDetectSignal is FALSE");
    }

    //QSerialPort::RingIndicatorSignal
    if(port->pinoutSignals() & QSerialPort::RingIndicatorSignal){
    LOG_DEBUG("QSerialPort::RingIndicatorSignal is TRUE");
    }
    else {
    LOG_DEBUG("QSerialPort::RingIndicatorSignal is FALSE");
    }

    //QSerialPort::DataSetReadySignal
    if(port->pinoutSignals() & QSerialPort::DataSetReadySignal){
    LOG_DEBUG("QSerialPort::DataSetReadySignal is TRUE");
    }
    else {
    LOG_DEBUG("QSerialPort::DataSetReadySignal is FALSE");
    }

    //QSerialPort::ClearToSendSignal
    if(port->pinoutSignals() & QSerialPort::ClearToSendSignal){
    LOG_DEBUG("QSerialPort::ClearToSendSignal is TRUE");
    }
    else {
    LOG_DEBUG("QSerialPort::ClearToSendSignal is FALSE");
    }



  • Can you demonstrate that you know what those signals are and who is repsonsible for asserting them...and do you undertstand the difference between a DTE-DTE vs DTE-DCE connection? Would you expect those signals to be "asserted", and under what circumstances?


Log in to reply