Open jbjw opened 6 years ago
I am having the exact same error. Installed everything on a 64 bit Windows 10. Changed the config.ini for bot type top be the axidraw.
Everything works when I run robopaint in the background, so the connection is good. I was just trying to use the CNC Server to manually control the layout of the pen controls, but ran into the exact error above.
Help please =)
Additionally, I opened a web browser and though it says above that the connection was essentially lost, my http protocol is still communicating with the axidraw - it just isn't doing anything.
localhost:4242/poll returns the correct states of the axidraw localhost:4242/pen.down gives an HTTP status code of 200 but nothing happens
I'm having issues running cncserver on my Windows machine - it successfully connects to my Axidraw and then immediately disconnects, giving this error:
RUNNER:undefinedError: Reading from COM port (ReadIOCompletion): Operation aborted
(full output at the bottom), and then continues in simulation mode.After a bit of research, it looks like it may be an issue with calling
flush
on a serial port that's listening. Here's someone else having the same issue: https://github.com/node-serialport/node-serialport/issues/1409, so seems it's a serialport bug on Windows. I tried downgrading serialport from v6 to v4, but it looks like cncserver relies on v6.I'm wondering if it's possible to, as a workaround, skip the flush for whichever serial commands happen while the port is still listening. I'll try my hand at implementing that, but I'm pretty new to both this project and serialport (and serial protocol 😛).
Here's my full output when running
node cncserver.js
: