Serial Mac OS X constantly freezes/locks/dissappears for USB to Arduino
Posted
by
Niraj D
on Stack Overflow
See other posts from Stack Overflow
or by Niraj D
Published on 2011-02-18T04:29:07Z
Indexed on
2011/03/06
8:10 UTC
Read the original article
Hit count: 545
I have a problem with my C++ code running in Xcode with both the AMSerial library as well as the generic C (ioctl, termios).
After a fresh restart, my application works well but after I "kill" the program the Serial (I think) is not released.
I have checked my open files under /dev
and have killed the connection to serial USB from there, but my C++ still can't open the USB port.
I have narrowed this down to being a low level Mac OS X issue, regarding blocking the port indefinitely, regardless of closing it using the aforementioned libraries.
Just for context, I'm trying to send numbers through my USB port, serially to an Arduino Duemilanove at 9600 baud. Running Serial Monitor in Arduino is perfectly fine, however, running through a C++ application it freezes up my computer, occasionally, my mouse/keyboard freeze up: requiring a hard reset.
How can this problem be fixed? It seems like Mac OS X is not USB friendly!
© Stack Overflow or respective owner