I am having a problem with "open". even if there is no device named ttyACM3, it does not return an error. it always prints "no error".
What could be the problem ?
fd = open("/dev/ttyACM3", O_RDWR);
Would evaluate to true for
fd == -1, which is how
open returns an error.
-1 on error, not
In the future read the documentation more carefully :)
if (fd) evaluates to true for negative numbers, in case you were wondering.