NicoHood / HID

Bring enhanced HID functions to your Arduino!
http://www.nicohood.de
MIT License
2.37k stars 409 forks source link

BootKeyboard doesn't work with BootMouse #58

Closed bam80 closed 9 years ago

bam80 commented 9 years ago

If BootKeyboard and BootMouse used together in one sketch, only BootMouse works

NicoHood commented 9 years ago

Hm. Will check that later.

What if you combine a Bootkeyboard with Gamepad1 for example? Seems like two single reports dont work together (which ive never tested actually)

NicoHood commented 9 years ago

Are you using a 16u2 or 32u4? If its a 16u2 you should read the wiki page API Documentation once again ;)

bam80 commented 9 years ago

Oh I see now, thank you:

you can add up to 3 devices for the 32u4 and 1 for the 8/16/32u2

Is there any PR already to deactivating the CDC Serial? I can't enter UEFI setup without it to check mouse functionality ) PS: yes I'm using 16u2

NicoHood commented 9 years ago

I dont understand your 2nd sentence

With the 16u2 it is expected to not work. As written above please read the new wiki entry "API Documentation"

bam80 commented 9 years ago

As I understand the new Documentation, both BootKeyboard and BootMouse don't work with 16u2 because "I can add up to 1 device for the 8/16/32u2" but I need two devices to add. Thus, if I free the device used by CDC Serial, I would get more devices available and could use both BootKeyboard and BootMouse, could I? EDIT: if you are about my UEFI sentence - I have only bluetooth keyboard so I need Bootkeyboard working just to press 'DEL' to enter UEFI setup, that is why I can't test BootMouse for now..

NicoHood commented 9 years ago

Ah I see. Yes you are right. You could use a 32u4 instead.

Deactivating the Serial is not implemented and I dont know if the guys will ever support that. (since the reprogramming then needs a manual reset button press which is way too complicated for beginners, so we leave the serial always inside the core even if its not needed...). I will try to provide a patch for that if they dont do that. Could be a bit complicated though.

Pololu Mini LV is my favorite 32u4 board atm (with HoodLoader2 as bootloader for sure) ;)

bam80 commented 9 years ago

Thank you, the mouse is not really necessary for me in UEFI, I just wanted to test it because my UEFI setup apparently support it. So maybe it's not worth to spend time on it if it's too complicated. Pololu seems too pricey for just a IR receiver. What I look at is a Teensy LC, $11.65, but I wonder if IRLremote could work on it?

NicoHood commented 9 years ago

Nope ARM is not supported for IRLremote. As alternative Genuino Micro board is now way more cheap than before. (also 12€ like the LC). I like the pololu board since it supports 2.7V-11V which I can use with any power supply, especially I can just hook it up to my Led PSU.

UEFI would be nice if you can test it. Why not simple test BootMouse without keyboard? You can use a normal keyboard to enter the setup?

bam80 commented 9 years ago

Well, I just hoped because it seems like IRremote supports ARM)

As I said I have only bluetooth keyboard connected which is not boot USB capable. I could find casual USB keyboard though.. Actually I will certainly find it if you decide to not spent time on deactivating the Serial ;)

NicoHood commented 9 years ago

Just checked, the uefi that my dad has here doesnt set the protocol. Meaning it support normal HID devices. You might try to enter the setup with a normal keyboard. Then a normal mouse might also work.

I have some old pcs with mouse support at bios (well you can wiggle the mouse at startup and thats it) but this can be used to test it. Need to get my hands on that. Also I found the "bug": https://github.com/arduino/Arduino/pull/3966

Linux and Windows just dont set the protocol at reenumeration. who cares about usb protocols?

bam80 commented 9 years ago

My UEFI support USB boot protocol only (Keyboard class doesn't work), so I guess it's suitable case for mouse testing. Are you going to try deactivate the Serial near days?

NicoHood commented 9 years ago

I think there is other work to do first. So probably now. But I may come up with a solution today or within month, you never know ;) But a normal keyboard isnt so hard to find i guess...