Can we disable REPL on ESP32 for security purposes?
I don't want the main.py to be accessed through REPL.
See this forum thread -- https://forum.micropython.org/viewtopic.php?t=6482
That's for ESP8266, but the ESP32 is much the same, have a look at mp_task() in ports/esp32/main.c
uos.dupterm(None, 1) would be the way to do it but at this moment the esp32 port doesn't use dupterm to configure the REPL UART (it's hard coded). This would be good to fix, to make it like the esp8266.
Thank you @jimmo and @dpgeorge I'll look into it.
@hetvishah08 hallo, Could u please tell me how to do it?I have the same need like yours.
I also have this problem.
Would it be enough to uncomment uart_init() in mp_task()?
I really need serial communcation through USB.
Most helpful comment
uos.dupterm(None, 1)would be the way to do it but at this moment the esp32 port doesn't use dupterm to configure the REPL UART (it's hard coded). This would be good to fix, to make it like the esp8266.