serial port api

Hello, I am using the serial port on a connectme board development board with NET+OS 6.0. Until now, the following code worked fine. The open, read, write calls all work and data is transmitted successfully: … zeroFd = open (“/com/0”,(O_RDWR) ); if (zeroFd <0){ printf (“Can’t open com0 [%d].
“, getErrno()); return; } … result = write (zeroFd, msgBuf, result+1); … (in another thread) result = read(zeroFd, msgBuf, 4); This is fine for a standard configuration (9600 bauds, no parity, etc.). But now I need to use a specific configuration (115200 bauds, no parity, etc.). To do this, I tried to use the termcap api, the ioctl api and always got error messages returned from all configuration functions. This is the code I would like to get to work: (in bsp.h) #define BSP_SERIAL_PORT_API BSP_SERIAL_API_TERMIOS (in my_ser_test.c, i.e. my application code) void configSerial() { int zeroFd, result, status, baudrate; struct termios tios; … zeroFd = open (”/com/1”,(O_RDWR) ); if (zeroFd <0){ printf ("Can’t open com1 [%d].
", getErrno()); return; } tcgetstats( zeroFd, &ser_status ); do{ if ( (ser_status.mstat & (MS_DCD | MS_DSR)) == 0 ) { printf ("Connect Serial cable!
"); tx_thread_sleep(100); } }while( (ser_status.mstat & (MS_DCD | MS_DSR)) == 0 ); /* set the baud rate */ baudrate = SIO_115200_BAUD; tcgetattr(zeroFd, &tios); cfsetospeed(&tios, baudrate); if ( cfgetospeed(&tios) != baudrate ) { printf ("ioctl(Baud set)
", getErrno()); return; } … } For now, all the calls: tcgetstats never provides the proper result and we go in a endless while loop. And the call to cfgetospeed always fails. Once this works, I shall be able to succeed doing read/write accesses at 115200 bauds. Can you help ? Thanks, Brice