Closed TAMHAN closed 1 year ago
I suspect @mmoskal updated the C runtime to support 'fetch' and the VScode extension hasn't been updated yet.
We'll get this sorted out Monday.
Our CLI should probably be able to take a version number; but it doesn't yet.
Hello Peli, thank you for your swift reply. Is there a way for me to get my hands onto the older build? I can flash the UF2 file myself!
Hello Peli, sorry, but bad news. I just tried the firmware from https://github.com/microsoft/devicescript-pico/releases and installed it by hand. This seems to be a two week old firmware...and does not work either. The error is the same.
Hello, and an update. I also was able to connect to an ESP32-S2 module once. Now, I can no more:
{
context: 'serial',
exception: JDError [JacdacError]: serial device 303a:4001 (write error: ENODEV: no such device, write)
at NodeWebSerialIO.error (/home/tamhan/devicescript/p1/DeviceScriptP1/node_modules/@devicescript/cli/built/devicescript-cli.cjs:57068:15)
at /home/tamhan/devicescript/p1/DeviceScriptP1/node_modules/@devicescript/cli/built/devicescript-cli.cjs:57085:14
at async /home/tamhan/devicescript/p1/DeviceScriptP1/node_modules/@devicescript/cli/built/devicescript-cli.cjs:56457:9 {
code: undefined,
cancel: false
}
}
We pushed a new firmware today.
Please update the extension to v2.10.2 and also update the dependencies in your project. Then flash the firmware again.
Hello, thank you. I did the update, but no real avail on the RP2040. It now identifies as "DEV> Raspberry Pi Pico v2.10.2; file v2.9.16 DEV> Raspberry Pi Pico v2.10.2; file v2.9.16"
When I plug it in, it shows up like so: [ 905.694598] usb 1-1.6: new full-speed USB device number 8 using ehci-pci [ 905.829482] usb 1-1.6: New USB device found, idVendor=2e8a, idProduct=420a, bcdDevice= 1.00 [ 905.829487] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 905.829490] usb 1-1.6: Product: RP2040 [ 905.829492] usb 1-1.6: Manufacturer: Raspberry Pi [ 905.829495] usb 1-1.6: SerialNumber: JDe6605481db764e36 [ 905.830449] cdc_acm 1-1.6:1.0: ttyACM0: USB ACM device [ 905.834795] input: Raspberry Pi RP2040 as /devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.6/1-1.6:1.2/0003:2E8A:420A.0009/input/input25 [ 905.834951] hid-generic 0003:2E8A:420A.0009: input,hidraw2: USB HID v1.11 Gamepad [Raspberry Pi RP2040] on usb-0000:00:12.2-1.6/input2 [ 905.836695] input: Raspberry Pi RP2040 as /devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.6/1-1.6:1.3/0003:2E8A:420A.000A/input/input26 [ 905.895143] hid-generic 0003:2E8A:420A.000A: input,hidraw3: USB HID v1.11 Keyboard [Raspberry Pi RP2040] on usb-0000:00:12.2-1.6/input3 [ 905.896762] input: Raspberry Pi RP2040 as /devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.6/1-1.6:1.4/0003:2E8A:420A.000B/input/input27 [ 905.896960] hid-generic 0003:2E8A:420A.000B: input,hidraw4: USB HID v1.11 Mouse [Raspberry Pi RP2040] on usb-0000:00:12.2-1.6/input4
And it shows up for a second or so in VSCode (fully updated), only to disappear again afterward.
Hello, and also tried with the ESP32-S2. Same issue - the board shortly shows up and disappears. It identifies like so: DEV> Espressif ESP32-S2 (bare) v2.10.2; file v2.9.16 DEV> start: (no name) (null)
DEV> Espressif ESP32-S2 (bare) v2.10.2; file v2.9.16
There is version mistmatch between the bytecode and the firmware runtime. Could you try to do "flash firmware..." again?
Hello, thank you! I tried to run this both on Windows and Linux, and always got this version combination. Interestingly, also on the ESP32 board...
we should definitely detect the version mistmatch earlier on...
Actually it might be our "24h cache" messing around with you since we pushed the new binaries yesterday. If you use the CLI, try adding --refresh
.
Hello, sorry, I use the VSC. How do I do this command?
Tam
Assuming you have this board (https://microsoft.github.io/devicescript/devices/esp32/feather-s2), run
devicescript flash --board feather_s2 --refresh
Hello, ran it like so: tamhan@TAMHAN18:~/devicescript/p1/DeviceScriptP1$ node ./node_modules/.bin/devicescript flash --board pico --install --refresh using devs: v2.10.2, runtime: v2.10.2, node: v18.16.0 from /home/tamhan/devicescript/p1/DeviceScriptP1/node_modules/@devicescript/cli/built no drives found; please plug your board while holding BOOTSEL button (or specify --drive) Re-scanning every second for the next 120 seconds, Ctrl-C to stop... using drive /media/tamhan/RPI-RP2/ fetch https://github.com/microsoft/devicescript-pico/releases/latest/download/devicescript-rp2040-pico.uf2 saved .devicescript/cache/devicescript-rp2040-pico.uf2 395264 bytes cp .devicescript/cache/devicescript-rp2040-pico.uf2 /media/tamhan/RPI-RP2/ OK tamhan@TAMHAN18:~/devicescript/p1/DeviceScriptP1$
Sadly, no progress: DEV> Raspberry Pi Pico v2.10.2; file v2.9.16
And still the same issue!
could you try to manually download and copy https://github.com/microsoft/devicescript-pico/releases/download/v2.10.200/devicescript-rp2040-pico.uf2 to your pico? It seems that we are deploying an older firmware.
could you update the devicescript extension in vscode and run "DeviceScript: Report Issue..." . It will give us more info on what's happening (hopefully)
Also try to update the tooling, just in case. Run this from your project folder:
yarn upgrade @devicescript/cli@latest
Hello, first the results of the YARN upgrade: tamhan@TAMHAN18:~/devicescript/p1/DeviceScriptP1$ yarn upgrade @devicescript/cli@latest yarn upgrade v1.21.1 warning ../../../package.json: No license field [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Rebuilding all packages... success Saved lockfile. success Saved 2 new dependencies. info Direct dependencies └─ @devicescript/cli@2.10.3 info All dependencies ├─ @devicescript/cli@2.10.3 └─ @devicescript/compiler@2.10.3 Done in 10.20s.
Hello, second, I just ran the report issue function.
Hello, and thirdly, I downloaded and manually deployed the UF2 file. Still, I get this result: DEV> Raspberry Pi Pico v2.10.2; file v2.9.16
And still not working.
I can send you the file I just downloaded. The GitHub does not allow it attached. But,. here is the SHA1 tamhan@TAMHAN18:~/Downloads$ sha1sum "devicescript-rp2040-pico(1).uf2" 60e997dd8ff7efb6948fb5ae8d80370f1e185e3a devicescript-rp2040-pico(1).uf2
It is different from an older file I downloaded some days ago, where I got this: tamhan@TAMHAN18:~/Downloads$ sha1sum "devicescript-rp2040-pico.uf2" af297e7185bbaf55fd7eb9051a08a7cffe29af16 devicescript-rp2040-pico.uf2
@mmoskal i might be missing something obvious. Any idea?
Hello, please check the sha1sum if I use the right file. Or send me the file I should use by email. It is tamhan aeht tamoggemon dott com
Could you run the main.ts file using the updated addon?
Sadly not, the connection to the device is lost too quickly!
Ha we might be getting somewhere. @mmoskal add the --clear flag to the flash cli command.
Try
devs flash --board pico --clear
Hello, this worked:
tamhan@TAMHAN18:~/devicescript/p1/DeviceScriptP1$ node ./node_modules/.bin/devicescript flash --board pico --install --clear --refresh error: unknown option '--clear' (Did you mean --clean?) tamhan@TAMHAN18:~/devicescript/p1/DeviceScriptP1$ node ./node_modules/.bin/devicescript flash --board pico --install --clean --refresh using devs: v2.10.3, runtime: v2.10.3, node: v18.16.0 from /home/tamhan/devicescript/p1/DeviceScriptP1/node_modules/@devicescript/cli/built no drives found; please plug your board while holding BOOTSEL button (or specify --drive) Re-scanning every second for the next 120 seconds, Ctrl-C to stop... using drive /media/tamhan/RPI-RP2/ fetch https://datasheets.raspberrypi.com/soft/flash_nuke.uf2 saved .devicescript/cache/flash_nuke.uf2 25600 bytes cp .devicescript/cache/flash_nuke.uf2 /media/tamhan/RPI-RP2/ OK tamhan@TAMHAN18:~/devicescript/p1/DeviceScriptP1$ node ./node_modules/.bin/devicescript flash --board pico --install --refresh using devs: v2.10.3, runtime: v2.10.3, node: v18.16.0 from /home/tamhan/devicescript/p1/DeviceScriptP1/node_modules/@devicescript/cli/built using drive /media/tamhan/RPI-RP2/ fetch https://github.com/microsoft/devicescript-pico/releases/latest/download/devicescript-rp2040-pico.uf2 saved .devicescript/cache/devicescript-rp2040-pico.uf2 395264 bytes cp .devicescript/cache/devicescript-rp2040-pico.uf2 /media/tamhan/RPI-RP2/ OK tamhan@TAMHAN18:~/devicescript/p1/DeviceScriptP1$
It now identifies like so: DEV> Raspberry Pi Pico v2.10.2; file v2.10.0
Now I will experiment a bit more and report shortly!
Tam
Hello, LOL, and I found something else. This program seems to kill the debug connection:
import { pins } from "@dsboard/pico"
import { startLightBulb } from "@devicescript/servers"
const led = startLightBulb({
pin: pins.P10,
})
while(1===1){
await led.intensity.write(1)
await led.intensity.write(0)
await led.intensity.write(1)
await led.intensity.write(0)
}
Try adding await delay(100) between the writes.
From: Tam HANNA @.> Sent: Tuesday, June 6, 2023 8:05:35 AM To: microsoft/devicescript @.> Cc: Peli de Halleux @.>; Comment @.> Subject: Re: [microsoft/devicescript] Raspberry Pi Pico can no longer be detected since today (Issue #434)
Hello, LOL, and I found something else. This program seems to kill the debug connection:
import { pins } from @./pico" import { startLightBulb } from @./servers"
const led = startLightBulb({ pin: pins.P10, })
while(1===1){ await led.intensity.write(1) await led.intensity.write(0) await led.intensity.write(1) await led.intensity.write(0) }
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/devicescript/issues/434#issuecomment-1578941235, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA73QKOEFUJ6NEY5U3UMG3DXJ5BL7ANCNFSM6AAAAAAY2HT4YU. You are receiving this because you commented.Message ID: @.***>
Closing this issue as the root cause was found and the v2.10.4 will fix this.
It was my honour thank you!
For future reference: DEV> Raspberry Pi Pico v2.10.2; file v2.9.16
- this means the firmware is 2.10.2 and the bytecode file (user program) is 2.9.16, which should be completely fine, except it was flooding the bus with too many packets. This is definitely something we need to fix, tracking as #432
Describe the bug Yesterday, VS Code was still able to detect my RP2040 based Raspberry Pi Pico on Ubuntu 20.04LTS. Today, it can no more. I changed nothing in the configuration.
To Reproduce a) install firmware using the Visual Studio Code. This works well:
Next, click the connect device option in the DeviceScript pane of VS Code. Nothing happens, then this error drops:
The Raspberry Pi Pico device does show up well in the lsusb:
And also in the DMESG:
Expected behavior This is really weird, as the system worked yesterday
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.