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

Unable to set dtr: true on Linux since upgrade to v9.0.7 (other platforms unaffected) #2239

Closed
GazHank opened this issue Apr 25, 2021 · 2 comments

Comments

@GazHank
Copy link
Contributor

GazHank commented Apr 25, 2021

Summary of Problem

(Please answer all 3)

  • What are you trying to do? set dtr: true, pause then set dtr: false in order to invoke a bootloader mode
  • What happens? On Linux since version v9 no dtr setting change occurs, it works fine on v8.0.8; and works correctly on win10 for both v9 and v8
  • What should have happened? setting dtr true works successfully on windows and mac using v9, however it only seems to work on Linux up to v8.0.8

Code to Reproduce the Issue

const port = new SerialPort(path)

<code to connect to the relevant port>

port.set({ dtr: true }, async () => {
  await this.delay(1000);
  port.set({ dtr: false }, async () => {
    console.log("waiting for bootloader");
    ...<code to detect bootloader status or error out>...
  }
}

Versions, Operating System and Hardware

  • SerialPort@v9 (works on v8)
  • Node.js v14
  • Linux Ubuntu 20.04.2 LTS 64bit (works on Windows & Mac) - I've also had similar reports from others running other linux distros
  • Hardware and chipset? (attempting to send dtr to arduino:samd)
@GazHank
Copy link
Contributor Author

GazHank commented Apr 28, 2021

It appears that any attempt to set dtr on Linux with Serialport v9 results in a port error "Error: Error: Operation not supported, cannot set". The exact same operation works on v8 (up to and including 8.0.8). It also works correctly on WIndows 10 for both v8 and v9.

I've created a tweaked version of the electron-serialport example to demonstrate the issue

version info with issues:

  • Node.js 14.16.0
  • Chromium 89.0.4389.128
  • Electron 12.0.5
  • Serialport 9.0.7

version info without issues:

  • Node.js 14.16.0
  • Chromium 89.0.4389.128
  • Electron 12.0.5
  • Serialport 8.0.8

@GazHank GazHank changed the title Unable to set dtr: true on Linux since upgrade to v9 (other platforms unaffected) Unable to set dtr: true on Linux since upgrade to v9.0.7 (other platforms unaffected) Apr 29, 2021
@GazHank
Copy link
Contributor Author

GazHank commented Apr 29, 2021

Closing this issue as #2240 more clearly explains the issue

@GazHank GazHank closed this as completed Apr 29, 2021
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

1 participant