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

Cannot open port after upgrading from 2.10.2 to 2.11.0 #562

Open
NorbertSandor opened this issue May 30, 2024 · 3 comments
Open

Cannot open port after upgrading from 2.10.2 to 2.11.0 #562

NorbertSandor opened this issue May 30, 2024 · 3 comments

Comments

@NorbertSandor
Copy link

NorbertSandor commented May 30, 2024

OS: Ubuntu 22.04.4 LTS
Arch: x86_64
Java: 11.0.23-tem

I try to connect to Arduino Mega boards using openPort().

With 2.11.0 I get the error: lastErrorCode=25, lastErrorLocation=768
I also retry opening the port 3-times but all of these attempts result in the above error.

It works with 2.10.2 (although only if I call flushIOBuffers() before openPort() - I don't know why it is necessary :( )

The reason for upgrading (besides keeping the dependencies up-to-date) is that recently we experienced instability with the USB-serial devices. E.g. after successfully running our software, then restarting it, the serial ports fail to connect. In this case only unplugging and replugging the USB cables, OR sometimes only restarting the whole computer helps :(

@NorbertSandor
Copy link
Author

It also fails with 2.10.4: lastErrorCode=25, lastErrorLocation=758

Is it the native source code line I should at?

if (setConfigOptions(port->handle, baudRate, &options))

Serial port options:

serialPort = {com.fazecast.jSerialComm.SerialPort@14630} "Serial Device (acm)"
 androidPort = null
 portHandle = 0
 baudRate = 76800
 dataBits = 8
 stopBits = 1
 parity = 0
 eventFlags = 0
 timeoutMode = 0
 readTimeout = 0
 writeTimeout = 0
 flowControl = 0
 sendDeviceQueueSize = 4096
 receiveDeviceQueueSize = 4096
 vendorID = 9025
 productID = 66
 safetySleepTimeMS = 200
 rs485DelayBefore = 0
 rs485DelayAfter = 0
 xonStartChar = 17
 xoffStopChar = 19
 userDataListener = null
 serialEventListener = null
 comPort = "/dev/ttyACM1"
 friendlyName = "Serial Device (acm)"
 portDescription = "Serial Device (acm)"
 portLocation = "1-6.2"
 serialNumber = "7593231383835111D0B0"
 eventListenerRunning = false
 disableConfig = false
 disableExclusiveLock = false
 rs485Mode = false
 rs485ActiveHigh = true
 rs485RxDuringTx = false
 rs485EnableTermination = false
 isRtsEnabled = true
 isDtrEnabled = true
 autoFlushIOBuffers = false
 requestElevatedPermissions = false

@NorbertSandor
Copy link
Author

2.10.3 also fails... so the last release version which works is 2.10.2.

@phillipscheng
Copy link

I am experiencing this issue as well, but I have isolated it to only being a problem on some machines. My raspberry pi machines experience the issue, but the Windows devices do not.

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

No branches or pull requests

2 participants