[SOLVED] Cannot access Pico after uploading micropython using Thonny

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
Alan_uk
Posts: 5
Joined: Sun Jul 18, 2021 1:55 pm

[SOLVED] Cannot access Pico after uploading micropython using Thonny

Post by Alan_uk » Sun Jul 18, 2021 2:48 pm

Hi. First post, first time user of a Pico. Looks an amazing device for the money.

Problem: Cannot access Pico from Thorny after uploading micropython IDE using Thorny on Windows 7 Professional ESU 64 bit

Steps:
1. Booted Pico while plugging in USB cable to PC
2. Windows recognised as drive O:
3. 2 files visible index.html & INFO_UF2.txt
UF2 Bootloader v2.0
Model: Raspberry Pi RP2
Board-ID: RPI-RP2
4. Downloaded rp2-pico-20210618-v1.16.uf2 from https://micropython.org/download/rp2-pico/
5. Dragged and dropped onto O:
6. Pico reboots.
7. Started Thorny
8. Pico not accessible
9. Rebooted Pico while plugging in USB cable to PC
10. PC & Thorny see Pico
11. In Thorny wrote micropython IDE - get to 100% - Waiting for Port - Could not find port; Drive disappears from Windows.

Windows Manage Computer / Devices / Other Devices / RP2 Boot with yellow exclamation mark
The drivers for this device are not installed. (Code 28)
Windows Manage Computer / Devices / Portable Devices / RPI-RP2 - no yellow mark

Tried again with the same result. If I reboot the Pico whilst plugging in the USB cable, then Windows still only sees the 2 files - should the firmware and micropython be seen as files?

