Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.5 does not work the same as the previous release #367

Closed
kyledrake opened this issue Aug 4, 2014 · 7 comments
Closed

1.4.5 does not work the same as the previous release #367

kyledrake opened this issue Aug 4, 2014 · 7 comments

Comments

@kyledrake
Copy link

With the 1.4.5 release, I'm no longer able to send data to the serial port with the same config! Not sure how to go about debugging it.

Ubuntu 14.04, node v0.10.28, 64 bit

@voodootikigod
Copy link
Collaborator

Anyway I can replicate locally?

On Monday, August 4, 2014, Kyle Drake notifications@github.com wrote:

With the 1.4.5 release, I'm no longer able to send data to the serial port
with the same config! Not sure how to go about debugging it.

Ubuntu 14.04, node v0.10.28, 64 bit


Reply to this email directly or view it on GitHub
#367.

Chris Williams

@voodootikigod http://twitter.com/voodootikigod | GitHub
http://github.com/voodootikigod

Maker of Improbable Things: JSConf http://jsconf.com/ | RobotsConf
http://robotsconf.com/ | Beer.js http://beerjs.com | Logo.js
https://github.com/voodootikigod/logo.js | node-serialport
http://nodebots.io/

@kyledrake
Copy link
Author

I'm programming a bill acceptor, so not really, unfortunately. Apologies for the rather useless report. I'm using 1.4.2 for now, and that seems to work fine.

@kyledrake
Copy link
Author

Basically, with 1.4.5 I can send data, but the acceptor doesn't seem to get it, and I don't receive anything in response. I think it's a problem with writing to the serial port.

@paulsouche
Copy link

Similar problem here. I'm programming a monetic devices driver and I can't get it work since 1.4.5.

Windows 7 service Pack 1, node 0.10.26, 64 bit

I get an error when I try to write a String on the port. Code :

var sp = new SerialPort('COM1', {
    baudrate: 1200,
    dataBits: 7,
    stopBits: 1,
    parity: 'even',
    disconnectedCallback:function() {}
});

sp.write(String.fromCharCode(2,51,3,48),function() {});

Then I'm waiting an agreement of the device but it respond with an "not aknowledge" statement. Something must be different on the com : all works fine with 1.3.1 (can't get further version).

I'm wondering if this is not an encoding problem... I tried make a Buffer of my String and every encodings ('ascii','binary',...) with no success.

But I saw a difference in the serialPort Constructor of 1.4.5 :

if (process.platform !== 'win32') {
    // All other platforms:
    this.fd = null;
    this.paused = true;
    this.bufferSize = options.bufferSize || 64 * 1024;
    this.readable = true;
    this.reading = false;

    if (options.encoding) {
        this.setEncoding(this.encoding);
    }
}

We can set an encoding on others platforms ? How is it used in the binding ?

Hope I helped. Thanks

@voodootikigod
Copy link
Collaborator

@paulsouche Encoding should be handled in the parser that you select. This will simply emit the raw binary data and allow the parser to handle the encoding component ( see readline parser for example: https://github.com/voodootikigod/node-serialport/blob/master/parsers.js#L13 ) This change was an issue that was left in accidently. Any chance you can create a test case that allows me to recreate the issue locally OR ping me on IM/Skype (same handle - voodootikigod) and I can help out.

@voodootikigod
Copy link
Collaborator

@kyledrake can you ping me on IM voodootikigod and lets see if we can get it fixed up!

@reconbot
Copy link
Member

Hey, let us know if we can still help or how this worked out! Closing the issue for now.

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants