You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Run the test program and it hangs after Open serial port /dev/ttyUSB0
I am running Fedora 14. Another user reported the same issue with the latest
'Ubuntu Maverick kernel'.
It appears the newer kernels will block on the open waiting for a
carrier detect (DCD) to be asserted. To solve, I added a O_NDELAY to the open.
However that implies nonblocking, so once I open it, I switch the socket to
BLOCKING mode which open-zwave requires.
Here is the patch to get it to work:
===================================================================
--- SerialControllerImpl.cpp (revision 215)
+++ SerialControllerImpl.cpp (working copy)
@@ -75,7 +75,10 @@
{
Log::Write( "Open serial port %s",
_SerialControllerName.c_str() );
- m_hSerialController = open( _SerialControllerName.c_str(),
O_RDWR | O_NOCTTY, 0 );
+ m_hSerialController = open( _SerialControllerName.c_str(),
O_RDWR | O_NOCTTY | O_NDELAY, 0 );
+ int flags;
+ flags = fcntl(m_hSerialController, F_GETFL);
+ fcntl(m_hSerialController, F_SETFL, flags & (~O_NONBLOCK));
if( -1 == m_hSerialController )
{
Original issue reported on code.google.com by krbvr...@gmail.com on 14 Feb 2011 at 3:15
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
krbvr...@gmail.com
on 14 Feb 2011 at 3:15The text was updated successfully, but these errors were encountered: