Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Compile errors #2

Open
justoke opened this issue Jan 2, 2020 · 4 comments
Open

Compile errors #2

justoke opened this issue Jan 2, 2020 · 4 comments

Comments

@justoke
Copy link

justoke commented Jan 2, 2020

Hi

This project looks interesting. I have been trying to run some of the examples but as yet can't compile them. Possibly breaking changes in the referenced libraries.

I'll try work through them but this is what I am encountering at the moment. Using Windows 10 and PlatformIO.

In file included from .pio/libdeps/esp32dev/ESPAsyncWiFiManager/ESPAsyncWiFiManager.h:24:0,
                 from .pio/libdeps/esp32dev/ESPSecureBase/src/ESPSecureBase.h:4,
                 from src\main.cpp:3:
.pio/libdeps/esp32dev/ESP Async WebServer/src/ESPAsyncWebServer.h:412:27: error: 'AcSSlFileHandler' has not been declared
     void onSslFileRequest(AcSSlFileHandler cb, void* arg);
                           ^
src\main.cpp: In function 'void reconfig()':
src\main.cpp:70:29: error: 'class ESBWifiConfig' has no member named 'reconfig'
     bool saved = wifiConfig.reconfig(CONF_CONN_TIMEOUT, CONF_PORTAL_TIMEOUT);
                             ^
*** [.pio\build\esp32dev\src\main.cpp.o] Error 1
@justoke
Copy link
Author

justoke commented Jan 2, 2020

Seems AcSSlFileHandler not supported on ESP32 as per this issue

in mqtt.cpp had to comment out setSecure and setPsk

// config server and security
    uint16_t port = (uint16_t)atoi(config->mqtt_port);
    mqttClient.setServer(config->mqtt_server, port);
    //mqttClient.setSecure(true);

    char psk[5]; strncpy(psk, config->mqtt_psk, 4); psk[4] = 0;
    printf("MQTT connecting to %s:%d (%s,%s...)\n",
            config->mqtt_server, port, config->mqtt_ident, psk);
    //mqttClient.setPsk(config->mqtt_ident, config->mqtt_psk);

reconfig

See this is commented out with reference to some issue with it

With so many library dependencies this might present some challenges to creating a simple and secure OTA base. Still it is worthwhile to try.

@tve
Copy link
Owner

tve commented Jan 6, 2020

I just pushed my latest version, which has a number of improvements. The errors you encountered are because I use TLS and the PSK ciphersuites with some libraries that don't officially support them yet. I have PRs pending but it's taking eons to get them in, e.g. AsyncTCP. The platformio.ini files have the dependencies I use.
All this being said, it looks like I will be switching to micropython on the esp32 and leaving this repo behind. Sorry...

@justoke
Copy link
Author

justoke commented Jan 6, 2020

I just pushed my latest version, which has a number of improvements. The errors you encountered are because I use TLS and the PSK ciphersuites with some libraries that don't officially support them yet. I have PRs pending but it's taking eons to get them in, e.g. AsyncTCP. The platformio.ini files have the dependencies I use.
All this being said, it looks like I will be switching to micropython on the esp32 and leaving this repo behind. Sorry...

Thank you for the update. And no problem if you are moving to micropython - I've been seeing more and more people talk about it. I did come across a simple approach which works for me over http/https in EOTAUpdate . I like your idea with using MQTT. The option I wanted was to be able to initiate the update via MQTT and not necessarily deliver it over MQTT.

@tve
Copy link
Owner

tve commented Jan 6, 2020

Cool. You may have noticed that my code sends the OTA URL and MD5 over MQTTS to the esp32 and then the esp32 fetches the data over HTTP and verifies the MD5. The one downside to watch out for is that this means the firmware is unencrypted over the air so it should not have any credentials in it, e.g., don't put your Wifi password or MQTT creds in...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants