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

Device Monitor crashes when device is disabled #4292

Closed
zfields opened this issue May 24, 2022 · 3 comments
Closed

Device Monitor crashes when device is disabled #4292

zfields opened this issue May 24, 2022 · 3 comments

Comments

@zfields
Copy link

zfields commented May 24, 2022

Temporary solution

Please take a look at the advanced seral monitor named CoolTerm.


I have a target device that "goes to sleep" by being externally disabled via the EN pin. When my device is disabled, the serial monitor crashes.

This is unfortunate, because I cannot connect to a port that is not open (i.e. a disabled device). I have no way to connect to the device unless it is running, which means I will miss all the startup logs.

I need the monitor to gracefully handle the loss of connection, await for the device to reappear, and reestablish the connection.

@ghost
Copy link

ghost commented May 24, 2022

Exception in thread rx:
Traceback (most recent call last):
  File "/Users/michelle/.platformio/penv/lib/python3.8/site-packages/serial/serialposix.py", line 575, in read

--- exit ---
    buf = os.read(self.fd, size - len(read))
OSError: [Errno 6] Device not configured

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/michelle/.platformio/penv/lib/python3.8/site-packages/serial/tools/miniterm.py", line 499, in reader
    data = self.serial.read(self.serial.in_waiting or 1)
  File "/Users/michelle/.platformio/penv/lib/python3.8/site-packages/serial/serialposix.py", line 581, in read
    raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: [Errno 6] Device not configured

@ivankravets ivankravets transferred this issue from platformio/platformio-vscode-ide May 25, 2022
@ivankravets
Copy link
Member

I updated this issue with a temporary solution. I'm not sure that we can fix this on our side. A related issue #3939

@ivankravets
Copy link
Member

Duplicate of #3939

@ivankravets ivankravets marked this as a duplicate of #3939 Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants