Page 1 of 1

Прикручиваем планшет

Posted: Sat Apr 11, 2020 3:48 am
by Михалыч
Подключил графический планшет к виртуальной машине, в доске отладки появились unclaimed HID input в виде пар usage и value. Более-менее разобравшись какой usage какие данные передаёт, решил их как-то обработать. Но как?

Единственный вариант, который мне пришёл в голову: писать драйвер. Но, судя по информации из той же доски отладки, подключается он очень страшно, в связи с чем два вопроса:

1)Как писать к такому драйвер?

2)Можно ли обойтись без драйвера и программой ловить и обрабатывать эти unclaimed HID input?

При расшифровке report descriptor верхний не сообщает ничего полезного кроме как что usage определяется вендором, а нижний говорит, что у нас на руках User page: Digitizers, Usage: Pointers, и начинает что-то передавать про стилус, но похоже дескриптор не полный, видимо не влез в строку, и дальше понять ничего нельзя.

Re: Прикручиваем планшет

Posted: Sat Apr 11, 2020 6:06 pm
by dunkaist
Михалыч wrote:1)Как писать к такому драйвер?
There is usbhid driver by CleverMouse. My understanding is that you should extend it, not write a new one.
The message 'unclaimed HID input' goes from /drivers/usb/usbhid/unclaimed.
Михалыч wrote:2)Можно ли обойтись без драйвера и программой ловить и обрабатывать эти unclaimed HID input?
AFAIK, no.
Михалыч wrote:похоже дескриптор не полный, видимо не влез в строку, и дальше понять ничего нельзя.
You can open debug logs in any text editor: a) close the debug board, b) find the log in /tmp0/1/BOARDLOG.TXT.
For testing purposes it may also be convenient to duplicate debug log directly to the screen. There is an option for that on the blue boot screen.

Re: Прикручиваем планшет

Posted: Sat Apr 11, 2020 6:49 pm
by Leency
You can also press F2 on the Debug Board ;)

Re: Прикручиваем планшет

Posted: Sat Apr 11, 2020 6:56 pm
by Михалыч
dunkaist wrote:There is usbhid driver by CleverMouse. My understanding is that you should extend it, not write a new one.
The message 'unclaimed HID input' goes from /drivers/usb/usbhid/unclaimed.
Yes, I tried to understand it, but couldn't figure out where exactly it recognizes the type of device and gives control to the corresponding part of this driver and which part of it I should change.

Re: Прикручиваем планшет

Posted: Sat Apr 11, 2020 8:05 pm
by dunkaist
Михалыч wrote:Yes, I tried to understand it, but couldn't figure out where exactly it recognizes the type of device and gives control to the corresponding part of this driver and which part of it I should change.
I'm not familiar with this particular driver but look here.