Skip to content

Не работает OTA #29

Description

@vvzvlad

А какие настройки нужны для OTA? В первой версии библиотеки оно работало, а во второй нет.

void handle_file(fb::Update& u) {
    String file_name = u.message().document().name();
    String chat_id = u.message().chat().id();
    Serial.printf("Downloading file: %s\n", file_name.c_str());
    
    if (file_name.endsWith(".bin")) {        
        bot.sendMessage(fb::Message("OTA update started", chat_id));
        fb::Fetcher fetch = bot.downloadFile(u.message().document().id());
        bool ok = fetch.updateFlash();
        bot.sendMessage(fb::Message(ok ? "OTA done" : "OTA error", chat_id));
    }
}

использую прям из примера код практически, все равно не хочет. OTA error и все.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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