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

Node 12 compatibility #43

Open
zamu87 opened this issue May 17, 2019 · 5 comments
Open

Node 12 compatibility #43

zamu87 opened this issue May 17, 2019 · 5 comments

Comments

@zamu87
Copy link

zamu87 commented May 17, 2019

The version of serialport included in package.json (<7) is not compatible with node 12 and generates a lot of errors during installation. Have you already planned the update of that package?

@dresende
Copy link
Member

No, I use this module quite a lot on arm devices so I need a simpler serialport module. I'm not sure why I added the <7 but perhaps it was because of the errors.

Does version >=7 work with the module?

@zamu87
Copy link
Author

zamu87 commented May 17, 2019

I've not tested it with serialport 7.x because I haven't any serial modbus device but only tcp.

@dresende
Copy link
Member

Then you should be fine without that dependency at all.

@sarat12
Copy link

sarat12 commented Dec 4, 2019

No, I use this module quite a lot on arm devices so I need a simpler serialport module. I'm not sure why I added the <7 but perhaps it was because of the errors.

Does version >=7 work with the module?

I've just tested it with 8.0.5. It mostly works. writeSingleCoil() and writeSingleRegister() look ok, readHoldingRegisters() and readInputRegisters() too. But readCoils() and readDiscreteInputs() are not. They always return array of length Math.ceil(quantity/8)*8 and trails with zeros, so if { address: 1, quantity: 5 } even if all 8 coils are 1s it returns [1,1,1,1,1,0,0,0].

@sarat12
Copy link

sarat12 commented Dec 8, 2019

No, I use this module quite a lot on arm devices so I need a simpler serialport module. I'm not sure why I added the <7 but perhaps it was because of the errors.
Does version >=7 work with the module?

I've just tested it with 8.0.5. It mostly works. writeSingleCoil() and writeSingleRegister() look ok, readHoldingRegisters() and readInputRegisters() too. But readCoils() and readDiscreteInputs() are not. They always return array of length Math.ceil(quantity/8)*8 and trails with zeros, so if { address: 1, quantity: 5 } even if all 8 coils are 1s it returns [1,1,1,1,1,0,0,0].

hmm.. I've switched back to 7 and i see the same. Is that expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants