So I eventually got my FTDI USB-to-serial cable working on the command line.
Now - how do I do that from an app?
I have tried:
int fd = open( "/dev/ttyUSB1", O_RDWR | O_NOCTTY | O_NDELAY );
if( fd < 0 )
{
LE_INFO("open failed");
}
ssize_t result = write( fd, "Opened.\r\n", 9 );
if( result < 0 )
{
LE_INFO("1st write failed");
}
But the open fails.
Where am going wrong?
Update:
errno is 2 when the open fails - which, I think, is
ENOENT 2 /* No such file or directory */