-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Pico Fido flashing crashed when using ESP32 Flasher #77
Comments
You can put it in DFU mode and try flashing through espressif tools. |
After I kept pressed BOOT + RESET buttons, then released RESET, the board became again visible to OS as serial / uart. Then I flashed it with success with online ESP32 Flasher. No more error during that process.
Is this a normal behaviour? |
After flashing, is it listed by |
No it isn't. |
This is normal. Then you have to flash it. After flashing the image, do you see it at |
No, after successful flashing I don't see it at |
By default should appear with VID/PID FFFE:FDFC. If it doesn't appear, it might have some problem with USB stack. Which board do you use? |
I have Waveshare ESP32-S3-Zero. |
I have the same. I'd recommend to use Espressif tools to avoid any problem from the browser. |
Ok, so you recommend to clone repo and build from the source, right? |
It would be nice, but you can try first downloading the firmware from here https://github.com/polhenarejos/polhenarejos.github.io/blob/main/esp/fw/pico_fido_esp32-s3_6.0.bin sudo apt install -y git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
./install.sh esp32s3
. ./export.sh
cd ..
idf.py set-target esp32s3
idf.py all |
Thanks. I'll try in the afternoon and let you know. |
Ok, so I downloaded the bin firmware from the link you provided.
The command result was success:
But the final behaviour is the same - I got the same messages in
and the device is not visible in |
I also tried to build
but build process fails:
|
You have to use the |
Ok, build succeded. Thanks for the tip.
|
Did you reset after upload? It says “waiting for download” which means it is still in DFU. |
Yes, I did. After reset it is not discoverable in |
A bad board could be an option. The next I'd do is trying one official example from here: https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/device/
|
The board is ok. I've built and run examples
The example works as intended - it moves the cursor on host machine. |
Ok, one more observation..
and
So what's wrong with pico-fido..? |
There’s something in the HID descriptors you OS doesn’t like. Which OS do you use? Also it seems you are using a USB3 port. Try using a USB2 port. |
Manjaro Linux kernel 6.6.63-1
It's a pity but I don't have any USB2 port.. :( |
Same there, im using ESP32-S3 Supermini at development branch on Windows10. No device after flash. Led is blinking. :) |
I spotted the problem and fixed. ESP32-S3 has two limitations:
I'll push a fix today. |
@polhenarejos keeping fingers crossed it will help :) |
Signed-off-by: Pol Henarejos <[email protected]>
I pushed a fix in |
@polhenarejos I've pulled the code from
and in lsusb (I've commisioned it earlier via Pico Commissioner when I had pico-hsm installed):
Huge thanks @polhenarejos ! 👏 Now it's time for testing.. |
Ok.. so it's better but not perfect.. ;)
|
Rebuilt from the development branch and tried to install the pin in ykman under Linux. In this time I get a coredump. Crashed task handle: 0x3fcecff8, name: 'TinyUSB', GDB name: 'process 1070518264' ================== CURRENT THREAD REGISTERS =================== ==================== CURRENT THREAD STACK ===================== ======================== THREADS INFO =========================
0x3fcecff8 TinyUSB 5/5 4000/92 ==================== THREAD 1 (TCB: 0x3fcecff8, name: 'TinyUSB') ===================== ==================== THREAD 2 (TCB: 0x3fcaaccc, name: 'ipc1') ===================== ==================== THREAD 3 (TCB: 0x3fced15c, name: 'core0') ===================== ==================== THREAD 4 (TCB: 0x3fcacecc, name: 'IDLE1') ===================== ==================== THREAD 5 (TCB: 0x3fcac764, name: 'IDLE0') ===================== ==================== THREAD 6 (TCB: 0x3fcaa664, name: 'ipc0') ===================== ==================== THREAD 7 (TCB: 0x3fceb99c, name: '') ===================== ======================= ALL MEMORY REGIONS ======================== ===================== ESP32 CORE DUMP END =====================Done!` |
Unfortunately it doesn’t show anything meaningful. Can you cmake with |
All the same... Crashed task handle: 0x3fcecff8, name: 'TinyUSB', GDB name: 'process 1070518264' ================== CURRENT THREAD REGISTERS =================== ==================== CURRENT THREAD STACK ===================== ======================== THREADS INFO =========================
0x3fcecff8 TinyUSB 5/5 4000/92 ==================== THREAD 1 (TCB: 0x3fcecff8, name: 'TinyUSB') ===================== ==================== THREAD 2 (TCB: 0x3fcaaccc, name: 'ipc1') ===================== ==================== THREAD 3 (TCB: 0x3fced15c, name: 'core0') ===================== ==================== THREAD 4 (TCB: 0x3fcacecc, name: 'IDLE1') ===================== ==================== THREAD 5 (TCB: 0x3fcac764, name: 'IDLE0') ===================== ==================== THREAD 6 (TCB: 0x3fcaa664, name: 'ipc0') ===================== ==================== THREAD 7 (TCB: 0x3fceb99c, name: '') ===================== ======================= ALL MEMORY REGIONS ======================== ===================== ESP32 CORE DUMP END =====================Done!` |
What do you do to reproduce it? |
I just tried to set the pin right after reflashing: ykman fido access change-pin -n 111111 Previously, webauthn.io offered to set the pin in the browser, now it doesn't. I've reflashed the device several times already. |
Reflashing doesn’t clear user space. If set a pin, it is still present. To clean you have to call |
I'm always erase flash before reflashing. |
|
What do you mean? |
Can you increase the stack size? Change |
development branch coredump when:
|
Did you increase the stack size ? |
previous coredump was with 4096*5, but looks the same with:
|
coredumps to UART have to be decoded by yourself, as it depends on the hash of the build and mine and yours differ. Please paste the result of |
I tried with a larger stack size, the coredump output did not change. Now the device does not work at all after reflashing in Linux, when trying to set the pin code in Chromium, the LED blinks orange and green in turn and nothing happens. I managed several times to set pin in Chrome at Windows, after that the device works fine in both Linux and Windows. |
Are we increasing the right stack?? IMO stack overflow happens in "TinyUSB" Thread, but we are increasing "core0" stack
|
Yes, I think it is more likely an stack overflow in my code rather than in TinyUSB. You can try increase the stack of TinyUSB by adding
to |
It's work :) |
looks better ;)
|
Is there any hope that someday will be an eddsa firmware for esp32? |
Great! Can you check whether |
Nope. But I tried with unmodified main.c |
Which value do you think does it work? |
I'm not a coder, but 8192 is work... |
6144 is OK here |
How it is possible? My device ESP32 S3 Super Mini |
It is strange. The chipset and memory are the same, defined by the MCU ESP32-S3. Perhaps there's something broken in my code that overflows randomly affecting TinyUSB's stack. |
Or someone flashed the old binary, I tried several times... 7168 also works |
I'm reporting serious issue which just happened to me.
My device is Waveshare ESP32-S3-Zero. The host machine is Linux, web browser - Chrome.
I started flashing process using online ESP32 Flasher (https://www.picokeys.com/esp32-flasher). The flashing process was going well but stuck at info "wrapping up" for several minutes. I've checked the browser console. Here are the logs:
Now the device seems to be dead - no led lights, nothing when connecting to USB. Here are dmesg logs when I connect it to USB:
What can I do to make it alive again..? help, please.
The text was updated successfully, but these errors were encountered: