Posts: 2
Joined: Sat Jun 29, 2019 8:15 am

Miss the 1st key press event when BLE Keyboard wakeup

Thu Aug 01, 2019 12:04 pm

Hi Masters,
I find a tricky problem when we connect a BLE keyboard with Raspberry. Ok, let's discript it with detail:
1、I am working on raspberry zero W with my project. And the os version is (get it using uname -a):

Code: Select all

Linux raspberrypi 4.19.58+ #1245 Fri Jul 12 17:20:08 BST 2019 armv6l GNU/Linux
2、I code a nrf52832 as a keyboard. For saving power, I let it to sleep 10s later after a key is pressed.

After raspi connect with keyboard. keyboard can get the press event.
But after keyboard wakeup from sleep, it can not get the first keypress event.

I test it in windows, It also have this problem. It is because nrf52 soft reset from wakeup and miss the press event. So I find a way to get the soft wakeup event. And sent the key after wakeup. It work in windows but not good for raspberry pi.

Return to “Interfacing (DSI, CSI, I2C, etc.)”