If I reboot the Pico without plugging in the USB cable Windows now recognises the drive (didn't earlier) but Thorny does not.
"Device is busy or does not respond. Your options:..."

Tried Stop/Restart + enter REPL and clicked Run and clicked save to Pico but says "Device is busy....."

No joy with searching on google.

I appreciate some help please.

Alan
Last edited by Alan_uk on Sun Jul 18, 2021 10:05 pm, edited 2 times in total.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Cannot access Pico after uploading micropython using Thorny

Post by Roberthh » Sun Jul 18, 2021 3:55 pm

I cannot tell you much about Thonny and Windows, just something about the Pico:
If you plug in the USB while holding the Program button pushed, a drive will appear on your PC. That's what you see. For flashing the firmware, just copy the .uf2 file to that drive. You did that. The firmware file will not be visible on that drive.
After successful flashing, the drive will disappear and the Pico reboots. At that time it should provide a serial interface at the USB port, and Thonny can connect. Take care to configure Thonny to some high baud rate, like 115200. For normal use, do not push the program button when connecting USB.

Alan_uk
Posts: 5
Joined: Sun Jul 18, 2021 1:55 pm

Re: Cannot access Pico after uploading micropython using Thorny

Post by Alan_uk » Sun Jul 18, 2021 6:41 pm

Thanks Robert for replying so quickly. The only place I can see to set baud rate is in the driver. So I searched re updating the RP2 Boot driver that is not present. I came across this post: https://www.raspberrypi.org/forums/view ... 6&t=300053

Says one needs to install a COMx driver for Windows 7 to support Pico's Virtual Serial Port. Windows 10 has the driver but not 7.

The OP provided a list of mods to another manufacturer's inf file but I went for the posting at Wed May 05, 2021 12:50 pm that had complete "working" inf file. I saved it as 'pico-serial.inf' in its own directory

The OP says that a copy of Microsoft's 'usbser.sys' is also needed. Well I haven't got that on my PC. So I'm hunting. Trying to install the 'pico-serial.inf' without that sys file gives "Windows could not find driver software for your device"

However this other post https://github.com/raspberrypi/pico-feedback/issues/118 says use zadig to build the inf but others have had bad experience of zadig.

That thread also said "I'm sorry, but we do not intend to officially support Windows 7 as Microsoft itself discontinued support for the operating system in January last year."

Not true. I'm on Windows Extended Support as I'm delaying moving to Windows 10 as long as I can. I will need a completed new PC and it will take me a week to install all my software and configure.


Alan

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Cannot access Pico after uploading micropython using Thorny

Post by Roberthh » Sun Jul 18, 2021 6:51 pm

You could try a Linux VM, like Virtualbox with Mint Linux. Linu supports the board out-of-the box. But installing a VM and using Linux comes with other steps to climb.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Cannot access Pico after uploading micropython using Thorny

Post by Roberthh » Sun Jul 18, 2021 7:02 pm

I recall faintly the TeraTerm has it's own drivers. So you could try that. It's just a terminal. not an IDE. But at least is may give you access to REPL.

Alan_uk
Posts: 5
Joined: Sun Jul 18, 2021 1:55 pm

Re: Cannot access Pico after uploading micropython using Thorny

Post by Alan_uk » Sun Jul 18, 2021 9:02 pm

Hi Robert.
Thanks for your suggestions.

I do have VBox with a XP and Linux system (though I've had problems with Linux getting shared folders to the Win7 host working). I did think of that but after doing a bit of digging I think the VM will rely on a working COMS port on the Win7 host.

Re TeraTerm. I'm not familiar with that but I use Putty and that cannot connect either.

I have progressed a bit further. I did manage to install the driver using the inf file and without providing a usbser.sys. But now Win7 says it cannot start the driver (Code 10)

I do have a laptop running Linux but it does split the development over more systems - but if needs must..... Most of my app is being developed on a Pi and I was going to use the Pico (via SPI) to connect to some pulse inputs and thought a dedicated pico would be fast in responding and counting the pulses. So only 1 "simple" app on the Pico.

I'm stopping for today after being at the PC since lunch time. It's 10pm and still 31C in my office!

Alan

Alan_uk
Posts: 5
Joined: Sun Jul 18, 2021 1:55 pm

Re: Cannot access Pico after uploading micropython using Thonny

Post by Alan_uk » Sun Jul 18, 2021 10:03 pm

Working!

First, I tried a slight different way to install the driver:

Device Manager -> Action menu -> install legacy hardware -> Next -> Advanced -> Ports (COM & LPT) -> AMTEL / Pico Serial Port ** -> Next -> Next to install
Installs as COM24 but still error Code 10
** previously I had pointed to the inf file that defined the device as a AMTEL Pico Serial Port

I unplugged the USB cable and reinserted it. Windows installs the driver (almost certainly the driver I provided) and assigned another port (COM25). I tried Thonny and it works - ran the 3 line script to toggle the onboard LED.

Many thanks to Robert for help with ideas.

Alan

PS I'm a bit of a dog with a bone when it come to IT problems!

BobinAtlanta
Posts: 2
Joined: Thu Oct 28, 2021 1:09 am

Re: [SOLVED] Cannot access Pico after uploading micropython using Thonny

Post by BobinAtlanta » Sat Nov 06, 2021 10:52 pm

Dear Alan and Robert,

I'm having them same problem, and thank you Robert to show how to see the Pico as a device on my iMac.

But Alan, when you loaded the installer, you started with "Device Manager -> etc" . Where is "Device Manager"? I looked all over Thonny and could not find it.

I am hopeful!
Bob

Alan_uk
Posts: 5
Joined: Sun Jul 18, 2021 1:55 pm

Re: [SOLVED] Cannot access Pico after uploading micropython using Thonny

Post by Alan_uk » Tue Nov 09, 2021 8:51 pm

Bob
But Alan, when you loaded the installer, you started with "Device Manager -> etc" . Where is "Device Manager"? I looked all over Thonny and could not find it.
Well Device Manager is easy: right click on Computer/My Computer and select Manage and enter Admin password then you see the Device Manager under System Tools. But now I had problems finding the "Add Legacy Hardware" option on the Action menu. Reason is it only appears when a device (a USB cable to the Pico in our case) is plugged in.

Google search found this (slightly modified):
You can go from Start Menu > Right click on Computer > Manage (Administrative p/w) > Device Manager.
Plug your device then "Add Legacy Hardware" option will be available on the Actions menu.
source: https://social.technet.microsoft.com/Fo ... workaround

CrabbyPete
Posts: 4
Joined: Tue Feb 18, 2020 1:35 pm

Re: [SOLVED] Cannot access Pico after uploading micropython using Thonny

Post by CrabbyPete » Fri Dec 10, 2021 2:12 pm

I am having the same problem on a Mac. The device /dev/cu.usbmodem1414101 is not there if I put micropython on it. It is there if I put circuit python on it.

Post Reply