Skip to content

Commit

Permalink
Update HTTP server URI for OTA firmware update
Browse files Browse the repository at this point in the history
  • Loading branch information
QuangNguyen1412 committed May 24, 2019
1 parent 47d19f8 commit bf7d25d
Show file tree
Hide file tree
Showing 3 changed files with 443 additions and 229 deletions.
3 changes: 1 addition & 2 deletions main/ota_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static esp_err_t _ota_commence()
ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08x)",
running->type, running->subtype, running->address);

sprintf(fn_path, "http://air.eng.utah.edu:80/files/v2_updates/%s", ota_file_basename);
sprintf(fn_path, "http://air.eng.utah.edu:80/files/updates/%s", ota_file_basename);
ESP_LOGI(TAG, "OTA: %s", fn_path);

esp_http_client_config_t config = {
Expand Down Expand Up @@ -180,7 +180,6 @@ static esp_err_t _ota_commence()

if (esp_partition_check_identity(esp_ota_get_running_partition(), update_partition) == true) {
ESP_LOGI(TAG, "The current running firmware is same as the firmware just downloaded");
int i = 0;
ESP_LOGI(TAG, "When a new firmware is available on the server, press the reset button to download it");
return ESP_FAIL;
// while(1) {
Expand Down
2 changes: 1 addition & 1 deletion sdkconfig
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ CONFIG_WIFI_MODE_AP="1"
CONFIG_MQTT_HOST="air.eng.utah.edu"
CONFIG_MQTT_USERNAME="sensor"
CONFIG_MQTT_PASSWORD="PaG06pSo43oM4Cx"
CONFIG_FIRMWARE_UPG_URL="air.eng.utah.edu:80/files/updates/hello-world.bin"
CONFIG_FIRMWARE_UPG_URL="http://air.eng.utah.edu:80/files/updates/airu-firmware-2.0.bin"

#
# Partition Table
Expand Down
Loading

0 comments on commit bf7d25d

Please sign in to comment.