Skip to content

error: 'SYSTEM_EVENT_STA_DISCONNECTED' was not declared in this scope; did you mean 'WIFI_EVENT_STA_DISCONNECTED'? #303

Open
@lboue

Description

@lboue

Hello,
I am facing the following building error with FullyFeatured-ESP32.ino. I think it's linked to events changes with arduino-esp32-3.0 branch.

D:\Dev\Arduino\Elecrow\CrowPanel_7.0\AsyncMqttClientTest\AsyncMqttClientTest\AsyncMqttClientTest.ino: In function 'void WiFiEvent(arduino_event_id_t)':
D:\Dev\Arduino\Elecrow\CrowPanel_7.0\AsyncMqttClientTest\AsyncMqttClientTest\AsyncMqttClientTest.ino:36:10: error: 'SYSTEM_EVENT_STA_GOT_IP' was not declared in this scope; did you mean 'IP_EVENT_STA_GOT_IP'?
   36 |     case SYSTEM_EVENT_STA_GOT_IP:
      |          ^~~~~~~~~~~~~~~~~~~~~~~
      |          IP_EVENT_STA_GOT_IP
D:\Dev\Arduino\Elecrow\CrowPanel_7.0\AsyncMqttClientTest\AsyncMqttClientTest\AsyncMqttClientTest.ino:42:10: error: 'SYSTEM_EVENT_STA_DISCONNECTED' was not declared in this scope; did you mean 'WIFI_EVENT_STA_DISCONNECTED'?
   42 |     case SYSTEM_EVENT_STA_DISCONNECTED:
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |          WIFI_EVENT_STA_DISCONNECTED

Using library WiFi at version 2.0.0 in folder: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\WiFi 
Using library Networking at version 1.0.0 in folder: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\Network 
Using library AsyncMqttClient at version 0.9.0 in folder: D:\Dev\Arduino\Elecrow\CrowPanel_7.0\HA\libraries\AsyncMqttClient 
Using library AsyncTCP at version 1.1.4 in folder: D:\Dev\Arduino\Elecrow\CrowPanel_7.0\HA\libraries\AsyncTCP 
exit status 1

Compilation error: 'SYSTEM_EVENT_STA_GOT_IP' was not declared in this scope; did you mean 'IP_EVENT_STA_GOT_IP'?

Boot logs

21:59:00.181 -> ------------------------------------------
21:59:00.181 -> Software Info:
21:59:00.181 -> ------------------------------------------
21:59:00.181 ->   Compile Date/Time : Jun  5 2024 20:42:36
21:59:00.181 ->   Compile Host OS   : windows
21:59:00.181 ->   ESP-IDF Version   : v5.1.4-51-g442a798083-dirty
21:59:00.181 ->   Arduino Version   : 3.0.1
21:59:00.181 -> ------------------------------------------
21:59:00.181 -> Board Info:
21:59:00.181 -> ------------------------------------------
21:59:00.215 ->   Arduino Board     : ESP32S3_DEV
21:59:00.215 ->   Arduino Variant   : esp32s3
21:59:00.215 ->   Arduino FQBN      : esp32:esp32:esp32s3:UploadSpeed=921600,USBMode=hwcdc,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=debug,PSRAM=opi,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default
21:59:00.254 -> ============ Before Setup End ============

Could you help me to fix it?

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions