No Info In REPL

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Posts: 1
Joined: Fri Jan 24, 2020 2:19 pm

No Info In REPL

Post by mwhit » Fri Jan 24, 2020 2:38 pm

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.

Posts: 42
Joined: Tue Apr 17, 2018 4:37 pm

Re: No Info In REPL

Post by fstengel » Fri Jan 24, 2020 7:54 pm

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.

User avatar
Posts: 1170
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: No Info In REPL

Post by jimmo » Mon Jan 27, 2020 4:06 am

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).

Post Reply