Open jkozniewski opened 9 months ago
any updates on this matter - seems to be possibly related to https://github.com/paulober/MicroPico/issues/199 ?
Thanks for reporting.
any updates on this matter - seems to be possibly related to https://github.com/paulober/MicroPico/issues/199 ?
Maybe. To find out please reproduce the bug and then run following commands in your terminal:
ls /dev/cu.*
lsof /dev/cu.<insert the port name of your board here>
If this command returns any output your issue should be caused by the same problem as #199.
If that's the case, this could potential solve the issue: wrapper_macOS_arm64.zip
On macOS arm64 replace the wrapper_macOS_arm64
folder in ~/.vscode/extensions/paulober.pico-w-go-3.7.5-darwin-arm64/dist/scripts
with the folder in the zip file.
Hi, @paulober sorry for the delayed reply but I had to postpone working on the project a bit, and now getting back...
I've replaced the folder but now Mac Os whines about the code not being signed:“wrapper_macOS_arm64.bin” cannot be opened because the developer cannot be verified.
so not sure how can I work around that.. also if that potentially fixes the problem, can you just deploy it in new version of the extension ?
Also - now (I mean before I've attempted replacing the folder) occasionally it stuck during project upload, once it even bricked the Pico and I had to put the fresh uf2 again...
I have replaced the contents of a wrapper with the files you have provided some time ago and it seemed to help for a while - though it still wasn't perfect in terms of connection/disconnecting bug. But after getting back to the project I have to report that the problem persists, not sure if that's because an automatic update of a extension (v3.7.6) overwrote the wrapper lib to a worse version again ?
Anyway the connection to the board is super finicky - a rather random sequence of disconnecting the usb, relaunching VSCode, connecting again etc. end even sometimes just launching Thonny in between gets problem sorted for a while.
Let me know how can I help to investigate the issue further to get things working in a stable manner. Thanks !
oh and btw - I ran the command you have mentioned before (lsof /dev/cu.<insert the port name of your board here>
) while experiencing the issues and got following output:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
UltiMaker 29003 jkozniewski 67u CHR 9,19 0t182 4945 /dev/cu.usbmodem21201
wrapper_m 70385 jkozniewski 3u CHR 9,19 0t107 4945 /dev/cu.usbmodem21201
Curious that there is this Ultimaker thing - that's probably because I had Cura launched, nevertheless quitting it didn't really help and got just "wrapper" entry when I've re-ran the cmd.
Ok and now after problems with connecting to Pico and quitting VSCode the lsof /dev/cu.
gives:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
wrapper_m 3050 jkozniewski 3u CHR 9,1 0t486 5063 /dev/cu.usbmodem21201
So it seems the process is not properly killed / not releasing usb port properly ?
BTW - Killing the process via terminal cmd kill
and restarting the VSCode did not help with constant "connected/disconnected" loop - Thonny on the orther hand had no issues with the connection.
What helped immediately though was changing the USB port in my usb hub - we'll see how long it's gonna last and if it "fixes" the probem every time - I'll let you know. Hope there are some leads that would help to solve the issue !
Hello - any chance for making a serial connection with pico more stable ? I still have pretty bad experience and it kind of semi randomly works better or worse - though Thonny seems much more reliable so I really doubt it's anything hardware related. If I can help any further with debbuging just let me know !
Hello - any chance for making a serial connection with pico more stable ?
Sorry for the delayed response and thanks for doing all the debugging. Yes, with v4. It's finally out and has many improvements concerning stability. Does v4 finally solve your issues?
Hi - Thanks Paul - indeed I got back working with Pico Pi recently and it seems to be much more stable than before. Still not perfect - it can get occasionally stuck (and then re-connecting in Thonny and re-raluching VS Code is proven method to get back on track) but I can feel there was an improvement ! Much appreciated. I'll keep you posred if I'll find any reproducible errors.
What are the steps to reproduce this issue?
What happens?
Despite the "Pico Connected" info in status bar trying to run any command does nothing, no error, just nothing happens
What were you expecting to happen?
All commands should work as expected after re-connecting usb and while "Pico Connected" status is displayed.
Any logs, error output, etc?
No explicit errors shown in OUTPUT, there is following info generated after opening VS Code, successfully connecting to pico, running code, then disconnecting usb and re-connecting:
Any other comments?
I'm on Mac Book Pro M3 Max; Sonoma 14.1.1
It seems there is some issue with ports being locked / not properly released since after doing:
ps -ef | grep /dev/cu.usbmodem21201
I get (even after closing VS Code):Then after killing the process via
kill
command pointing to PID of the process above I'm usually able to run / upload / etc again.Another cue to something wrong with ports (being blocked ?) is that when I launch Thonny after MicroPico stops working I get the message there such as:
Even if VS Code is closed before launching Thonny
Which version of MicroPico are you using?
MicroPython v1.22.1 on 2024-01-05; Raspberry Pi Pico W with RP2040
Support info
Copy this from the
Help -> Info/About -> Copy
(Code -> About Visual Studio Code -> Copy
on macOS) option in Visual Studio Code: