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 Python
  4. Set DTR and RTS from code
Forum Updated to NodeBB v4.3 + New Features

Set DTR and RTS from code

Scheduled Pinned Locked Moved Solved Qt for Python
4 Posts 3 Posters 1.5k Views 1 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.
  • H Offline
    H Offline
    HvdB
    wrote on last edited by HvdB
    #1

    Hi there, I am new to Qt5 programming, but do have some Python 3 programming experience. I used to do quite a bit of programming in Delphi, but I now want to switch to Python.

    The issue at hand is the behaviour of the DTR and RTS outputs, which seems to differ in the Delphi and even the pyserial implementation. I use the two signal lines together as power supply to power a small PIC microcontroller interface and as said before programs using Delphi, or pyserial work straight away, but all the coding samples using QtSerialPort fail to run. I have tried many variants (dataTerminalReady=False, and/or setDataTerminalReady(True) both in False and True) but none work... I have read quite a bit about issues with the DTR/RTS behaviour in QtSerialPort and wonder whether it might be better to resort to using pyserial?

    OS is Windows 10 64 bit and the serial interface is based on the FTDI USB chip. Qt version is 5.14 and Python version is the 3.7.7. 64 bit version.

    Can anybody provide some guidance on this topic? Many thanks!

    1 Reply Last reply
    0
    • H Offline
      H Offline
      HvdB
      wrote on last edited by
      #2

      @Denni-0
      Hi Denni, thank you for answering my primary question, whether to consider pyserial rather than QtSerialPort. QtSerialPort just seemed to be a neat solution for the serial connectivity, but I will now look at using pyserial and am hopeful that will work as expected. I also checked out the MVC methodology which indeed is an interesting concept, but I think a bit of overkill for my home project.
      I will just keep the topic alive still for some time, just in case somebody has a solution...

      jsulmJ 1 Reply Last reply
      0
      • H HvdB

        @Denni-0
        Hi Denni, thank you for answering my primary question, whether to consider pyserial rather than QtSerialPort. QtSerialPort just seemed to be a neat solution for the serial connectivity, but I will now look at using pyserial and am hopeful that will work as expected. I also checked out the MVC methodology which indeed is an interesting concept, but I think a bit of overkill for my home project.
        I will just keep the topic alive still for some time, just in case somebody has a solution...

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

        @HvdB Qt is not only GUI. Qt has more: networking, serial port, SQL, ...
        So, I don't see how using QSerialPort will break MVC...
        Either you use QSerialPort or serial.tools from Python is a detail and your preference.

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

        1 Reply Last reply
        3
        • H Offline
          H Offline
          HvdB
          wrote on last edited by
          #4

          @Denni-0 Denni thank you for your further explanations and offer to assist, but I prefer to try myself first. If I get stuck I will gladly get back to you!

          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