prk_firmware icon indicating copy to clipboard operation
prk_firmware copied to clipboard

Keyboard can be used on BIOS (rebased)

Open yswallow opened this issue 2 years ago • 6 comments

(rewrite of #130)

I tested keyboard keys, consumer, VIA, CDC ACM and MSC can be used on Report (the same as current) mode.

yswallow avatar Aug 02 '22 09:08 yswallow

@yswallow I've tried this branch on my laptop, Dell Latitude 3420, but unfortunately, it didn't work on the BIOS screen. No response to any key input.

At the same time, I think this BIOS feature doesn't have a breaking side-effect because I also confirmed the HID features like Joystick and Consumer work.

So, my suggestion is to release this feature as an experimental one and wait for user feedback. Let me hear what you think :)

Thanks!

[Edit] It looks like PRK froze when it connects to BIOS because the RGB task doesn't work

hasumikin avatar Aug 03 '22 00:08 hasumikin

I think this BIOS feature doesn't have a breaking side-effect

If PRK did not enter Report mode, features except Keyboard don't work. So I did checks.

It looks like PRK froze when it connects to BIOS

That's too bad. And I cannot reproduce it yet.

release this feature as an experimental one

Sounds good.

yswallow avatar Aug 03 '22 02:08 yswallow

Update: I found BIOS mode doesn't works on Hewlett Packard Z2 workstation (while the mode works on Lenovo ThinkPad X220 and FUJITSU FUTRO MS836).

And I found HP's BIOS requests Keyboard for report descriptor. In this PRK implementation, on receiving report descriptor request, PRK resets to Report mode. I tried to stop resetting and answer report descriptor, but then, PRK cannot enter Report mode even if OS booted. So it needs other way to be fixed. ~~(Use other interface for Keyboard report.)~~ ←I heard that if Interface0 is used for Boot Keyboard, USB Serial won't work on Windows7.

[Edit] USB Serial limitation above is only on Windows7 and before, so it works on Windows 10 and 11, using interface0 for boot keyboard may be better way...

yswallow avatar Aug 03 '22 08:08 yswallow

I found HP's BIOS ignores keyboard with MSC class. So for those environment, build_with_keymap is needed.

I made a implementation for HP's BIOS. ( https://github.com/yswallow/prk_firmware/releases/tag/0.9.17-bios ) Can you try this on Dell PC?

yswallow avatar Aug 07 '22 05:08 yswallow

@yswallow I tested it with meishi2.

Firstly, I installed prk-for-BIOS-with-msc.uf2 and dropped the keymap.rb:

kbd = Keyboard.new
kbd.init_pins(
  [ 6, 7 ],   # row0, row1
  [ 28, 27 ]  # col0, col1
)
kbd.add_layer :default, %i[ KC_LEFT KC_DOWN KC_UP KC_RIGHT ]
kbd.start!

This didn't work on BIOS of Dell Latitude 3420.

Then, I installed prk-for-BIOS.uf2 into the same meishi2.

I guess this uf2 takes over the keymap.rb that I dropped into the MSC earlier, right? I confirmed this meishi2's cursor keys work on Windows11.

But It also didn't work on BIOS....

hasumikin avatar Aug 09 '22 07:08 hasumikin

this uf2 takes over the keymap.rb

Right.

But It also didn't work on BIOS.

Mmm... too difficult...

yswallow avatar Aug 09 '22 12:08 yswallow

@yswallow I'm merging this PR since at least it has no bad side effects

hasumikin avatar Aug 24 '22 11:08 hasumikin