QNX4.25 VMWare and serial communication

bridged with qdn.public.qnx4
Post Reply
rp

QNX4.25 VMWare and serial communication

Post by rp » Wed Jan 07, 2004 3:28 pm

Hi,

Got a problem with serial communication with QNX4.25 VM under WinXP.

The QNX serial port configuration is OK (use the same in a real QNX
machine).
(I don't want to use hardware flow control)
ie in my sysinit file :
/bin/Dev.ser 3f8,4
styy -icrnl < '/dev/ser1'

I use the physical serial port (serial0-> /dev/ser1) configuration for
the VM.
It works but some bytes are lost during the communication (-> bad
checksums), not every time but often.

I tried to set the 'Yield CPU on poll' option in VMWare.
I tried to set serial0.pipe.charTimePercent = 200 (or 1000) in the
configuration file of my VM.

....without success

Any idea ?

rp

Re: QNX4.25 VMWare and serial communication

Post by rp » Thu Jan 08, 2004 1:28 pm

rp wrote :
It works but some bytes are lost during the communication (-> bad checksums),
not every time but often.
It's ok if the baudrate is set to 4800.
Is it really impossible to set the serial port at 9600 bauds (without
frame errors) under VMWare/QNX4.25 ?

David Gibbs

Re: QNX4.25 VMWare and serial communication

Post by David Gibbs » Thu Jan 08, 2004 3:10 pm

rp <rp@no.com> wrote:
rp wrote :

It works but some bytes are lost during the communication (-> bad checksums),
not every time but often.

It's ok if the baudrate is set to 4800.
Is it really impossible to set the serial port at 9600 bauds (without
frame errors) under VMWare/QNX4.25 ?
Does the hardware support a FIFO? Try using the -t option to Dev.ser to
enable the 16550 uart's FIFO.

The most likely problem is interrupt latency -- I'd bet the vmware
environment doesn't give very predictable latency, and if you can't
service the serial interrupt soon enough, you're going to see an
overrun/framing error. Enabling the FIFO means that you have more
time to get to the hardware before losing a character.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

rp

Re: QNX4.25 VMWare and serial communication

Post by rp » Fri Jan 09, 2004 10:43 am

David Gibbs a utilisé son clavier pour écrire :
Does the hardware support a FIFO? Try using the -t option to Dev.ser to
enable the 16550 uart's FIFO.
Thanks but no change...

In fact, the QNX C program redefine the port setting :
Do I have to change something for the UART buffer support in this code
?

**** start of code ***

struct termios tConf;
int iReturn;

iReturn = 0;

if ((iReturn = tcgetattr(iFileDescriptor, &tConf)) != -1)
{
tConf.c_ispeed = B9600;
tConf.c_ospeed = B9600;

/* Enable the receiver and set local mode */
tConf.c_cflag |= (CLOCAL | CREAD);

/* Set 8N1 */
tConf.c_cflag &= ~PARENB;
tConf.c_cflag &= ~CSTOPB;
tConf.c_cflag &= ~CSIZE;
tConf.c_cflag |= CS8;

/* Disable hardware flow control - Not supported */
// tConf.c_cflag &= ~CNEW_RTSCTS;
/* Select raw input/output */
tConf.c_lflag &= ~(ICANON | ECHO | ISIG);
tConf.c_oflag &= ~OPOST;

/* Set the new options for the port */
if ((iReturn = tcsetattr(iFileDescriptor, TCSANOW, &tConf)) != -1) {}
}
return iReturn;
}

**** end of code ***

Best regards,

rp

Re: QNX4.25 VMWare and serial communication

Post by rp » Fri Jan 09, 2004 2:29 pm

rp a exprimé avec précision :
In fact, the QNX C program redefine the port setting :
Do I have to change something for the UART buffer support in this code ?
Serial port is opened this way :

open("/dev/ser1", O_RDWR | O_NOCTTY | O_NONBLOCK);

Should I add O_SYNC and/or O_CACHE ?

David Gibbs

Re: QNX4.25 VMWare and serial communication

Post by David Gibbs » Fri Jan 09, 2004 2:52 pm

rp <rp@no.com> wrote:
David Gibbs a utilise' son clavier pour e'crire :

Does the hardware support a FIFO? Try using the -t option to Dev.ser to
enable the 16550 uart's FIFO.

Thanks but no change...
No idea then. I don't know enough about VMWare to really know what
it's doing.
In fact, the QNX C program redefine the port setting :
Do I have to change something for the UART buffer support in this code
No -- it is purely a hardware side thing.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

rp

Re: QNX4.25 VMWare and serial communication - solution

Post by rp » Fri Jan 09, 2004 5:09 pm

David Gibbs wrote :
Does the hardware support a FIFO? Try using the -t option to Dev.ser to
enable the 16550 uart's FIFO.

Thanks but no change...

No idea then. I don't know enough about VMWare to really know what
it's doing.
Sorry, it works !
/bin/Dev.ser -t8 ...

Thank you VERY much !

Bye,

Post Reply

Return to “qdn.public.qnx4”