Comment 18 for bug 661321

Revision history for this message
ironstorm (ironstorm-gmail) wrote :

I have a couple of older TEMPer USB-to-Serial Thermometers that depend on this module, so Michael Stevens comment (#12) about the behaviour was very helpful for me...

The programs the TEMPer's depend on (TEMPer.c and temper-read-temp (temper-read-temp, part of temper-tools-1.0 from roaringpenguin.com) both block on the serial port open bit (I guess they don't do the DCD properly)... Here's what the change looks like now that it works again.

- fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY );
+ fd = open(MODEMDEVICE, O_RDWR | O_NOCTTY | O_NONBLOCK ); // O_NONBLOCK: In Linux 2.6+ serial ports became able to block, we don't want that here.