voodootikigod/node-serialport — Issue #39: doesn't seem to work with Silicon Labs USBtoUART adaptor?
Author: lwille
Created: 2012-02-25 03:38:18+00:00
State: open

Maybe I'm messing up something - I'm able to talk to an arduino via node-serialport, but not to an industrial stepper motor which is connected via a SiLabs CP210x USB-to-RS485 dongle. There is no data transmitted nor received, the process just seems to wait forever (but without blocking).

I sent and received data via CoolTerm, pySerial/miniterm.py, and even my C reference implementation with exactly the same port configuration (I compared my C code to serialport_native.cc) is working - cf. http://pastie.org/3452151

There is a strange thing I noticed with the following setup:
1) I start my node.js script, set it to wait for several seconds via a setTimeout after opening the port
2) I execute my C-Program, within this time, in another terminal
result: after the timeout passes, everything is working fine and data will be transmitted.

Without executing C-program (which seems to do a tiny bit different, although it looks quite the same to your code), no data will be transmitted after the timeout.

I also tried @jaredhanson 's fork in the hope that it might work better with libuv, but to no avail.

What am I doing wrong? Is there a device-dependent incompatibility? These unforeseeable problems with every node-based project will drive me crazy some day... *sigh*.

Please, take a look - maybe you'll notice something I'm missing.

OS X 10.7.3 node 0.6.9-0.6.11