Skip to content

PS/2 Keyboard recognition on PC power ON inconcistency #21

@cmarkak

Description

@cmarkak

Hi,

Many thanks for this great library!

In my computer, M/B and PC case incompatibility prevent it from booting properly unless F1 is pressed in the BIOS.

I use an arduino to press F1 after powering on my computer in order to proceed to booting windows and I would like this to be done remotely with an IoT plug.

Currently, I have two ways of powering on my computer:

  1. With the power button directly, when power is supplied to the computer
  2. With an IoT power plug.

I have managed to make it work when I use the power button (with the IoT plug always on). The builtin led corresponding to num lock lights up, so the keyboard_handle() is working as intended) and the F1 button is emulated successfully, proceeding to boot.

But with the IoT plug, when initially powered off, when I turn it on, it is not working. The builtin led does not go to the on state, indicating a problem in communication.

I run a few tweaks/tests on my own with the library to no avail. I imagine it has to do with the initialization timing in the booting sequence because in the case of the IoT plug, there is a slight delay of about 1 second before the computer boots in comparison the the power on button.

I have tested with a working ps/2 keyboard and it works in both cases.

Some observations from my tests

  • The keyboard_init() function completes in both cases
  • I tried including some delays before and after the keyboard_init() function but no luck, maybe it is a matter of more trials combinations?
  • Initially, the CLK and DATA pins are on 5V in both cases, but in the non-working case, when the write function initiates the CLK pin goes to LOW state. That happens for some reason before the call to the write() function because I have also found with a debugging led that the function exits with code -1 when entering "if (digitalRead(_ps2clk) == LOW) {" block.
  • The keyboard_init() function never completes when the windows is already booted. But to be honest the ps/2 keyboard that otherwise works does not get recognized either so maybe this is not relevant.

Any help or insight on the problem would be highly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions