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
Hello everyone, I am having a problem trying to connect with my m5stickC, someone knows how to start it, thanks in advance and for all the help you can give me ... #1509
Comments
I've already tried a thousand ways and there's no way to make it work. If anyone knows how to help me, I would appreciate it. Thanks in advance. |
Do you get error messages? If yes, then please copy them here, together with stacktraces. |
Oh, sorry, I didn't notice your stacktraces before. Your problems looks similar to #1461. I have some remedy planned for next Thonny version. In the meanwhile you could try an older Thonny version: https://github.com/thonny/thonny/releases/tag/v3.2.7 |
I think the problem is one of the echoes, they do not match. |
I have eliminated all the comparisons and exceptions and it worked, but of course this is not a solution, and also the recording still does not work. |
I'm going to try the version you told me, and I check if it works. |
Version 3.2.7 works. I've been testing and it works. 👍 |
Another thing, when it is executed again, it is not waiting for the stop and generates the following error: |
Example the program:
|
Thank you for the feedback! I hope to release 3.3.2 in two weeks. |
Just FYI I have the same issue with M5StickC and M5StickC-Plus. Reverting to 3.2.7 |
Can you confirm that you have this configuration? |
Hello fraramon, yes that's exactly my configuration, with USB Serial Port (Com 3) on Windows 10 Home. It works in USB mode for me. As always when Thonny is started the M5StickC is busy and I need to interrupt it with Ctrl-F2. At first it wouldn't run my usual python file because lcd had disappeared from m5stack. But after a few tries lcd reappeared (weird, huh?) and it has worked fine since. Before: After: BTW, I am sure you know this, but you have to set the Stick up for USB mode before you connect it, right? You press the power on button for a couple of secs and then quickly press the M5 button to enter set up mode. Then use the side button to navigate and select USB connection mode. |
You can do the following test: |
Reset the device with the left button. |
So I turn it on, quickly press M5, then the side button twice to get to file list and select temp.py It says "This file from web exec" - the USB connection to Thonny works and I am able to run my python file from there. |
Only difference from your instructions is that I turn it off then on and had Thonny already running when I did what you suggested |
ok, But it is just an example with no while holding the program. |
The important thing is to select a program that does not end in an infinite loop. |
But that is already running your code. |
if your program ends in an infinite loop, to cut it you must use Ctrl-C. |
Ctrl-C should be run every time a program is started, but automatically, so that we can develop quickly. |
Should be fixed under #1516, will be released in Thonny 3.3.2 (hopefully in a week). Please reopen, if you are still having same problem in Thonny 3.3.2 |
Ok, thank you very much. 👍 |
3.3.2 works for me now, thanks. |
3.3.2 works for me now, thanks. |
In 3.3.3 the same problem (with echoes) still exists. After CTRL+C I can upoad file |
@macraj, can you paste your error? |
The configuration that I am using is the following:
The error that is occurring is the following:
MicroPython 7e31c2ada-dirty on 2020-12-04; M5StickC-Plus with ESP32
Type "help()" for more information.
ERROR thonny.plugins.micropython.backend: Crash in backend
Traceback (most recent call last):
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\connection.py", line 44, in read
self._read_buffer.extend(self._read_queue.get(True, timer.time_left))
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\queue.py", line 178, in get
raise Empty
_queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 130, in init
self._prepare(clean)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 149, in _prepare
self._prepare_helpers()
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 196, in _prepare_helpers
self._execute_without_output(script)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 544, in _execute_without_output
out, err = self._execute(script, capture_output=True)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 518, in _execute
self._execute_with_consumer(script, consume_output)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\bare_metal_backend.py", line 548, in _execute_with_consumer
self._submit_code(script)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\bare_metal_backend.py", line 524, in _submit_code
self._connection.read_all_expected(expected_echo, timeout=WAIT_OR_CRASH_TIMEOUT)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\connection.py", line 115, in read_all_expected
actual = self.read(len(expected), timeout=timeout)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\connection.py", line 49, in read
raise TimeoutError("Reaction timeout. Bytes read: %s" % self._read_buffer)
TimeoutError: Reaction timeout. Bytes read: bytearray(b'method\n def print_mgmt_value(obj):\n print('', repr(obj), '', sep='', end='')\n\n @staticmethod\n def repr(obj):\n try:\n s = repr(obj)\n if en(s) > 1000:\n s = s[:1000] + "..."\n ')
Traceback (most recent call last):
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\connection.py", line 44, in read
self._read_buffer.extend(self._read_queue.get(True, timer.time_left))
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\queue.py", line 178, in get
raise Empty
_queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 130, in init
self._prepare(clean)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 149, in _prepare
self._prepare_helpers()
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 196, in _prepare_helpers
self._execute_without_output(script)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 544, in _execute_without_output
out, err = self._execute(script, capture_output=True)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\backend.py", line 518, in _execute
self._execute_with_consumer(script, consume_output)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\bare_metal_backend.py", line 548, in _execute_with_consumer
self._submit_code(script)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\bare_metal_backend.py", line 524, in _submit_code
self._connection.read_all_expected(expected_echo, timeout=WAIT_OR_CRASH_TIMEOUT)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\connection.py", line 115, in read_all_expected
actual = self.read(len(expected), timeout=timeout)
File "C:\Users\fran2\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\connection.py", line 49, in read
raise TimeoutError("Reaction timeout. Bytes read: %s" % self._read_buffer)
TimeoutError: Reaction timeout. Bytes read: bytearray(b'method\n def print_mgmt_value(obj):\n print('', repr(obj), '', sep='', end='')\n\n @staticmethod\n def repr(obj):\n try:\n s = repr(obj)\n if en(s) > 1000:\n s = s[:1000] + "..."\n ')
Backend terminated or disconnected. Use 'Stop/Restart' to restart.
The text was updated successfully, but these errors were encountered: