WiFi disconnects on first start and then connects on 2nd and works fine

MichaelS
Posts: 29
Joined: Mon Jul 08, 2024 12:08 am

WiFi disconnects on first start and then connects on 2nd and works fine

Postby MichaelS » Thu Aug 01, 2024 7:47 am

Hi

I have an annoying but somewhat cosmetic problem with WiFi on EPS32WROOM using IDF. On startup, the WiFi usually fails to connect first time. It always succeeds on a second attempt and then works reliably.

It just makes for a slow startup while developing and testing.

Logs below, if there is anything I could try to improve this.

Thanks
  1. I (671) WINMain: [APP] Startup..
  2. I (671) WINMain: [APP] Free memory: 277536 bytes
  3. I (671) WINMain: [APP] IDF version: v5.2.2-dirty
  4. W (681) otaAdvanced: Running Application Partition: OTA 0  Name: win  Ver: 0.0.5  Date: Aug  1 2024  Time: 17:45:09
  5. I (741) wifi:wifi driver task: 3ffc0804, prio:23, stack:6656, core=0
  6. I (761) wifi:wifi firmware version: 3e0076f
  7. I (761) wifi:wifi certification version: v7.0
  8. I (761) wifi:config NVS flash: enabled
  9. I (761) wifi:config nano formating: disabled
  10. I (761) wifi:Init data frame dynamic rx buffer num: 32
  11. I (771) wifi:Init static rx mgmt buffer num: 5
  12. I (771) wifi:Init management short buffer num: 32
  13. I (771) wifi:Init dynamic tx buffer num: 32
  14. I (781) wifi:Init static rx buffer size: 1600
  15. I (781) wifi:Init static rx buffer num: 10
  16. I (791) wifi:Init dynamic rx buffer num: 32
  17. I (791) wifi_init: rx ba win: 6
  18. I (791) wifi_init: tcpip mbox: 32
  19. I (801) wifi_init: udp mbox: 6
  20. I (801) wifi_init: tcp mbox: 6
  21. I (801) wifi_init: tcp tx win: 5760
  22. I (811) wifi_init: tcp rx win: 5760
  23. I (811) wifi_init: tcp mss: 1440
  24. I (821) wifi_init: WiFi IRAM OP enabled
  25. I (821) wifi_init: WiFi RX IRAM OP enabled
  26. I (831) wifi_prov_mgr: CC
  27. I (831) wifi_prov_mgr: DD
  28. I (831) WifiApp: Already provisioned, starting Wi-Fi STA
  29. I (841) phy_init: phy_version 4791,2c4672b,Dec 20 2023,16:06:06
  30. I (921) wifi:mode : sta (94:b9:7e:d8:f8:d4)
  31. I (931) wifi:enable tsf
  32. I (931) WifiApp: Waiting for Wi-Fi connection
  33. I (3341) wifi:new:<4,0>, old:<1,0>, ap:<255,255>, sta:<4,0>, prof:1
  34. I (3351) wifi:state: init -> auth (b0)
  35. I (4401) wifi:state: auth -> assoc (0)
  36. I (4411) wifi:state: assoc -> run (10)
  37. I (7541) wifi:state: run -> init (2c0)
  38. I (7551) wifi:new:<4,0>, old:<4,0>, ap:<255,255>, sta:<4,0>, prof:1
  39. I (7551) wifi:new:<1,1>, old:<4,0>, ap:<255,255>, sta:<1,1>, prof:1
  40. I (7551) wifi:state: init -> auth (b0)
  41. I (7561) wifi:state: auth -> assoc (0)
  42. E (7561) wifi:Set status to INIT
  43. I (7561) wifi:state: assoc -> init (2b10)
  44. I (7561) wifi:new:<1,0>, old:<1,1>, ap:<255,255>, sta:<1,1>, prof:1
  45. [b]I (7571) WifiApp: Disconnected. Connecting to the AP again...
  46. I (9991) WifiApp: Disconnected. Connecting to the AP again...[/b]
  47. I (12411) wifi:new:<4,0>, old:<1,0>, ap:<255,255>, sta:<4,0>, prof:1
  48. I (12411) wifi:state: init -> auth (b0)
  49. I (13451) wifi:state: auth -> assoc (0)
  50. I (13461) wifi:state: assoc -> run (10)
  51. I (13481) wifi:connected with simpwifi, aid = 1, channel 4, BW20, bssid = 5c:e9:31:9a:5d:1a
  52. I (13481) wifi:security: WPA3-SAE, phy: bgn, rssi: -43
  53. I (13491) wifi:pm start, type: 1
  54. I (13491) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
  55. I (13581) wifi:AP's beacon interval = 102400 us, DTIM period = 1
  56. [b]I (15001) WifiApp: Connected with IP Address:192.168.1.7[/b]
  57. I (15001) esp_netif_handlers: sta ip: 192.168.1.7, mask: 255.255.255.0, gw: 192.168.1.1
  58. I (15001) WifiApp: WIFI up and running

MicroController
Posts: 1734
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: WiFi disconnects on first start and then connects on 2nd and works fine

Postby MicroController » Mon Aug 05, 2024 11:24 am


Who is online

Users browsing this forum: No registered users and 114 guests