Error: 'WiFiUDP' does not name a type WiFiUDP _udp_ota;


#1

Hi there,

It was some time ago that i have updated my openmqttgateway., WOW alot of improvements has been done! First of all thanks guys!

But sadly i came up with an error while compiling to code. I have remove the WiFi folder and have tried the master, v8 and v8.1. Any idea how to solve this ?

     In file included from /home/rolf/Downloads/OpenMQTTGateway/OpenMQTTGateway.ino:130:0:
    /home/rolf/snap/arduino-mhall119/5/.arduino15/packages/arduino/hardware/espressif/arduino-esp32/libraries/ArduinoOTA/src/ArduinoOTA.h:83:5: error: 'WiFiUDP' does not name a type
         WiFiUDP _udp_ota;
         ^
    /home/rolf/Downloads/OpenMQTTGateway/OpenMQTTGateway.ino: In function 'void setup()':
    OpenMQTTGateway:258: error: no matching function for call to 'WiFiClass::macAddress()'
         trc(WiFi.macAddress()); 
                             ^
    In file included from /home/rolf/Downloads/OpenMQTTGateway/OpenMQTTGateway.ino:129:0:
    /snap/arduino-mhall119/5/libraries/WiFi/src/WiFi.h:137:14: note: candidate: uint8_t* WiFiClass::macAddress(uint8_t*)
         uint8_t* macAddress(uint8_t* mac);
                  ^
    /snap/arduino-mhall119/5/libraries/WiFi/src/WiFi.h:137:14: note:   candidate expects 1 argument, 0 provided
    /home/rolf/Downloads/OpenMQTTGateway/OpenMQTTGateway.ino: In function 'void setup_wifi()':
    OpenMQTTGateway:391: error: 'class WiFiClass' has no member named 'mode'
       WiFi.mode(WIFI_STA);
            ^
    OpenMQTTGateway:391: error: 'WIFI_STA' was not declared in this scope
       WiFi.mode(WIFI_STA);
                 ^
    exit status 1
    no matching function for call to 'WiFiClass::macAddress()'

#2

Wait a sec, Ubuntu uses snap to install program and set filesystems to Read Only. WHATTT ??? So I figured out that WiFi folder was still exist… No trying a manual installation of Arduino…


#3

This topic may closed because i have solved the problem by manually install arduino on Ubuntu. Do not install it with snap!