Page 1 of 1

No Info In REPL

Posted: Fri Jan 24, 2020 2:38 pm
by mwhit
Youtube videos I watch on using MicroPython with ESP32 show feedback when commands like "import network" are issued in the REPL. I just get the ">>>" prompt back. It appears that the import statement works just fine, but I just can't figure out why stuff like "I (65199) wifi: wifi firmware version : f092575" isn't being shown. Does it possibly have to do with the esp.osdebug value? I have seen information on how to turn off detailed feedback by using esp.osdebug(None), but haven't found anything on how to turn it on.

Re: No Info In REPL

Posted: Fri Jan 24, 2020 7:54 pm
by fstengel
As far as I can say this function is not documented. However, looking in the source code one can see that currently the esp32 port of the esp module deals with the log level by declaring
  • The function esp.osdebug which can have one or two arguments. With one argument, only the value None is recognized: it sets the log level to only show errors. With two arguments, only the second is used and sets the log level.
  • Six constants esp.LOG_NONE, esp.LOG_ERROR, esp.LOG_WARNING, esp.LOG_INFO, esp.LOG_DEBUG and esp.LOG_VERBOSE describing the log level
A commented line explains that in the future, the first and currently unused argument when not None is supposed to be used to indicate where to send the errors.

Re: No Info In REPL

Posted: Mon Jan 27, 2020 4:06 am
by jimmo
I think there were some recent-ish changes to cut down the amount of spurious logging from the IDF on ESP32. So it's possible the youtube videos are running older versions. I seem to remember was some difficulty disabling some of it (and some bugfixes in the IDF).

(Other ports don't show this information).