Skip to content
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

USB protocol stack behaviour on boot time or BIOS #58

Closed
tmk opened this issue Sep 9, 2013 · 9 comments
Closed

USB protocol stack behaviour on boot time or BIOS #58

tmk opened this issue Sep 9, 2013 · 9 comments
Assignees

Comments

@tmk
Copy link
Owner

tmk commented Sep 9, 2013

I didn't test my firmware under boot/reboot, BIOS or boot selector like ntldr, grub and etc, and my code is not completely conformed to USB/HID spec. So I'm sure problems can remain to exist in my code.

NOTE: This issue comes form my work, not original PJRC/LUFA. I must say this for honor of them.

@tmk
Copy link
Owner Author

tmk commented Sep 9, 2013

PJRC stack doesn't work on Windows after reboot:

http://geekhack.org/index.php?topic=41989.msg1032558#msg1032558

Well, I have the keyboard working now, and I've only come across one issue I haven't been able to figure out: If the keyboard is plugged in when the computer is restarted (or shut down and powered up), windows ignores the input. I can use hid_listen and watch all the debug info, so I know the keyboard is working, windows just seems to be ignoring it. I can also duplicate this behavior on my laptop. Both computers are running Windows 7 x64. Unplugging the keyboard and plugging it back in restores it's full functionality. This problem does not happen if I boot with Ubuntu.

http://geekhack.org/index.php?topic=41989.msg1033644#msg1033644

EDIT: Rebuilding with the LUFA stack instead of PJRC has eliminated this problem.

@cub-uanic
Copy link
Contributor

I can confirm that I have same problem with Ergodox (on my fork). I use it with Debian. I can use kbd in BIOS and in Grub, but after system is loaded - I have to re-plug kbd to get it working.

I never had such problem with Ben's firmware.

Currently I use PJRC stack and never tried to use LUFA stack.
I'll let you know about results with LUFA when I'll try it.

@tmk
Copy link
Owner Author

tmk commented Sep 16, 2013

Using PJRC stack and Windows7 I also confirmed keyboard function doesn't work after reboot(but mouse function still worked). And resuming from sleep with keyboard(remote wakeup) only worked once, not after second.

LUFA stack has no problem on reboot and resuming.(I can resume computer four times in a row.)
On BIOS configuration and bootloader(ntldr) both stacks seem to have no problem.

LUFA seems to has no problem on these. You are recommended to use LUFA stack.
I made the transition to firmware built with LUFA stack and don't use PJRC stack recently. I recommend to use LUFA for your project now. There is no reason to hesitate to use LUFA except for binary size(about 1KB lager?). LUFA finally got support for NKRO recently, nothing prevents from using LUFA instead of PJRC now.

EDIT: I found and fixed problems; #114 and #115. 04/21/2014

@yeeeargh
Copy link

I used the PJRC stack till around july (when you said in [tmk_keyboard] USB spec confromance (#50) that you won't update the PJRC stat anymore). Until than PJRC worked great for me.
But I don't know the exact commit which introduced that bug, because I switched to LUFA after that commit.

@cub-uanic
Copy link
Contributor

I'd like to use LUFA, and even created Makefile for it:
cub-uanic@f5f7a17

But unfortunately, it doesn't work for me: keyboard constantly rebooting (I see this with leds).
I tried it with "-DBOOTLOADER_SIZE=4096" too, with same result.
What I'm doing wrong?

@tmk
Copy link
Owner Author

tmk commented Sep 16, 2013

umm, I can't come up with reasonable causes of the problem instantly so far. If I were you I would comment out all build options in Makefile and see the result at first.
And then try another USB port or remove all drivers of the keyboard on Device Managet in particular if you are on Windows.

@tmk
Copy link
Owner Author

tmk commented Apr 21, 2014

I fixed two problems of LUFA stack I found at commit 894a387; #114 and #115

The problem of PJRC stack won't be fixed probably. Use LUFA.

@T045T
Copy link

T045T commented Nov 19, 2014

From the comments, it looks like this is no longer really an issue if I use LUFA - is that right?

@tmk
Copy link
Owner Author

tmk commented Nov 19, 2014

Yes, it should be ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants