Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial comms hang in Win10 #1

Closed
ShawnHymel opened this issue Mar 29, 2022 · 15 comments
Closed

Serial comms hang in Win10 #1

ShawnHymel opened this issue Mar 29, 2022 · 15 comments
Assignees

Comments

@ShawnHymel
Copy link

I'm trying to connect the RPi Pico to Windows 10. I followed the guide to upload the latest firmware .uf2 file to the Pico. When I run edge-impulse-daemon, it hangs forever trying to connect to the COM port.

image

I also cannot connect via PuTTY--the same thing happens: it hangs forever.

Note that the "hello usb" firmware does work. If I upload the .uf2 file found here (https://forums.raspberrypi.com/viewtopic.php?t=314921#p1883936) to the Pico, I can see "Hello, World" printed to the console (e.g. connected via Putty at 115200 baud rate).

@AIWintermuteAI
Copy link
Collaborator

Hi, Shawn!
We'll investigate the issue. By the way, does it work on Mac for you? It could an issue with Windows drivers...

@AIWintermuteAI AIWintermuteAI self-assigned this Apr 19, 2022
@ShawnHymel
Copy link
Author

@AIWintermuteAI Just tried it--it hangs on my Mac, too.

image

@KevWal
Copy link

KevWal commented Apr 19, 2022

Hi, I have a similar issue that I posted on the forum. Copied here incase the additional details are useful.

I have a brand new Pi Pico.

Flashed with rp2-pico-20220117-v1.18.uf2 from: MicroPython - Python for microcontrollers
I get a Com5 USB\VID_2E8A&PID_0005&MI_00\7&381503f8&0&0000 in Zadig showing as Board CDC (Interface 0) using usbser (v10.0.19041.1202) and putty gives me a connection and a python prompt - so the board and the usb / serial connection can work.

Flashing with ei_rp2040_firmware.uf2 from https://docs.edgeimpulse.com/docs/development-boards/raspberry-pi-rp2040
I get a Com4 USB\VID_2E8A&PID_000A&MI_00\7&207451d&0&0000 in Zadig showing as Board CDC (Interface 0) using usber (V1.0.0.0) and putty does not connect on Com4 – it just hangs and I have to unplug the pico to get Putty to release the port.

Trying to update the driver using Zadig 2.7 says it was successful but has no effect, even after a reboot still shows as v1.0.0.0 and putty still hangs,

Replacing the driver with winusb, and then back to USB Serial (CDC) it still goes back to v1.0.0.0

Finally in Device Manager, using “Update Driver” and Browse I managed to get the version up to v10.0.19041.1202 – but still no putty connection

I also tried a Chrome “Connect using WebUSB”, which shows a ‘Board CDC (Com 4) - paired’, but I get a “Failed to connect to device” error straight away or sometime Chrome just hanging and not doing anything.

I have also tried on a different windows machine, and I still get no putty connection.

Thanks very much
Kevin

@AIWintermuteAI
Copy link
Collaborator

Okay, so I can partially reproduce the problem:

  1. If I connect Pico to PC and immediately execute edge-impulse-daemon --verbose, the device is connected normally.
    image
  2. However, for consecutive executions of edge-impulse-daemon --verbose, there is a chance of not being able to read config from device - the issue you described. Plugging out and plugging in Pico fixes that.
    I tested connection on Ubuntu 20.04 and MacOS.
    Can you confirm that the problem is intermittent?

@ShawnHymel
Copy link
Author

@AIWintermuteAI yes, I confirmed that it is intermittent on my Mac. I plugged it in and could connect a few times. On about the third or fourth time, it loses serial connection to the Pico.

image

@KevWal
Copy link

KevWal commented Apr 20, 2022

For me, on Windows, it is permanent, I have never been able to connect with ei_rp2040_firmware.uf2 uploaded and booted.

@AIWintermuteAI
Copy link
Collaborator

AIWintermuteAI commented Apr 28, 2022

Okay, can you test this firmware - it works for me on Windows 10. Before the change (latest version of tinyUSB in pico-sdk) I could reproduce your problem. Now I can connect.
image

ei_rp2040_firmware.uf2
ei_rp2040_firmware.uf2.zip

@KevWal
Copy link

KevWal commented Apr 28, 2022 via email

@KevWal
Copy link

KevWal commented May 1, 2022

Okay, can you test this firmware - it works for me on Windows 10. Before the change (latest version of tinyUSB in pico-sdk) I could reproduce your problem.

And first PC I tried it on (which didn't work before), it now works :)

image

Thanks very much
Kevin

@ShawnHymel
Copy link
Author

ShawnHymel commented Jul 12, 2022

From a user (forum post):

Hi! I found the solution to this annoying problem.
I needed to compile the firmware locally and in the PICO-SDK >src>rp2_common>pico_stdio_usb>include>pico>stdio_usb.h I just needed to set the variable:

PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE = 0
(default is set to 1)
This error is happening on Win 10 and 11

@AIWintermuteAI
Copy link
Collaborator

I just merged latest upgrade for RP2040 to master. Can someone try after it is deployed to production (tomorrow at latest)?

@ShawnHymel
Copy link
Author

@AIWintermuteAI I downloaded the firmware from https://docs.edgeimpulse.com/docs/development-platforms/officially-supported-mcu-targets/raspberry-pi-rp2040 and it still hangs. Is that firmware up-to-date?

image

@ShawnHymel
Copy link
Author

Nevermind...I tried the latest .uf2 from https://github.com/edgeimpulse/firmware-pi-rp2040/tree/main/build and it seems to be working now. I'm guessing that the one on the docs page has not been updated.

@AIWintermuteAI
Copy link
Collaborator

It should be latest firmware there by now. Can you try again? The size of the .uf2 file should be 1.1 Mb.

@ShawnHymel
Copy link
Author

Confirmed--download is 1.1 MB and it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants