Skip to content

Conversation

@smurfix
Copy link
Contributor

@smurfix smurfix commented Dec 23, 2025

Summary

The esp32 port didn't read any dupterm input.

Testing

Running my MoaT-Micro stack on an ESP32-S3, this patch is required to actually feed data to the REPL.

Signed-off-by: Matthias Urlichs <[email protected]>
@dpgeorge
Copy link
Member

The reason it doesn't read from dupterm here is because the esp32 port (and esp8266) use os.dupterm_notify() instead, which forces a read of the dupterm sources from Python. Eg call that function when it's known that there is input to read.

Probably it should also read dupterm from mp_hal_stdin_rx_chr() as per this PR (and to be consistent with other ports), but it needs some thought as to the consequences of this change.

@smurfix
Copy link
Contributor Author

smurfix commented Dec 31, 2025

Ah. Thanks, that explains a lot.

This is a chicken/egg problem in my case.

I'm using the read (and ioctl+poll) methods of the object I'm hooking into dupterm to run the asyncio loop for a few milliseconds / until there's a character to be read. If asyncio doesn't run, the port doesn't get polled, nothing notices that there's data, thus nobody calls dupterm_notify. Oops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants