-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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-serialport does not work when run above NW.js #5035
Comments
confirming for OS X El Capitan as well - works in v0.14, but no longer in v0.15 |
@rogerwang may be we should encapsulate chrome serial api,then we can use printer without driver and get more control of printer,and control hardware |
I'm getting the same issue, same circumstances on OSX Yosemite, 10.10.4. |
As a workaround you could use chrome serial api as described in https://developer.chrome.com/apps/serial, samples can be found here https://github.com/GoogleChrome/chrome-app-samples. Or is there any major difference between node serial and chrome serial? |
I am using chrome serial api from a long time it works like a charm. |
@Christywl, I cannot reproduce the issue with a recent revision of NW.js. Would you please help to verify it? I'd like to close the issue if it also works from you side. |
I can connect to the Arduino device on Linux with nwjs-sdk-v0.22.3. |
Operating System and Hardware: Ubuntu Linux 14.04 64 bit
NW.js version: v0.15.4, v0.16.0-beta2
Serialport version: 4.0.0-rc1, 3.1.2
Hello, Node-serialport fails to open serial port from inside application running above NW.js platform .
copy above code to index.html, then run application from same dir:
~/apps/nwjs-sdk-v0.16.0-beta2-linux-x64/nw .
The app would show window with dropdown list, click on "Update serial port list" link to fill the list of available serial ports (this would work), then select "/dev/ttyUSB0" (or other valid device connected to serial port), then click on "Connect device" link to connect to serial port.
On the first connection attempt it would return error event with "true" as err variable value (and it has boolean datatype), the second and all further connection attempt would return error event with err with "unable to lock device" message.
Same code runs just fine when run from command line with regular nodeJS: I am able to communicate device (Arduino), send commands, receive result etc. Getting list of serial ports also works just fine with NW.js.
Tried both with NW.js stable v0.15.4 and with latest v0.16.0-beta2 (sdk download option allows to use built-in debugger when run app).
http://nwjs.io/downloads/
Serialport version: 4.0.0-rc1, 3.1.2 - tried both, both fail
Same report for Node-serialport project
serialport/node-serialport#861
and same problem with Node-serialport+Electron
serialport/node-serialport#838
The text was updated successfully, but these errors were encountered: