v1.7.7: 支持 EC801E 模组,增加 xmini-c3-v3, xmini-c3-4g (#930)

This commit is contained in:
Xiaoxia
2025-07-17 20:18:21 +08:00
committed by GitHub
parent ea8769e1fc
commit 6bb95073a4
39 changed files with 1156 additions and 158 deletions

View File

@@ -53,7 +53,8 @@ Http* Ota::SetupHttp() {
auto& board = Board::GetInstance();
auto app_desc = esp_app_get_description();
auto http = board.CreateHttp();
auto network = board.GetNetwork();
auto http = network->CreateHttp(0);
http->SetHeader("Activation-Version", has_serial_number_ ? "2" : "1");
http->SetHeader("Device-Id", SystemInfo::GetMacAddress().c_str());
http->SetHeader("Client-Id", board.GetUuid());
@@ -272,7 +273,8 @@ void Ota::Upgrade(const std::string& firmware_url) {
bool image_header_checked = false;
std::string image_header;
auto http = std::unique_ptr<Http>(Board::GetInstance().CreateHttp());
auto network = Board::GetInstance().GetNetwork();
auto http = std::unique_ptr<Http>(network->CreateHttp(0));
if (!http->Open("GET", firmware_url)) {
ESP_LOGE(TAG, "Failed to open HTTP connection");
return;