i've written serial port access code windows , os x on latter i've yet find way open port dtr low. (i'm trying avoid reseting arduino.) here simplest version of c code demonstrates problem:
const char *pathname = "/dev/tty.usbmodem411"; …. int main() { int fd; int status; printf(" starting serial port program \n"); fd = open(pathname, o_rdwr | o_noctty | o_ndelay); if (fd != -1) printf(" port opened, fd = %d\n",fd) ; else { printf(" not open port\n"); return; } printf("closing port , quitting app\n"); if (fd !=-1) close(fd); return 0; }
i haven't found other open() flags help. can set dtr low after opening port via ioctl() doesn't since arduino resetting on open().
does know how keep dtr low during open() ? function of usb driver?
Comments
Post a Comment