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 ?
QNX4.25 VMWare and serial communication
Re: QNX4.25 VMWare and serial communication
rp wrote :
Is it really impossible to set the serial port at 9600 bauds (without
frame errors) under VMWare/QNX4.25 ?
It's ok if the baudrate is set to 4800.It works but some bytes are lost during the communication (-> bad checksums),
not every time but often.
Is it really impossible to set the serial port at 9600 bauds (without
frame errors) under VMWare/QNX4.25 ?
Re: QNX4.25 VMWare and serial communication
rp <rp@no.com> wrote:
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.
Does the hardware support a FIFO? Try using the -t option to Dev.ser torp 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 ?
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.
Re: QNX4.25 VMWare and serial communication
David Gibbs a utilisé son clavier pour écrire :
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,
Thanks but no change...Does the hardware support a FIFO? Try using the -t option to Dev.ser to
enable the 16550 uart's FIFO.
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,
Re: QNX4.25 VMWare and serial communication
rp a exprimé avec précision :
open("/dev/ser1", O_RDWR | O_NOCTTY | O_NONBLOCK);
Should I add O_SYNC and/or O_CACHE ?
Serial port is opened this way :In fact, the QNX C program redefine the port setting :
Do I have to change something for the UART buffer support in this code ?
open("/dev/ser1", O_RDWR | O_NOCTTY | O_NONBLOCK);
Should I add O_SYNC and/or O_CACHE ?
Re: QNX4.25 VMWare and serial communication
rp <rp@no.com> wrote:
it's doing.
-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.
No idea then. I don't know enough about VMWare to really know whatDavid 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...
it's doing.
No -- it is purely a hardware side thing.In fact, the QNX C program redefine the port setting :
Do I have to change something for the UART buffer support in this code
-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.
Re: QNX4.25 VMWare and serial communication - solution
David Gibbs wrote :
/bin/Dev.ser -t8 ...
Thank you VERY much !
Bye,
Sorry, it works !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.
/bin/Dev.ser -t8 ...
Thank you VERY much !
Bye,