Problems with "Program Firmware" step for ESP32


#1

I am in DK IoT studio. I am attempting to download firmware to an Adafruit Feather ESP32 Huzzah device.

After pressing the Program Firmware button I do not get the expected response. The ESP32 guide suggests that the user will be prompted to enter the COM port number. This does not happen.

Instead, a windows Dialog box appears, that allows a ZIP file to be saved to the filesystem.

Seems to be the same issue identified on the Atmosphere forum (where I don’t see a resolution relating to my situation)
known issue on Atmosphere forum

Notes:

  • Windows 7
  • Chrome Browser
  • agent is running, status shows “If you can read this then your Atmosphere IoT Agent is running correctly”
  • “Project has been compiled”

Any suggestions to overcome this roadblock?

thanks.


#2

@miketeachman, which web browser are you currently using? Chrome or Firefox? If you get a “*.zip” file, that’s actually the source, use the button to the right.

atmosphere

As a quick test, try hitting refresh, as the “Agent” needs to be running before your browser. So if you refresh the page, that should re-connect to the agent service.

With the above, Chrome should then work, where as Firefox needs a little more help:

https://developer.atmosphereiot.com/documents/downloads/atmosphereiotagent.html

Regards,


#3

I updated my post about the same time as your response.
The browser is Chrome.

I am definitely selecting Program Firmware and not download source code (both were showing the same download ZIP behavior)

I tried refreshing and got a bit further…

I was presented with the comm port configuration dialog.

Next… got this dialog…I waited about about 2 minutes with no feedback, then selected Close.

then … nothing … so I tried Program Firmware again …then … got the Save-As dialog box to save a ZIP file.

hmm…


#4

Some initial feedback on the iot agent installation:

  • it is a very non-standard “installation” that does not provide the typical user response patterns that are expected for a windows Setup.exe
  • here is the user feedback … quite unusual
    image

No clear indication that the agent installation worked or not (other than a new icon in the windows tool tray)

(perhaps some feedback to give your partner, Atmosphere?)


#5

I’ve seen this happen before, on boards that either need to be manually reset…

As a backup-backup, ff you unzip the firmware *.zip package, then use the esptool python script: https://github.com/espressif/esptool

esptool.py --chip esp32 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader.bin 0x8000 partitions.bin 0x50000 atmosphere-project.bin

Regards,


#6

I restarted the agent, refreshed the browser and tried to Program Firmware again.
I get the download dialog (with correct COM port auto-selected)
image

I click Program Firmware and wait… I notice now that the agent icon has disappeared from the Windows tooltray.


#7

OK … I’ll try this… I do MicroPython develop with the ESP32 and have used esptool.py many times.


#8

downloaded the bin file using esptool.py…OK
now moving to device registration via Bluetooth…
installed Atmosphere app onto Ipad running IOS 9 … OK
started app…OK
get screen with Atmosphere brand logo … wait … wait… nothing else

At this point I’m giving up… too many issues to do a ‘hello world’ demo

in case it helps here is a serial capture of the ESP32 on reset

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5756
load:0x40078000,len:7684
load:0x40080000,len:7392
entry 0x4008039c
I (29) boot: ESP-IDF v3.1-beta1-8-g5ebb70e 2nd stage bootloader
I (29) boot: compile time 15:18:05
I (29) boot: Enabling RNG early entropy source...
I (35) boot: SPI Speed      : 40MHz
I (39) boot: SPI Mode       : DIO
I (43) boot: SPI Flash Size : 4MB
I (47) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (58) boot:  0 nvs              WiFi data        01 02 00009000 00040000
I (65) boot:  1 otadata          OTA data         01 00 00049000 00002000
I (73) boot:  2 ota_0            OTA app          00 10 00050000 00177000
I (80) boot:  3 atmosphere       Unknown data     01 40 001c7000 001c2000
I (88) boot: End of partition table
E (92) boot: ota data partition invalid and no factory, will try all partitions
I (100) esp_image: segment 0: paddr=0x00050020 vaddr=0x3f400020 size=0x36e94 (224916) map
I (188) esp_image: segment 1: paddr=0x00086ebc vaddr=0x3ffc0000 size=0x03f4c ( 16204) load
I (194) esp_image: segment 2: paddr=0x0008ae10 vaddr=0x3ffc3f4c size=0x00000 (     0) load
I (195) esp_image: segment 3: paddr=0x0008ae18 vaddr=0x40080000 size=0x00400 (  1024) load
I (204) esp_image: segment 4: paddr=0x0008b220 vaddr=0x40080400 size=0x04df0 ( 19952) load
I (221) esp_image: segment 5: paddr=0x00090018 vaddr=0x400d0018 size=0xe0184 (917892) map
I (543) esp_image: segment 6: paddr=0x001701a4 vaddr=0x400851f0 size=0x125f8 ( 75256) load
I (574) esp_image: segment 7: paddr=0x001827a4 vaddr=0x400c0000 size=0x00000 (     0) load
I (574) esp_image: segment 8: paddr=0x001827ac vaddr=0x50000000 size=0x00000 (     0) load
I (595) boot: Loaded app from partition at offset 0x50000
I (595) boot: Disabling RNG early entropy source...
I (595) cpu_start: Pro cpu up.
I (599) cpu_start: Starting app cpu, entry point is 0x40081150
I (0) cpu_start: App cpu up.
I (609) heap_init: Initializing. RAM available for dynamic allocation:
I (616) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (622) heap_init: At 3FFD3938 len 0000C6C8 (49 KiB): DRAM
I (628) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (635) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (641) heap_init: At 400977E8 len 00008818 (34 KiB): IRAM
I (647) cpu_start: Pro cpu start user code
I (330) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (351) ATMO DBG: Stored Build UUID: c2db0a95-e37b-4469-865b-23a1d676eea4
Current Build UUID: c2db0a95-e37b-4469-865b-23a1d676eea4

I (351) ATMO DBG: Error opening file ota_complete

I (411) ATMO DBG: Uuid Match 1 Boot After OTA: 0

I (411) ATMO DBG: Not Wiping Flash

I (751) ATMO ESP32 BLE: ATMO_ESP32_BLE_PeripheralInit: ATMO_ESP32_BLE_PeripheralInit 728

I (801) BTDM_INIT: BT controller compile version [c8f540d]

I (801) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1111) phy: phy_version: 3910, c0c45a3, May 21 2018, 18:07:06, 0, 0
I (1141) ATMO ESP32 BLE: event = 0x0 gatts_if = 0x3

I (1141) ATMO ESP32 BLE: ESP_GATTS_REG_EVT: _ATMO_ESP32_BLE_gatts_event_handler 468

I (1151) wifi: wifi driver task: 3ffdfd58, prio:23, stack:4096, core=0
I (1151) wifi: wifi firmware version: 4fd6a2c
I (1151) wifi: config NVS flash: enabled
I (1161) wifi: config nano formating: disabled
I (1161) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1171) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1201) wifi: Init dynamic tx buffer num: 32
I (1201) wifi: Init data frame dynamic rx buffer num: 32
I (1201) wifi: Init management frame dynamic rx buffer num: 32
I (1201) wifi: Init static rx buffer size: 1600
I (1211) wifi: Init static rx buffer num: 10
I (1211) wifi: Init dynamic rx buffer num: 32
I (1221) ATMO DBG: Error opening file wifiCredentials

I (1271) ATMO ESP32 BLE: ATMO_ESP32_BLE_PeripheralInit: ATMO_ESP32_BLE_PeripheralInit 728

I (1271) ATMO ESP32 BLE: esp_ble_gatts_create_service: config->gatts_if = 0x3

I (1271) ATMO ESP32 BLE: event = 0x7 gatts_if = 0x3

I (1281) ATMO ESP32 BLE: ESP_GATTS_CREATE_EVT: _ATMO_ESP32_BLE_gatts_event_handler 539

I (1291) ATMO ESP32 BLE: CREATE_SERVICE_EVT, status 0,  service_handle 0x28

I (1291) ATMO ESP32 BLE: event = 0xC gatts_if = 0x3

I (1301) ATMO ESP32 BLE: ESP_GATTS_START_EVT: _ATMO_ESP32_BLE_gatts_event_handler 570

I (1311) ATMO ESP32 BLE: esp_ble_gatts_create_service: serviceEntry->handle = 0x28

I (1321) ATMO ESP32 BLE: esp_ble_gatts_add_char: serviceHandle = 0x28

E (1321) BT_BTC: btc_gatts_arg_deep_copy 8 no mem

I (1331) ATMO ESP32 BLE: event = 0x9 gatts_if = 0x3

I (1331) ATMO ESP32 BLE: ESP_GATTS_ADD_CHAR_EVT: _ATMO_ESP32_BLE_gatts_event_handler 554

I (1341) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: config->numberOfCharacteristicEntries = 0 (1070)

I (1361) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: config->numberOfCharacteristicEntries = 1 (1076)

I (1371) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: characteristicEntry->handle = 0x2A

I (1381) ATMO ESP32 BLE: GAP_EVT, event 17

I (1381) ATMO DBG: Setting device name: P1B0A

I (1391) ATMO ESP32 BLE: GAP_EVT, event 4

I (1391) ATMO DBG: Setting service uuid

I (1401) ATMO ESP32 BLE: GAP_EVT, event 4

I (1401) ATMO DBG: Starting advertising

I (1411) ATMO DBG: Updating adv data

I (1411) ATMO ESP32 BLE: GAP_EVT, event 4

I (1511) ATMO DBG: esp_ble_gap_start_advertising
I (1511) ATMO ESP32 BLE: GAP_EVT, event 6

I (1511) ATMO DBG: Registered: 0

I (1511) ATMO ESP32 BLE: esp_ble_gatts_create_service: config->gatts_if = 0x3

I (1521) ATMO ESP32 BLE: event = 0x7 gatts_if = 0x3

I (1521) ATMO ESP32 BLE: ESP_GATTS_CREATE_EVT: _ATMO_ESP32_BLE_gatts_event_handler 539

I (1531) ATMO ESP32 BLE: CREATE_SERVICE_EVT, status 0,  service_handle 0x38

I (1541) ATMO ESP32 BLE: event = 0xC gatts_if = 0x3

I (1541) ATMO ESP32 BLE: ESP_GATTS_START_EVT: _ATMO_ESP32_BLE_gatts_event_handler 570

I (1551) ATMO ESP32 BLE: esp_ble_gatts_create_service: serviceEntry->handle = 0x38

I (1561) ATMO ESP32 BLE: esp_ble_gatts_add_char: serviceHandle = 0x38

E (1571) BT_BTC: btc_gatts_arg_deep_copy 8 no mem

I (1571) ATMO ESP32 BLE: event = 0x9 gatts_if = 0x3

I (1581) ATMO ESP32 BLE: ESP_GATTS_ADD_CHAR_EVT: _ATMO_ESP32_BLE_gatts_event_handler 554

I (1591) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: config->numberOfCharacteristicEntries = 1 (1070)

I (1601) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: config->numberOfCharacteristicEntries = 2 (1076)

I (1611) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: characteristicEntry->handle = 0x3A

I (1621) ATMO ESP32 BLE: esp_ble_gatts_add_char: serviceHandle = 0x38

E (1631) BT_BTC: btc_gatts_arg_deep_copy 8 no mem

I (1631) ATMO ESP32 BLE: event = 0x9 gatts_if = 0x3

I (1641) ATMO ESP32 BLE: ESP_GATTS_ADD_CHAR_EVT: _ATMO_ESP32_BLE_gatts_event_handler 554

I (1651) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: config->numberOfCharacteristicEntries = 2 (1070)

I (1661) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: config->numberOfCharacteristicEntries = 3 (1076)

I (1671) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: characteristicEntry->handle = 0x3C

I (1681) ATMO ESP32 BLE: esp_ble_gatts_add_char: serviceHandle = 0x38

E (1691) BT_BTC: btc_gatts_arg_deep_copy 8 no mem

I (1691) ATMO ESP32 BLE: event = 0x9 gatts_if = 0x3

I (1701) ATMO ESP32 BLE: ESP_GATTS_ADD_CHAR_EVT: _ATMO_ESP32_BLE_gatts_event_handler 554

I (1711) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: config->numberOfCharacteristicEntries = 3 (1070)

I (1721) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: config->numberOfCharacteristicEntries = 4 (1076)

I (1731) ATMO ESP32 BLE: ATMO_ESP32_BLE_GATTSAddCharacteristic: characteristicEntry->handle = 0x3E