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

Exception on port already open #49

Open
practicalusage opened this issue Jan 8, 2025 · 0 comments
Open

Exception on port already open #49

practicalusage opened this issue Jan 8, 2025 · 0 comments

Comments

@practicalusage
Copy link

I get this exception when I do cen-gnd or power on off the device:

Going to open port: COM3.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Got exception: System.UnauthorizedAccessException: Access to the port is denied.
at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.SerialStream.get_BytesToRead()
at System.IO.Ports.SerialPort.get_BytesToRead()
at BK7231Flasher.BK7231Flasher.Start_Cmd(Byte[] txbuf, Int32 rxLen, Single timeout)!
Exception caught: System.InvalidOperationException: The port is closed.
at System.IO.Ports.SerialPort.get_BytesToRead()
at BK7231Flasher.BK7231Flasher.consumePending()
at BK7231Flasher.BK7231Flasher.Start_Cmd(Byte[] txbuf, Int32 rxLen, Single timeout)
at BK7231Flasher.BK7231Flasher.linkCheck()
at BK7231Flasher.BK7231Flasher.getBus()
at BK7231Flasher.BK7231Flasher.doGetBusAndSetBaudRate()
at BK7231Flasher.BK7231Flasher.doGenericSetup()
at BK7231Flasher.BK7231Flasher.doReadInternal(Int32 startSector, Int32 sectors)
at BK7231Flasher.BK7231Flasher.doRead(Int32 startSector, Int32 sectors)
There was no result to save.

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

1 participant