How does one suppress WiFi diagnostic output?

wevets
Posts: 112
Joined: Sat Mar 09, 2019 2:56 am

How does one suppress WiFi diagnostic output?

Postby wevets » Wed Jul 29, 2020 3:33 am

I've written some code that POSTs using the ESP32 HTTP client. When I send a post, however, much diagnostic info is sent to the terminal. The code is working so I no longer need the diagnostics. How do I suppress the diagnostic info, which when I use the idf monitor, looks like:
  1. I (5470) wifi:wifi driver task: 3ffc1d14, prio:23, stack:3072, core=0
  2. I (11311) wifi:wifi firmware version: aa5336b
  3. I (11311) wifi:config NVS flash: enabled
  4. I (11311) wifi:config nano formating: enabled
  5. I (11311) wifi:Init dynamic tx buffer num: 32
  6. I (11311) wifi:Init data frame dynamic rx buffer num: 32
  7. I (11321) wifi:Init management frame dynamic rx buffer num: 32
  8. I (11321) wifi:Init management short buffer num: 32
  9. I (11331) wifi:Init static rx buffer size: 1600
  10. I (11331) wifi:Init static rx buffer num: 10
  11. I (11341) wifi:Init dynamic rx buffer num: 32
  12. I (11441) wifi:mode : sta (a4:cf:12:0a:8e:f0)
  13. I (11561) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
  14. I (12541) wifi:state: init -> auth (b0)
  15. I (12541) wifi:state: auth -> init (8a0)
  16. I (12541) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
  17. I (14711) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
  18. I (14711) wifi:state: init -> auth (b0)
  19. I (14721) wifi:state: auth -> assoc (0)
  20. I (14721) wifi:state: assoc -> run (10)
  21. I (14761) wifi:connected with <my SSID>, aid = 1, channel 1, BW20, bssid = ec:aa:a0:33:df:b8
  22. I (14761) wifi:security: WPA2-PSK, phy: bgn, rssi: -52
  23. I (14771) wifi:pm start, type: 1
  24.  
  25. I (14771) wifi:AP's beacon interval = 102400 us, DTIM period = 1
  26. I (18251) wifi:state: run -> init (0)
  27. I (18251) wifi:pm stop, total sleep time: lu us / lu us
  28.  
  29. I (18261) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
  30. I (18291) wifi:flush txq
  31. I (18291) wifi:stop sw txq
  32. I (18291) wifi:lmac stop hw txq
  33. I (18291) wifi:Deinit lldesc rx mblock:10
I can't find a place in menuconfig that addresses this, though I've found ways to suppress other bootloader log output. Is there a way to suppress this? If so, how.

Thanks.

istokm
Posts: 27
Joined: Thu Jun 25, 2020 12:11 pm

Re: How does one suppress WiFi diagnostic output?

Postby istokm » Wed Jul 29, 2020 8:38 am

Indeed this is not a menuconfig option as far as I know. You'll want to read through this: https://docs.espressif.com/projects/esp ... is-library.
But the TL;DR is that you can change the logging verbosity of different ESP modules like this:

Code: Select all

esp_log_level_set("*", ESP_LOG_ERROR);        // set all components to ERROR level
esp_log_level_set("wifi", ESP_LOG_WARN);      // enable WARN logs from WiFi stack
esp_log_level_set("dhcpc", ESP_LOG_INFO);     // enable INFO logs from DHCP client

wevets
Posts: 112
Joined: Sat Mar 09, 2019 2:56 am

Re: How does one suppress WiFi diagnostic output?

Postby wevets » Tue Aug 04, 2020 3:39 pm

Marek Ištok

Thanks. Your suggestion worked perfectly in my code.

Who is online

Users browsing this forum: No registered users and 187 guests