Read serial port by C on mini2440

david
hi to every body im trying to make a comunication by serial port using an
example that is found in this page its name is comtest

with this program i can send info with my mini to my desktop machine, but
when i try to do the contrary (send info wth my desktop machine to my mini)
it doesnt happend anything, i modify the code:
     commenting the following lines:
if (FD_ISSET(CommFd, &ReadSetFD)) {
/*   
    
    while (read(CommFd, &Char, 1) == 1) {
    

    WaitFdWriteable(TtyFd);
    if (write(TtyFd, &Char, 1) < 0) {
          Error(strerror(errno));
    }
    if (OutputToStdout) {
        if (UseColor)
      fwrite("\x1b[01;34m", 1, 8, stdout);
        OutputStdChar(stdout);
        if (UseColor)
      fwrite("\x1b[00m", 1, 8, stdout);
        fflush(stdout);
    }
    
    if (Char == 'z') {
                    z ++;
                    if (z >= 3)
                    printf("prueba andres\n");   
                } else
                    z = 0;

      }
*/
}
instead of that i put
printf("pruebad\n");

and when i type something in my desktop machine my mini recieve alots of
messages : pruebad how can i fix it?

after that i put this code (i want to know how many times this messeages
repeat.

int cm=1;
int i=1;

while(i <= 300)
{
printf( "%d ", cm );
cm ++;
i ++;
}

and i realize that my messeage repits 1500! the same messeage and for that
reason my first program didnt work, how can i fix it?

thanks