Pico W Initial Install Fails

Any advice or pointers on fixing [upload] Error 249?

My Config:

  • HA running on Raspberry Pi 5
  • Pico W (2022) connected to the RPi via USB

My Process Steps (2nd attempt - first attempt did create my LAN credentials in the secrets file so this 2nd attempt skipped over that part):

  • Installed the ESPHome Add-On
  • Clicked on New Device
  • Selected Raspberry Pi Pico W
  • Selected 'Plug into computer running ESPHome Device Builder
  • It offered two choices of port to use. Nothing in the instructions mentioned that. Not knowing what to do I randomly selected one (Pico W - Board CDC).
  • It created the default .yaml file
  • I selected Install
  • I selected to install from being plugged into the Raspberry Pi
  • I then had to select a port, tho this time it only offered one choice, which, interestingly, was different than the one I had selected when ‘adding new device.’
  • A terminal window appeared and ESPHome did a lot of work, a lot of compiling and such.
  • At the end I get that Error 249.

I have no clue what’s going on, how to resolve it.

ChatGPT suggests using a terminal installing using sudo - but, first, ESPHome offers no user-interact-able terminal that I can find. And, second, the log gives the appearance of an incorrect port. I have now tried this process four times, trying to get the ‘correct’ port. It all ends the same way (well, on one attempt it crashed the Raspberry Pi completely…but lets ignore that one for now).

Now what??

INFO ESPHome 2024.12.4
INFO Reading configuration /config/esphome/poc-pico-w.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing poc-pico-w (board: rpipicow; framework: arduino; platform: https://github.com/maxgerhardt/platform-raspberrypi.git#v1.2.0-gcc12)
--------------------------------------------------------------------------------
Library Manager: Installing esphome/noise-c @ 0.1.6
INFO Installing esphome/noise-c @ 0.1.6
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing esphome/libsodium @ 1.10018.4
INFO Installing esphome/libsodium @ 1.10018.4
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
HARDWARE: RP2040 133MHz, 256KB RAM, 2MB Flash
 - framework-arduinopico @ 1.30904.0 (3.9.4)
 - tool-picotool-rp2040-earlephilhower @ 5.120300.240818 (12.3.0)
Flash size: 2.00MB
Sketch size: 1.00MB
Filesystem size: 1.00MB
Maximium Sketch size: 1044480 EEPROM start: 0x101ff000 Filesystem start: 0x100ff000 Filesystem end: 0x101ff000
Dependency Graph
|-- WiFi @ 1.0.0
|-- LEAmDNS @ 1.2
|-- Updater @ 1.0
|-- noise-c @ 0.1.6
|-- MD5Builder @ 1.0.0
|-- lwIP-Ethernet @ 1
|-- lwIP_CYW43 @ 1
|-- SPI @ 1.0
Compiling .pioenvs/poc-pico-w/FrameworkArduinoVariant/picow_digital.cpp.o

... <snip - removing the many, many lines of compilation>

Compiling .pioenvs/poc-pico-w/FrameworkArduino/wiring_shift.cpp.o
Archiving .pioenvs/poc-pico-w/libFrameworkArduino.a
Linking .pioenvs/poc-pico-w/firmware.elf
Generating UF2 image
picotool uf2 convert -t elf ".pioenvs/poc-pico-w/firmware.elf" ".pioenvs/poc-pico-w/firmware.uf2"
Flash size: 2.00MB
Sketch size: 1.00MB
Filesystem size: 1.00MB
Maximium Sketch size: 1044480 EEPROM start: 0x101ff000 Filesystem start: 0x100ff000 Filesystem end: 0x101ff000
RAM:   [===       ]  28.1% (used 73656 bytes from 262144 bytes)
Flash: [=====     ]  50.2% (used 524672 bytes from 1044480 bytes)
Building .pioenvs/poc-pico-w/firmware.bin
rp2040_copy_factory_uf2([".pioenvs/poc-pico-w/firmware.bin"], [".pioenvs/poc-pico-w/firmware.elf"])
rp2040_copy_ota_bin([".pioenvs/poc-pico-w/firmware.bin"], [".pioenvs/poc-pico-w/firmware.elf"])
Building .pioenvs/poc-pico-w/firmware.bin.signed
========================= [SUCCESS] Took 44.67 seconds =========================
INFO Successfully compiled program.
Processing poc-pico-w (board: rpipicow; framework: arduino; platform: https://github.com/maxgerhardt/platform-raspberrypi.git#v1.2.0-gcc12)
--------------------------------------------------------------------------------
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Using manually specified: /dev/ttyUSB0
Forcing reset using 1200bps open/close on port /dev/ttyUSB0
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
Warning: Picotool did not detect any RPxxxx devices in BOOTSEL mode. Upload might fail.
Uploading .pioenvs/poc-pico-w/firmware.elf
No accessible RP2040/RP2350 devices in BOOTSEL mode were found.

but:

Device at bus 3, address 4 appears to be a RP2040 device in BOOTSEL mode, but
    picotool was unable to connect. Maybe try 'sudo' or check your permissions.
*** [upload] Error 249
========================== [FAILED] Took 4.47 seconds =============

Sounds like the issue might be elsewhere but it won’t hurt to post this config.