I am attempting to demonstrate OTA to a ESP32 to my customer.
I have firmware loaded into the device (tagged as version 1.2.0), the device is licensed, and running against Mongoose OS 2.13.0.
I placed a ‘newer’ version of the firmware onto Amazon S3. Firmware is identical except the version number is bumped to 1.2.1.
I have the configuration set up to log via UDP so I can watch without a serial connection.
If I issue
mos call OTA.Update '{"url": "https://sti-gateway.s3.us-east-1.amazonaws.com/fw-1.2.1.zip"}'
the device appears to reboot (my logging goes dead for a bit, then comes back up with a new set of sequence numbers on the log messages), and when it comes back up, I see “Failed to resolve ‘sti-gateway.s3.us-east-1.amazonaws.com’, server 8.8.8.8”.
2019-05-30 11:17:56 EDT - sti_B4E62DD60069 145 1559229477.064 2|net.c:80 MQTT_EV_MQTT_PUBACK (msg_id: 15)
2019-05-30 11:19:00 EDT - sti_B4E62DD60069 66 10.795 2|net.c:180 WiFi STA IP acquired 0x0
2019-05-30 11:19:00 EDT - sti_B4E62DD60069 67 10.807 2|mgos_net.c:101 WiFi STA: ready, IP 192.168.1.237, GW 192.168.1.254, DNS 192.168.1.254
2019-05-30 11:19:00 EDT - sti_B4E62DD60069 68 10.812 2|net.c:146 Net got IP address
2019-05-30 11:19:00 EDT - sti_B4E62DD60069 69 10.817 2|mgos_provision_state:43 Current state: 1 -> 2
2019-05-30 11:19:00 EDT - sti_B4E62DD60069 70 10.826 2|mgos_mqtt.c:427 MQTT connecting to a2g58yidv8s7pn.iot.us-east-1.amazonaws.com:8883
2019-05-30 11:19:00 EDT - sti_B4E62DD60069 71 10.974 2|mg_ssl_if_mbedtls.c:35 0x3ffe7418 ciphersuite: TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
2019-05-30 11:19:00 EDT - sti_B4E62DD60069 72 11.002 2|SW ECDSA verify curve 3 hash_len 32 sig_len 72
2019-05-30 11:19:01 EDT - sti_B4E62DD60069 73 11.852 2|SW ECDSA verify curve 3 hash_len 64 sig_len 71
2019-05-30 11:19:01 EDT - sti_B4E62DD60069 74 12.665 2|SW ECDH curve 3
2019-05-30 11:19:03 EDT - sti_B4E62DD60069 75 13.939 2|mgos_mongoose.c:66 New heap free LWM: 76196
2019-05-30 11:19:03 EDT - sti_B4E62DD60069 76 13.949 2|mg_resolv.c:213 Failed to resolve 'sti-gateway.s3.us-east-1.amazonaws.com', server 8.8.8.8
2019-05-30 11:19:03 EDT - sti_B4E62DD60069 77 13.954 2|mgos_ota_http_clien:123 Connect error: -1
2019-05-30 11:19:03 EDT - sti_B4E62DD60069 78 13.962 2|mgos_ota_http_clien:102 Connect error
That DNS name is resolvable at server 8.8.8.8:
user@dell2400-linux:~$ nslookup sti-gateway.s3.us-east-1.amazonaws.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
sti-gateway.s3.us-east-1.amazonaws.com canonical name = s3.us-east-1.amazonaws.com.
Name: s3.us-east-1.amazonaws.com
Address: 52.216.101.221
What steps can I take to get a clearer idea of what’s happening?