no input for repl with dupterm
On my esp32 and the esp8266 port REPL does not seem to ask for input except for slot 0.
webrepl shows output but does not take input. Same if I try to use a second serial port. Same for utelnetserver. Is this a dupterm problem?
Working with the newest micropython commit v1.12-447-gab4e19770-dirty
esp32: Add dupterm polling to mp_hal_stdin_rx_chr
Summary
The ESP32 port's mp_hal_stdin_rx_chr() currently only reads from the local stdin_ringbuf, ignoring any dupterm streams. This means that Python's input() function never receives data from dupterm-based interfaces like WebREPL.
This PR adds a call to mp_os_dupterm_rx_chr() in the main polling loop, consistent with other ports.
Problem
When running a script that uses input() over WebREPL (or any other dupterm stream), the function hangs indefinitely waiting for UART input because the ESP32 port's mp_hal_stdin_rx_chr() never checks the dupterm stream for available characters.
Solution
Add dupterm polling after checking the local ringbuf, matching the pattern used in other ports:
- ports/stm32/mphalport.c - already includes
mp_os_dupterm_rx_chr()check - ports/rp2/mphalport.c - already includes
mp_os_dupterm_rx_chr()check ports/unix/mphalport.c- already includesmp_os_dupterm_rx_chr()check
Testing
Tested with WebREPL over WebSocket on ESP32-P4, confirming that input() now correctly receives and returns user input.