SABRE MCIMX6Q-SDB OTG HID to wake up Windows host

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SABRE MCIMX6Q-SDB OTG HID to wake up Windows host

ソリューションへジャンプ
1,433件の閲覧回数
yuangaozhang
Contributor II

What can I set/customize (modifying kernel codes if necessary) so that SABRE imx6q (acting as a USB HID device) will generate wake-up signals?

I have a SABRE (imx6q) board running linux kernel 4.1, and use configfs on SABRE to simulate a HID gadget. Using an OTG cable to connect to my Windows PC, I can simulate mouse moving/clicking and keyboard typing from SABRE. However, when putting my Windows PC to sleep, I cannot wake it up from SABRE by any mouse/keyboard activities.

- on SABRE: I have set bmAttributes to 0xa0 (bus powered and remote wakeup enabled)

- on Windows PC: I have "Allow this device to wake the computer" selected

If I plug in a normal mouse and/or keyboard to Windows PC, I can wake my Windows PC. But plugging in the SABRE simulated HID I can't. The UDC used by SABRE is ci_hdrc.0.

Any help will be greatly appreciated.

~ Yuangao

PS: to add more info that I just found out: /dev/hidgX devices become blocked when my Windows PC gets in sleep. I'm imaging that if /dev/hidgX is still taking data during remote PC's sleep, and somehow trigger sending wake-up signals to PC. Please advise how do achieve such. Thanks.

ラベル(2)
1 解決策
881件の閲覧回数
Yuri
NXP Employee
NXP Employee

Hello,

  You may try to use USB Gadget API for Linux


https://www.kernel.org/doc/htmldocs/gadget/

In particular - the wake-up function.

https://www.kernel.org/doc/htmldocs/gadget/API-usb-gadget-wakeup.html

https://www.kernel.org/doc/htmldocs/gadget/core.html

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

2 返答(返信)
881件の閲覧回数
yuangaozhang
Contributor II

Thank you, Yuri. This is the API I was looking for. I've also found the answer somewhere else, and an alternative way to such is "echo 1 > /sys/devices/.../srp".

~yuangao

882件の閲覧回数
Yuri
NXP Employee
NXP Employee

Hello,

  You may try to use USB Gadget API for Linux


https://www.kernel.org/doc/htmldocs/gadget/

In particular - the wake-up function.

https://www.kernel.org/doc/htmldocs/gadget/API-usb-gadget-wakeup.html

https://www.kernel.org/doc/htmldocs/gadget/core.html

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------