Skip to content

ESP32C3 XIAO CircuitPython 8.0.0-beta.4 #7158

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

Closed
WULFFJ opened this issue Oct 30, 2022 · 6 comments
Closed

ESP32C3 XIAO CircuitPython 8.0.0-beta.4 #7158

WULFFJ opened this issue Oct 30, 2022 · 6 comments
Milestone

Comments

@WULFFJ
Copy link

WULFFJ commented Oct 30, 2022

CircuitPython version

ESP32C3 XIAO CircuitPython 8.0.0-beta.4

Code/REPL

N/A Can't upload or doing anything else, so its pointless.

Behavior

Issues:

Timeout error still happening.

Thonny file upload of anything larger than read me locks up from 7-30%. (Edited 10-31-2022 - with building from main some Python scripts can be uploaded but its not consistent. With Beta 4, scripts cannot be uploaded or I didn't try it enough to see if it would do it occasionally).

MUEditor only brings up REPL. Files cannot be uploaded. You have to have it on CircuitPython setting.

ESPWebTool - the newer one will get to the upload portion and freeze.

ESPWebTool (OLD) - You can upload, but its not going to work with anything.

ESPTool gets the most functionality of any solutions to do any of the above. (Edit for clarity - this is the upload method that saw the best results and could occasionally upload with Thonny.)

Can't have anything USB plugged in or any software running besides the one you are using at the time. Must run Thonny or MU in administrator mode in Windows.

Errors -
PROBLEM IN THONNY'S BACK-END: Internal error (serial.serialutil.SerialTimeoutException: Write timeout).
See Thonny's backend.log for more info.
You may need to press "Stop/Restart" or hard-reset your MicroPython device and try again.)

PROBLEM IN THONNY'S BACK-END: Exception while handling 'upload' (thonny.plugins.micropython.mp_back.ProtocolError: Could not complete raw paste).

Description

I have also tried just building the main branch in WSL. The directions leave a bit to the imagination about the rest of the process. Am I supposed to upload just one of the firmware files after it makes? That did not work.

I really need to get this going, if you gave questions, I will be glad to assist.

Additional information

No response

@WULFFJ WULFFJ added the bug label Oct 30, 2022
@dhalbert dhalbert added this to the 8.0.0 milestone Nov 2, 2022
@dhalbert
Copy link
Collaborator

dhalbert commented Nov 2, 2022

Did Thonny used to be able to upload larger files in beta.1 or beta.2?

@WULFFJ
Copy link
Author

WULFFJ commented Nov 4, 2022

Did Thonny used to be able to upload larger files in beta.1 or beta.2?

No. My whole experience with all of this has been terrible. Even when it works, it does nothing reliable. I have had the other Xiao boards and no issues. Its not just Thonny either.

It appears to be something related to pyserial from the error. \serialwin32.py", line 325, in write
raise SerialTimeoutException('Write timeout')

I suspect something with this is causing issues with everything but the flashing of the board. It seems to flash fine on ESPtool or the old online ESP web tool.

Anything uploading causes me issues (Thonny)
Cant ever see the files to upload in MU

Is there any other software for file management or something I can try? I have beat my head for two weeks now with this thing.

if data:
#~ win32event.ResetEvent(self._overlapped_write.hEvent)
n = win32.DWORD()
success = win32.WriteFile(self._port_handle, data, len(data), ctypes.byref(n), self._overlapped_write)
if self._write_timeout != 0: # if blocking (None) or w/ write timeout (>0)
if not success and win32.GetLastError() not in (win32.ERROR_SUCCESS, win32.ERROR_IO_PENDING):
raise SerialException("WriteFile failed ({!r})".format(ctypes.WinError()))

            # Wait for the write to complete.
            #~ win32.WaitForSingleObject(self._overlapped_write.hEvent, win32.INFINITE)
            win32.GetOverlappedResult(self._port_handle, self._overlapped_write, ctypes.byref(n), True)
            if win32.GetLastError() == win32.ERROR_OPERATION_ABORTED:
                return n.value  # canceled IO is no error
            if n.value != len(data):
                raise SerialTimeoutException('Write timeout')
            return n.value

@WULFFJ
Copy link
Author

WULFFJ commented Nov 7, 2022

I have found one of the big issues I was having with the XIAO esp32c3. You have to have the antenna attached for it to work with the webserial. It also seems to have an affect on every other means of interacting with it. I am not sure why this is, but was able to get MU Editor to work pretty consistently. The adafruit webserial works now and is pretty reliable. Thonny is still not working with this.

@WULFFJ WULFFJ closed this as completed Nov 7, 2022
@dhalbert
Copy link
Collaborator

dhalbert commented Nov 7, 2022

I have found one of the big issues I was having with the XIAO esp32c3. You have to have the antenna attached for it to work with the webserial.

!!

@camp-easy
Copy link

why my xiao esp32c3 board doesn't get recognized by mu editor but it's ok with Thonny?

@dhalbert
Copy link
Collaborator

why my xiao esp32c3 board doesn't get recognized by mu editor but it's ok with Thonny?

The ESP32-C3 chip does not have full native USB. It cannot present as the CIRCUITPY USB drive. Mu only works when a USB drive is available. Thonny reads and writes files by sending invisible (to you) commands to the REPL over USB serial.

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

3 participants