PDA

View Full Version : Serial port Low Level access....



webquinty
7th May 2009, 14:54
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.

SteveH
7th May 2009, 19:15
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.

webquinty
13th May 2009, 18:04
OK..

I find a solution...


#include <termios.h>
int tcsendbreak(int fildes, int duration);
transmit stream of zeroes to terminal

Best regards