Go Down

Topic: esptool to update Wifi-NINA (Read 410 times) previous topic - next topic

jwestmoreland

Hello All,

Has anyone been successful upgrading the NINA on the MKR 4K to 1.2.1?

This is about the best I have thus far:

John@pc MINGW32 /c/esp/nina-fw
$ python /c/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port COM31 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /c/esp/nina-fw/build/bootloader/bootloader.bin 0xf000 /c/esp/nina-fw/build/phy_init_data.bin 0x30000 /c/esp/nina-fw/build/nina-fw.bin 0x8000 /c/esp/nina-fw/build/partitions.bin
esptool.py v2.6
Serial port COM31
Connecting........__
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 80:7d:3a:86:05:d8
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Compressed 15968 bytes to 10587...
Writing at 0x00001000... (100 %)Traceback (most recent call last):
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2959, in <module>
    _main()
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2952, in _main
    main()
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2698, in main
    operation_func(esp, args)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2158, in write_flash
    esp.flash_defl_block(block, seq, timeout=DEFAULT_TIMEOUT * ratio * 2)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 104, in inner
    return func(*args, **kwargs)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 632, in flash_defl_block
    self.ESP_FLASH_DEFL_DATA, struct.pack('<IIII', len(data), seq, 0, 0) + data, self.checksum(data), timeout=timeout)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 354, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 322, in command
    self.write(pkt)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 285, in write
    self._port.write(buf)
  File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 323, in write
    raise writeTimeoutError
serial.serialutil.SerialTimeoutException: Write timeout

I also had to stub out ping due to:
C:/esp/nina-fw/arduino/libraries/WiFi/src/WiFi.cpp:114:54: error: 'inet_addr_from_ipaddr' was not declared in this scope

Thanks In Advance,
John W.

jwestmoreland

OK - looks like the issue is here:
https://github.com/arduino/nina-fw/issues/7

jwestmoreland

With posted workaround - I get this:

john@pc MINGW32 /c/esp/nina-fw
# python /c/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port COM11 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x0 NINA_W102.bin
esptool.py v2.6
Serial port COM11
Connecting........__
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 80:7d:3a:86:05:d8
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Compressed 1050624 bytes to 567834...
Writing at 0x00000000... (2 %)Traceback (most recent call last):
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2959, in <module>
    _main()
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2952, in _main
    main()
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2698, in main
    operation_func(esp, args)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2158, in write_flash
    esp.flash_defl_block(block, seq, timeout=DEFAULT_TIMEOUT * ratio * 2)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 104, in inner
    return func(*args, **kwargs)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 632, in flash_defl_block
    self.ESP_FLASH_DEFL_DATA, struct.pack('<IIII', len(data), seq, 0, 0) + data, self.checksum(data), timeout=timeout)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 354, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 322, in command
    self.write(pkt)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 285, in write
    self._port.write(buf)
  File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 323, in write
    raise writeTimeoutError
serial.serialutil.SerialTimeoutException: Write timeout

jwestmoreland

This was for the MKR 1010:

john@pc MINGW32 /c/esp/nina-fw
# python /c/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port COM17 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x0 NINA_W102.bin
esptool.py v2.6
Serial port COM17
Connecting.....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 84:0d:8e:34:62:20
Uploading stub...

A fatal error occurred: Timed out waiting for packet header

jwestmoreland

ok - made sure using 3.1 IDF - getting this on MKR 1010:
john@WEI-WS2 MINGW32 /c/esp/nina-fw
$ python /c/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port COM17 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x0 NINA_W102.bin
esptool.py v2.5.0
Serial port COM17
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse
MAC: 84:0d:8e:34:62:20
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Compressed 1001472 bytes to 538027...
Writing at 0x0003c000... (48 %)Traceback (most recent call last):
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2849, in <module>
    _main()
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2842, in _main
    main()
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2594, in main
    operation_func(esp, args)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2074, in write_flash
    esp.flash_defl_block(block, seq, timeout=DEFAULT_TIMEOUT * ratio)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 95, in inner
    return func(*args, **kwargs)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 616, in flash_defl_block
    self.ESP_FLASH_DEFL_DATA, struct.pack('<IIII', len(data), seq, 0, 0) + data, self.checksum(data), timeout=timeout)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 338, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 306, in command
    self.write(pkt)
  File "C:/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 269, in write
    self._port.write(buf)
  File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 323, in write
    raise writeTimeoutError
serial.serialutil.SerialTimeoutException: Write timeout


Go Up