Reading and writing to serial port in C on Linux
I’ve solved my problems, so I post here the correct code in case someone needs similar stuff. Open Port int USB = open( “/dev/ttyUSB0”, O_RDWR| O_NOCTTY ); Set parameters struct termios tty; struct termios tty_old; memset (&tty, 0, sizeof tty); /* Error Handling */ if ( tcgetattr ( USB, &tty ) != 0 ) { … Read more