[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with serial port
I had similar problem wirh R100,
Upgraded to 200 and magically began working, with many other things
Yes, definitively it's worth to upgrade.
----- Original Message -----
From: "Per-Ola Svensson" <firstname.lastname@example.org>
Sent: Wednesday, July 18, 2001 10:54 PM
Subject: Problem with serial port
> I hope someone can help me, excuse me if my english is not perfect.
> I have done a server running on the dev_board lissening on a socket and
> seriel port 1 (ttyS0). The problem is that I can't make the dev_board
> data over the serial interface. The strange thing is that the same code is
> working on the PC without any problem.
> To try solving the problem I made two test application, one server
> on the serial port and one sending. When I start the server on the
> and the sender on the PC it works, but the reversed do not.
> I init the port with:
> serial = open("/dev/ttyS0", O_RDWR | O_NOCTTY );
> if (serial <0)
> fprintf(stderr, "No, the port /dev/ttyS0 is NOT open ");
> fprintf(stderr, "/dev/ttyS0 open with fd = %d\n", serial);
> bzero(&newtio, sizeof(newtio));
> newtio.c_cflag = B38400 | CRTSCTS | CS8 | CLOCAL | CREAD;
> newtio.c_iflag = IGNPAR;
> newtio.c_oflag = 0;
> newtio.c_lflag = 0;
> newtio.c_cc[VTIME] = 0;
> newtio.c_cc[VMIN] = 0;
> tcflush(serial, TCIFLUSH);
> Again. The PC can send with this settings but not the dev_board.
> One smaller question. Is it worth uppgrading to the new relese (R 2.0.0)?
> allready works perfecly (except serial) and I don't plan to use the new
> opptions glibc provide.
> Per-Ola Svensson, email@example.com