Results 1 to 3 of 3

Thread: Serial port Low Level access....

  1. #1
    Join Date
    May 2008
    Location
    Spain
    Posts
    92
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Serial port Low Level access....

    Hello,

    I am interesting in send a signal break using serial port.
    In minicom there is a option to do it but I don't know how to do it in my programm.

    As I know, signal break is to put 1 in TXD.

    Is there any way to do it??
    any information or advice???

    Best regards.

  2. #2
    Join Date
    Jan 2009
    Location
    Midlands UK
    Posts
    62
    Thanks
    6
    Thanked 9 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Serial port Low Level access....

    Hi,

    I only know the answer using ms windows - basically you can't do it directly to hardware but need to use a windows api (ie, EscapeCommFunction - SETBREAK). I don't think Qextserial port has this function but I do have my own version of windows serial coms (wincomport) under Qt4 that should easily be updated to add this function, I'll take a look over the next few days and add it on then post it back on this thread.
    I don't know if you can write direct to the serial i/o chip under unix/x11 but if you can then I can give you the machine code needed assuming Qt has a means to add inline asm code.

  3. #3
    Join Date
    May 2008
    Location
    Spain
    Posts
    92
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Serial port Low Level access....

    OK..

    I find a solution...

    Qt Code:
    1. #include <termios.h>
    2. int tcsendbreak(int fildes, int duration);
    To copy to clipboard, switch view to plain text mode 
    transmit stream of zeroes to terminal

    Best regards

Similar Threads

  1. serial port same local machine
    By adamatic in forum Qt Programming
    Replies: 7
    Last Post: 3rd February 2009, 07:29
  2. serial port programming
    By sujatashooter in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2008, 15:51
  3. accessing serial port without CONFIG += console
    By bnilsson in forum Qt Programming
    Replies: 2
    Last Post: 21st July 2008, 21:47
  4. Serial Port access in Qt
    By Doug Broadwell in forum Newbie
    Replies: 2
    Last Post: 18th October 2006, 21:03
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.