the exact line is fd = fopen("/dev/cu.usbserial-A6008bcO","w"); and it's the same name on my arduino ide list port.
Are you opening a new connection (a new call to fopen) to send each command?
Yes every time I call my sub routine from my plugins I use fopen and fclose. so
if ( strcmp (indata,"Speedbrake Full") == 0)
fd = fopen("/dev/cu.usbserial-A6008bcO","w");
fprintf("Speedbrake Full");
fclose(fd);
if ( strcmp (indata,"Speedbrake arm") == 0)
fd = fopen("/dev/cu.usbserial-A6008bcO","w");
fprintf("Speedbrake Arm");
fclose(fd);
as I'm a newbie in C I do not know if its the right code.
Thanks
ounet