Hi,
I've just received the Metro M7 1011 + AirLift board.
I want to flash a new AirLift firmware.
I'm following these instructions: https://learn.adafruit.com/adafruit-met ... t-firmware
1. Enter into boot mode
2. Flash the "passthrough" firmware in AirLift
3. Try to Flash a new version of AirLift using `esptool.py` from my Linux machine, and I get:
```
esptool.py --port /dev/ttyACM0 --before no_reset --baud 115200 write_flash 0 ~/Downloads/adafruit/NINA_W102-1.7.4.bin
esptool.py v3.3.3-dev
Serial port /dev/ttyACM0
WARNING: Pre-connection option "no_reset" was selected. Connection may fail if the chip is not in bootloader or flasher stub mode.
Connecting................
.
.....................
A fatal error occurred: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esp ... oting.html
```
Any ideas ? Thanks!
UPDATE: I tried it multiple times... all the times with the same error.
M7 AirLift: Fail to program AirLift firmware
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ricardoquesada
- Posts: 6
- Joined: Mon Aug 03, 2020 11:15 pm
- mikeysklar
- Posts: 13824
- Joined: Mon Aug 01, 2016 8:10 pm
Re: M7 AirLift: Fail to program AirLift firmware
Were you in bootloader mode at the time of running the esptool.py command to upload the NiNA FW?
Can you try the chrome browser instructions on the same guide page?
Can you try the chrome browser instructions on the same guide page?
- ricardoquesada
- Posts: 6
- Joined: Mon Aug 03, 2020 11:15 pm
Re: M7 AirLift: Fail to program AirLift firmware
Same issue.
1. Put M7 in boot mode
2. Copy the "esp32programmer....uf2" to device
3. Device boots in "passtrough" mode
4. Cannot program the ESP32 chip
Bug in the "esp32programmer...uf2" perhaps?
The device is brand new.
1. Put M7 in boot mode
2. Copy the "esp32programmer....uf2" to device
3. Device boots in "passtrough" mode
4. Cannot program the ESP32 chip
Bug in the "esp32programmer...uf2" perhaps?
The device is brand new.
- Attachments
-
- Screenshot_20230413_171653.png (71.04 KiB) Viewed 310 times
- mikeysklar
- Posts: 13824
- Joined: Mon Aug 01, 2016 8:10 pm
Re: M7 AirLift: Fail to program AirLift firmware
The guide is new for the M7, but using older tools / NiNA FW in the example so there could also be an issue with the current esptool.py or NiNA FW release.
I'll ask engineering to review it as I don't have this board yet to try it myself.
I'll ask engineering to review it as I don't have this board yet to try it myself.
- adafruit2
- Posts: 22111
- Joined: Fri Mar 11, 2005 7:36 pm
Re: M7 AirLift: Fail to program AirLift firmware
try
`esptool --port COM40 --before default_reset --after no_reset --baud 115200 read_mac`
`esptool --port COM40 --before default_reset --after no_reset --baud 115200 read_mac`
- ricardoquesada
- Posts: 6
- Joined: Mon Aug 03, 2020 11:15 pm
Re: M7 AirLift: Fail to program AirLift firmware
same. I tried with `--before default_reset` (as you suggested)... tried with `--before no_reset` (as suggested in the documentation)...
tried with `read_mac`, with `flash_id`, etc...
all with the same issue
- adafruit2
- Posts: 22111
- Joined: Fri Mar 11, 2005 7:36 pm
Re: M7 AirLift: Fail to program AirLift firmware
i just did it on a windows computer - maybe youve got something wierd with linux and COM ports? you can also program the AirLift from within circuitpython tho it is slow
Code: Select all
import time
import board
import busio
from digitalio import DigitalInOut, Direction # pylint: disable=unused-import
import adafruit_miniesptool
print("ESP32 Nina-FW")
# Override these if you are manually wiring. Otherwise, this will use ESP pins from board.
tx = getattr(board, "ESP_TX", board.TX)
rx = getattr(board, "ESP_RX", board.RX)
resetpin = getattr(board, "ESP_RESET", board.D12)
gpio0pin = getattr(board, "ESP_GPIO0", board.D10)
uart = busio.UART(rx, tx, baudrate=115200, timeout=1)
esptool = adafruit_miniesptool.miniesptool(
uart, DigitalInOut(gpio0pin), DigitalInOut(resetpin), flashsize=4 * 1024 * 1024
)
esptool.sync()
print("Synced")
print("Found:", esptool.chip_name)
if esptool.chip_name != "ESP32":
raise RuntimeError("This example is for ESP32 only")
esptool.baudrate = 115200 * 4 # speed up so we can wrap it in under 2 minutes
# Test connection again by asking for the MAC address
print("MAC ADDR: ", [hex(i) for i in esptool.mac_addr])
# Note: Make sure to use the LATEST nina-fw binary release! update the md5sum as well
esptool.flash_file("NINA_W102-1.7.4.bin", 0x0, "80c2dfd8ad2e97b2c32899382860acb1")
esptool.reset()
time.sleep(0.5)
- ricardoquesada
- Posts: 6
- Joined: Mon Aug 03, 2020 11:15 pm
Re: M7 AirLift: Fail to program AirLift firmware
Thanks. Just to double check... I need to flash the CircuitPython.uf2 first to use the CircuitPython example, correct?
Because in the other I was using the passthrough.uf2
- adafruit2
- Posts: 22111
- Joined: Fri Mar 11, 2005 7:36 pm
Re: M7 AirLift: Fail to program AirLift firmware
yeah this is a totally different way - you run circuitpython and have the binary file in the onboard storage and we have an esptool 'port' that runs as a sketch
- ricardoquesada
- Posts: 6
- Joined: Mon Aug 03, 2020 11:15 pm
Re: M7 AirLift: Fail to program AirLift firmware
Thanks. that worked!
Is the source code of the `esp32programmer.uf2` available?
Wondering whether there is a bug in the passthrough UF2 (although you mentioned in worked on windows).
Thanks!
Code: Select all
ESP32 Nina-FW
Resetting
Synced
Found: ESP32
MAC ADDR: ['0xd4', '0xd4', '0xda', '0x1f', '0xd0', '0xd0']
Writing NINA_W102-1.7.4.bin w/filesize: 1159168
Erase size 1159168, num_blocks 2264, size 512, offset 0x0000
Took 1.24s to erase 2264 flash blocks
Writing at 0x0011ae00... (100 %)Took 82.12s to write 1159168 bytes
Verifying MD5sum 80c2dfd8ad2e97b2c32899382860acb1
Resetting
Wondering whether there is a bug in the passthrough UF2 (although you mentioned in worked on windows).
Thanks!
- adafruit2
- Posts: 22111
- Joined: Fri Mar 11, 2005 7:36 pm
- ricardoquesada
- Posts: 6
- Joined: Mon Aug 03, 2020 11:15 pm
Re: M7 AirLift: Fail to program AirLift firmware
ty!adafruit2 wrote: ↑Fri Apr 14, 2023 8:52 pm its here! https://github.com/adafruit/tinyuf2/tre ... t10xx/apps
- richpaul6806
- Posts: 16
- Joined: Sun May 21, 2023 12:39 am
Re: M7 AirLift: Fail to program AirLift firmware
I was having the same issue with updating my ESP32 chip on my Metro M7. I tried running the code in this thread to update through circuitpython and it appeared to work. Then I tried running the code in the "CircuitPython WiFi" section of the metro m7 guide to confirm wifi connection and got: TimeoutError: ESP32 timed out on SPI select. Any thoughts?adafruit2 wrote: ↑Fri Apr 14, 2023 8:08 pm i just did it on a windows computer - maybe youve got something wierd with linux and COM ports? you can also program the AirLift from within circuitpython tho it is slow
Code: Select all
import time import board import busio from digitalio import DigitalInOut, Direction # pylint: disable=unused-import import adafruit_miniesptool print("ESP32 Nina-FW") # Override these if you are manually wiring. Otherwise, this will use ESP pins from board. tx = getattr(board, "ESP_TX", board.TX) rx = getattr(board, "ESP_RX", board.RX) resetpin = getattr(board, "ESP_RESET", board.D12) gpio0pin = getattr(board, "ESP_GPIO0", board.D10) uart = busio.UART(rx, tx, baudrate=115200, timeout=1) esptool = adafruit_miniesptool.miniesptool( uart, DigitalInOut(gpio0pin), DigitalInOut(resetpin), flashsize=4 * 1024 * 1024 ) esptool.sync() print("Synced") print("Found:", esptool.chip_name) if esptool.chip_name != "ESP32": raise RuntimeError("This example is for ESP32 only") esptool.baudrate = 115200 * 4 # speed up so we can wrap it in under 2 minutes # Test connection again by asking for the MAC address print("MAC ADDR: ", [hex(i) for i in esptool.mac_addr]) # Note: Make sure to use the LATEST nina-fw binary release! update the md5sum as well esptool.flash_file("NINA_W102-1.7.4.bin", 0x0, "80c2dfd8ad2e97b2c32899382860acb1") esptool.reset() time.sleep(0.5)
- mikeysklar
- Posts: 13824
- Joined: Mon Aug 01, 2016 8:10 pm
Re: M7 AirLift: Fail to program AirLift firmware
@richpaul6806,
Please start a new topic for your issue which is related to using the WiFi on the M7 as opposed to updating the FW.
Please start a new topic for your issue which is related to using the WiFi on the M7 as opposed to updating the FW.
- richpaul6806
- Posts: 16
- Joined: Sun May 21, 2023 12:39 am
Re: M7 AirLift: Fail to program AirLift firmware
OK. I thought maybe it was the same issue since I was having trouble with the FW before.
Please be positive and constructive with your questions and comments.