Closed awdriggs closed 7 years ago
Your hardware settings are good and the path to the device (/dev/tty.usbserial-A800I9VI
) is most likely right (otherwise you wouldn't see that file inside /dev
).
The error you are getting means that the device did not answer the library's initialization request (or that it took too long).
You could try to increase the delay. Go inside node_modules/hpgl/hpgl.js
. You will find a block similar to this one around line 517. Change the value to a higher number and see if it works.
Object.defineProperty(this, "DEVICE_INIT_DELAY", {
enumerable: true,
writable: false,
value: 150
});
Ok. I increased to 1000. Didn't help...
I'm also getting this error...
Error: Error: Resource busy, cannot open /dev/tty.usbserial-A800I9VI
at Error (native)
events.js:160
throw er; // Unhandled 'error' event
^
Error: Error: Resource busy, cannot open /dev/tty.usbserial-A800I9VI
at Error (native)
~/code/nodeplot
Currently the "error" light on the printer is flashing as soon as I turn it on if it is plugged into my usb.
One more try for the day. I installed an FTDI Driver.
I was able to get a new error now...
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
Warning: Bad communication with the device. Attempting once more.
(node:17418) Warning: Possible EventEmitter memory leak detected. 11 data listeners added. Use emitter.setMaxListeners() to increase limit
Does that change anything?
Adam
You definitely need to install the driver that came with your USB-to-serial cable. The error you are now getting (Warning: Bad communication with the device. Attempting once more.
) means that the device is not answering buffer size request from the library.
It's hard to tell from here what's going on. I have the same device (HP 7475A) and it works fine.
So I'm thinking I need a different cable. Can't remember where this one came from and what driver to use. We'll see if that fixes the problem! I'll let you know.
Okay. I'll close this issue for now. You can always open a new one later.
Thanks for all your help. I really appreciate the project.
What type of cable are you using?
What type of cable are you using?
This is the cable I bought. I got it on Amazon. It was sold under the IOCrest brand but it's the same cable. It uses the Prolific USB-to-Serial chip. You can download the driver on the product's page under download.
By the way, I uploaded a new version which may fix your issue. Try it out before buying a new cable.
I was struggling to get chiplotle working when I thought I would see if anyone had been working on a node implementation of hpgl, this is project is awesome.
I'm running through the readme, trying to get your sample code working. Getting a few errors.
Here is my setup... -HP 7475A Plotters with RS-323 serial port -RS-323 is being converted to usb with a cable, i'm assuming it is a ftdi cable. -I set the pins like this -I'm on a mac, OSX 10.12.4 -Running Node v6.10.2
Here is my code, taken from your readme
When I run
node test.js
, I get the following error.So I look inside the dev folder. True there is no file. But there is a file called
dev/tty.usbserial-A800I9VI
So I altered the transport to reflect this file
var transport = new SerialPort("/dev/tty.usbserial-A800I9VI", {autoOpen: false});
And now when I run the file I get a different error...
Then the error light starts flashing and I have to toggle the power to try again.
Any ideas? Could it be a cable issue? Any help would be greatly appreciated.
Adam