-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Can't connect ESP32 #38
Comments
I am unable to reproduce; the examples work fine for me on an esp32. As a debugging step, what does the following do for you:
It should look like:
|
That's strange... I get: (buxr) ➜ ~ python -m serial.tools.miniterm /dev/tty.usbserial-0001 115200
--- Miniterm on /dev/tty.usbserial-0001 115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
MicroPython v1.19.1 on 2022-06-18; ESP32 module with ESP32
Type "help()" for more information.
>>>
raw REPL; CTRL-B to exit
> I'm still unable to connect though Belay only. I'm in a conda environment, but I don't think that should make any difference. |
I see the ports fine too: from serial.tools import list_ports
working_serial = []
for port in list(list_ports.comports()):
working_serial.append(port.device)
print(working_serial)
# ['/dev/cu.BLTH', '/dev/cu.Bluetooth-Incoming-Port', '/dev/cu.usbserial-0001', '/dev/cu.SLAB_USBtoUART'] I am connecting it to a external USB hub. |
Figured it out! It is a speed problem - adding
0.5 seconds is not enough - 1 second does the trick. Apparently I wasn't the only one who's had the issue, see the same issue with ampy: scientifichackers/ampy#19 (comment). |
glad you found a solution! Right now I'm trying to think of a generic solution, and I think there are 2 paths: Option 1: Figure out why
does not end with Option 2 (backup): If we cannot get option 1 working, what are your thoughts if I add an additional kwarg
I'd be hesitent to hard program in a value because:
|
I think I understand the problem a little better now; does your current setup have a |
I actually do reach the 10s timeout, so it isn’t reading anything. What happens is beyond me. I think the second solution is a good one, especially, as you say, you’re unable to reproduce the error and I also wouldn’t want to hardcode such a long sleep in. And since it’s still an issue both in |
Maybe just call the argument |
Nope, there’s no |
sounds good, here are a few more thoughts:
EDIT: fixed command in (2) |
I think I did try with |
took care of (1) in #39, will wait on your response for implementing the fix for this delay issue. |
Alright, back at it. |
excellent!! so last test, does everything still work if you comment out the while loop above it? So your code should look like:
If that works, thats the solution we'll go with, and the action items will be:
If you're comfortable, I'd suggest you make the PR for (1) here and (2). However, if you don't want to, I'd be more than happy to. EDIT: unfortunately, waiting for ">>>" doesn't reliably work in my setup; I'll try and come up with a PR that works for me and I think will work for you, and you can test it. |
alright @roaldarbol , I think I solved it; give #41 a try. If it works for you, I'll merge it and make a PR to upstream micropython. |
Really neat @BrianPugh! I'll test first thing in the morning (I'm on London time). |
Fixed with #41. |
I'm testing out an ESP32 (yesterday I worked on a RPi Pico), and I am getting errors connecting it with Belay. It seemingly fails in
Pyboard
, however if I connect thorughPyboard
directly, it works.Before the error it seems to print:
b'MicroPython v1.19.1 on 2022-06-18; ESP32 module with ESP32\r\nType "help()" for more information.\r\n>>> '
The text was updated successfully, but these errors were encountered: