close
The Wayback Machine - https://web.archive.org/web/20201110104236/https://github.com/serialport/node-serialport/issues/1613
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

StopBits support for 1.5 #1613

Open
SVSagi opened this issue Jul 30, 2018 · 0 comments
Open

StopBits support for 1.5 #1613

SVSagi opened this issue Jul 30, 2018 · 0 comments

Comments

@SVSagi
Copy link

@SVSagi SVSagi commented Jul 30, 2018

Summary of Problem

Not able to open port with stopbits as 1.5

I am currently building a desktop client using electron, where the COM port receives data correctly for values: baudRate: 2400, dataBits: 7, stopBits: 1.5, parity: 'none'

I found from the node-serialport documentation, stopBits Must be one of these: 1 or 2. But, should 1.5 be supported as well? especially for old & slow hardware.

I assume stopbits 1.5 is a valid value(https://en.wikipedia.org/wiki/Serial_port#Stop_bits)

I am still able to read data, when stopbits 1 is used, but is not as consistent when tested with 1.5(tested with pyserial)

Steps and Code to Reproduce the Issue

port = new SerialPort("COM1", { baudRate: 2400, dataBits: 7, stopBits: 1.5, parity: 'none'   }, function (err) 
    {
        if(err) 
        {
          console.log(err);//Error: Invalid stop bits setting 2
        }
    });

Package name(s) and version(s)

"serialport": "^6.2.2"
"electron": "~2.0.5"

Node version, Operating System and hardware

Node version: v8.11.3; Operating System: Ubuntu 18.04, Processor: Intel i7

Summary of Problem

When I pass stopbits values as 1.5 with the following options, to open serial port, I get the error:

Error: Invalid stop bits setting 2

{ baudRate: "2400", dataBits: "7", stopBits: "1.5", parity: 'none' }

Steps and Code to Reproduce the Issue

Create a nodejs/electron application and open a serialport connection with stopbits value as 1.5.

@reconbot reconbot added this to the Next milestone Sep 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.