Micropython: Disabling REPL on ESP32

Created on 13 Jun 2019  路  5Comments  路  Source: micropython/micropython

Can we disable REPL on ESP32 for security purposes?
I don't want the main.py to be accessed through REPL.

port-esp32

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.

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonsmirl picture jonsmirl  路  4Comments

adritium picture adritium  路  3Comments

nickzoic picture nickzoic  路  3Comments

rolandvs picture rolandvs  路  3Comments

poesel picture poesel  路  5Comments