Results 1 to 9 of 9

Thread: Qt and COM port access

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt and COM port access

    But "console" only switches the console subsystem in the compiler. Try disabling the console from Visual Studio settings (if you use VS) and see if the problem persists.

    QExtSerialPort uses native serial communication as well so I'm not sure if using QExtSerialPort would change anything. IMO the problem is elsewhere.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt and COM port access

    Any hint on how to disable console in Visual Studio?
    "Help" gives nothing.
    MacOSX user dabbling with Linux and Windows.

  3. #3
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt and COM port access

    I got the QExtSerialport example QESPTA built with VS and it is working with HyperTerminal.
    I will try again with this and abandon my own COM port methods for the moment. My problems must be in my usage of the class.
    Unfortunately, QESPTA is event driven and this is not supported in the POSIX implementatioin of QExtSerialport, so in my (working) POSIX code I am just using a timer to read and write to/from the port.
    Annoying that this implementation works fine in POSIX but not in WIN32, for some reason.
    I will have to use completely different code for WIN32 vs. POSIX, so it seems cross platform programming has its limitations.
    Thanks for your patience.
    MacOSX user dabbling with Linux and Windows.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt and COM port access

    Quote Originally Posted by bnilsson View Post
    Any hint on how to disable console in Visual Studio?
    "Help" gives nothing.
    It's somewhere in the compilation options. It's called "console subsystem".
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt and COM port access

    Found it , thanks. It was in Linker/System settings.
    Toggling /SUBSYSTEM:CONSOLE and /SUBSYSTEM:WINDOWS also toggles COMport working/not working.
    I have no idea wether this is specific to Qt or not.

    BN
    MacOSX user dabbling with Linux and Windows.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt and COM port access

    It's not specific to Qt. QExtSerialPort works fine without the console subsystem. It has to be something in your code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.