How to read from serial in c ? (under linux)

Phate867:
Tried with a normal user space program and still does not work: a lot of strange characters come out.
I see a problem in your code too: you do not set baud rate at all, I think this has to be a problem...

Yes, you obviously have to set the baud rate and possibly other tty parameters. You can use stty from the command line before running the program or cfsetspeed function in your program.