This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

why android auto-connect to hid device in sleep mode?

Hi, I find an interesting thing: when I test hid keyboard example with android and iOS, after pairing/bonding with the phone at the first connect time, even when phones are in sleep mode, when I power on my board, both android and iOS will connect to it automatically. But will other services like hrs, phone will not do the auto-connection, even paring/bonding are enabled.

So can you tell me the reason why hid mouse/keyboard get the different treatment?
Parents
  • Hi Loste,

    HID devices do have different treatment from the operating system. Main reason is that they are HID, the human input devices for the phone/tablet.

    They are managed by OS, not the app. And if you have a look at the design guideline for iOS device here. At section 3.6 you can find HID device also have better connection interval.

    You may want to use the keyboard/mouse to wake the chip up, and you want to wake it up with least latency from the time you press the button until the screen is on, that why it is connected automatically by the OS.

Reply
  • Hi Loste,

    HID devices do have different treatment from the operating system. Main reason is that they are HID, the human input devices for the phone/tablet.

    They are managed by OS, not the app. And if you have a look at the design guideline for iOS device here. At section 3.6 you can find HID device also have better connection interval.

    You may want to use the keyboard/mouse to wake the chip up, and you want to wake it up with least latency from the time you press the button until the screen is on, that why it is connected automatically by the OS.

Children
Related