Giter Club home page Giter Club logo

Comments (1)

thepasto avatar thepasto commented on June 3, 2024

I have the same issue, with similar scenario. I'm running archlinux with electron 26.2.1 serialport v12
I can successfully read from serial when running in debug mode via phpstrom debug, but it fails to run in development or production mode.

dev mode output:

serialport/stream opening path: /dev/ttyACM0 +0ms
serialport/bindings-cpp open +2s
serialport/stream _read queueing _read for after open +2ms
serialport/bindings-cpp/poller Creating poller +0ms
serialport/stream opened path: /dev/ttyACM0 +187ms
serialport/stream _write 18 bytes of data +0ms
serialport/bindings-cpp write 18 bytes +189ms
serialport/bindings-cpp/unixWrite Starting write 18 bytes offset 0 bytesToWrite 18 +0ms
serialport/stream _read reading { start: 0, toRead: 65536 } +0ms
serialport/bindings-cpp read +1ms
serialport/bindings-cpp/unixRead Starting read +0ms
serialport/bindings-cpp/unixWrite write returned: wrote 18 bytes +1ms
serialport/bindings-cpp/unixWrite Finished writing 18 bytes +0ms
serialport/stream binding.write write finished +1ms
message written
serialport/bindings-cpp/unixRead read error [Error: EAGAIN: resource temporarily unavailable, read] {
errno: -11,
code: 'EAGAIN',
syscall: 'read'
} +0ms
serialport/bindings-cpp/unixRead waiting for readable because of code: EAGAIN +0ms
serialport/bindings-cpp/poller Polling for "readable" +3ms

With debug enabled

  serialport/stream opening path: /dev/ttyACM0 +0ms
  serialport/bindings-cpp open +6s
  serialport/stream _read queueing _read for after open +2s
  serialport/bindings-cpp/poller Creating poller +0ms
  serialport/stream opened path: /dev/ttyACM0 +1ms
  serialport/stream _write 18 bytes of data +0ms
  serialport/bindings-cpp write 18 bytes +2s
  serialport/bindings-cpp/unixWrite Starting write 18 bytes offset 0 bytesToWrite 18 +0ms
  serialport/stream _read reading { start: 0, toRead: 65536 } +1ms
  serialport/bindings-cpp read +0ms
  serialport/bindings-cpp/unixRead Starting read +0ms
  serialport/bindings-cpp/unixWrite write returned: wrote 18 bytes +3ms
  serialport/bindings-cpp/unixWrite Finished writing 18 bytes +1ms
  serialport/stream binding.write write finished +4ms
  serialport/bindings-cpp/unixRead read error [Error: EAGAIN: resource temporarily unavailable, read] {
  errno: -11,
  code: 'EAGAIN',
  syscall: 'read'
} +1s
  serialport/bindings-cpp/unixRead waiting for readable because of code: EAGAIN +1ms
  serialport/bindings-cpp/poller Polling for "readable" +1s
  serialport/bindings-cpp/poller received "readable" +2ms
  serialport/bindings-cpp/unixRead Starting read +3ms
  serialport/bindings-cpp/unixRead Finished read 29 bytes +0ms
  serialport/stream binding.read finished { bytesRead: 29 } +1s
  serialport/stream _read reading { start: 29, toRead: 65507 } +8s
  serialport/bindings-cpp read +10s
  serialport/bindings-cpp/unixRead Starting read +8s
  serialport/stream #close +6s
  serialport/bindings-cpp close +6s
  serialport/bindings-cpp/poller Stopping poller +14s
  serialport/bindings-cpp/poller Destroying poller +0ms
Data2: <Buffer 52 65 63 65 69 76 65 64 3a 20 50 52 4f 56 41 20 50 52 4f 56 41 20 50 52 4f 56 41 0d 0a>
Readable Buffer: <Buffer 52 65 63 65 69 76 65 64 3a 20 50 52 4f 56 41 20 50 52 4f 56 41 20 50 52 4f 56 41 0d 0a>
  serialport/bindings-cpp/unixRead read error [Error: EAGAIN: resource temporarily unavailable, read] {
  errno: -11,
  code: 'EAGAIN',
  syscall: 'read'
} +6s
  serialport/stream binding.read error BindingsError: Port is not open
    at unixRead (/home/thepasto/workspace/IRIDE/electron-iwcassa2/release/app/node_modules/@serialport/bindings-cpp/dist/unix-read.js:38:23) {
  canceled: true
} +7ms
  serialport/stream _read queueing _read for after open +0ms
  serialport/stream binding.close finished +56ms

Any clue?
If you need more, just ask.

Thanks

from node-serialport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.