Page 1 of 1

ESP32 possibly crashes ; python reports error

Posted: Tue Jun 27, 2017 4:25 am
by jaybnair
when I do make monitor, after some logs from my program, I am getting the following crash log. May be ESP32 crashed or has become unresponsive. Any idea what might have happened and if there is any crash, how to debug it? This is with my linux based ESP32 tool chain.



--- exit ---
Exception in thread rx:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyserial-3.3-py2.7.egg/serial/tools/miniterm.py", line 445, in reader
data = self.serial.read(self.serial.in_waiting or 1)
File "/usr/local/lib/python2.7/dist-packages/pyserial-3.3-py2.7.egg/serial/serialposix.py", line 501, in read
'device reports readiness to read but returned no data '
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

Thanks
Jay

Re: ESP32 possibly crashes ; python reports error

Posted: Tue Jun 27, 2017 4:44 am
by ESP_Angus
Hi Jay,

Usually errors like this means something went wrong with the USB/serial converter.

It can mean any/all of:
  • Brownout problem due to current draw making the converter chip's power supply droop.
  • Bad USB cable.
  • Bad USB hub or something with the USB host.
It looks like from the crash like you're on Linux. You can check the kernel log to see if anything happened with the USB/Serial converter around the time of this error.

Re: ESP32 possibly crashes ; python reports error

Posted: Tue Jun 27, 2017 6:47 am
by jaybnair
Thank you very much.
That was indeed a great help.

Following your recommendation,
I saw the host (linux m/c) log and saw that USB was getting disconnected and re-attached.

And based on your cue on current draw, I connected the USB hub to a powersupply ( It was always connected, but the *blasted* switch was off!) and I no longer get to this issue.
So, at some point of execution, my device (which was also connected to the same hub as ESP32) drew greater current and the host USB port got reset!

Thanks again...