KMKfw / kmk_firmware

Clackety Keyboards Powered by Python
https://kmkfw.zulipchat.com
Other
1.39k stars 476 forks source link

[BUG] Latest kmk_firmware with latest CircuitPython 9.0.0.alpha.2 on ESP32-S3-DevKitC-1-N8 kinda breaks it #907

Open Anutrix opened 11 months ago

Anutrix commented 11 months ago

Describe the bug Latest kmk_firmware with latest CircuitPython 9.0.0.alpha on ESP32-S3-DevKitC-1-N8 breaks it. CIRCUITPY drive and even bootmode Drive both stop working. No matter what reset combination I use. I hear disconnect/reconnect sounds whenever I try any reset/boot buttons combination.

To Reproduce Steps to reproduce the behavior:

Expected behavior No errors or crashes to happen. CIRCUITPY drive shows up again.

Debug output Couldn't note it down as CIRCUITPY wouldn't show and nothing else worked. I am too scared to try again.

Additional context Wasn't sure which project to report but seeing as CircuitPython worked fine for a while before trying ZMK, I posted it here.

xs5871 commented 11 months ago

Citation from any CP download page:

Alpha development releases are early releases. They are unfinished, are likely to have bugs, and the features they provide may change.

This is not an issue with KMK. If you don't want bugs, both stable build and (usually) the release candidate are good options.

Anutrix commented 11 months ago

There were some recent fixes to ESP32-S3 which I wasn't sure if they got applied in Stable branch. It will try with 8.X stable CircuitPython next.

Anutrix commented 11 months ago

It is indeed issue with KMK not CircuitPython.

It happens whenever you hard reset after there's working KMK HID related code. On next hard reset, both HID logic and CIRCUITPY logic seems to run so CIRCUITPY is not visible.

Steps to reproduce:

  1. CIRCUITPY drive is visible. Edit code and add good KMK code with keyboard.go() line.
  2. Reconnect the USB cable or press button on the board.
  3. See CIRCUITPY go away but not come back.

I see following USBLogView as soon as I plug it in once: image

Seems like it tried to connect as drive but disconnected and turned into HID quickly. Which further disconnects.

Only solution was to go into CP's safe mode, add something else in main.py. After that it goes back to normal: Unsure about HID part but here's how it looks now: image

xs5871 commented 11 months ago

Did you confirm that this also happens with the stable release?

adam-huganir commented 10 months ago

I am having the same issue with the same board on 8.2.6 stable, i thought it was hardware and just used a different board but since I saw this ticket I thought I'd jump in and confirm

xs5871 commented 10 months ago

Looks like known issue: https://github.com/adafruit/circuitpython/issues/7664

adam-huganir commented 10 months ago

Awesome, i'll give that a try and get that lil macro pad up and running

Looks like known issue: adafruit/circuitpython#7664

claycooper commented 9 months ago

Closing as stale.