forked from odysseywestra/Monoprice_22_linux_kernel_module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
60 lines (35 loc) · 2.16 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Bosto tablet driver 0.1a
========================
Driver for Linux kernels which is believed to support complete functionality of the tablet:
pen coordinates, touch/float/click detection, pressure, x and y tilt, pen
button.
Based on the driver originally developed directly at Hanwang.com.cn to support the Artmaster series of Hanvon Tablets.
Supported hardware
==================
Bosto 22HD
AM - Artmaster I, RL - Rollick, GP - GraphicPal, NXS - Nilox
Installation
============
Type 'make' to compile the module. New file bosto_2g.ko will be produced in
current directory. Load the module with root permissions
insmod ./bosto_2g.ko
If everything goes right the tablet should start working immediately.
However you may find that the generic usb_hid module will bind to the device by default.
To unbind the generic usb_hid driver :
echo -n "USB_BUS_ID" > /sys/bus/usb/drivers/usbhid/unbind e.g echo -n "2-3:1.0" > ..../unbind
Then attach the driver to the bosto_2g module.
echo -n "USB_ID" > /sys/bus/usb/drivers/bosto_2g/bind
Work in progress.
Diagnostics
===========
The current code outputs constantly to /var/log/kern.log. dmesg and you can see a packet decode as produced by the parse_packet function. Its a bit glitchy and I think a careful look at how and what gets reacted to might improve the effects of tracking jumps. i.e When the pen states PEN OUT, this seems inappropriate when the pen is touching the screen. Can we supress this?
After insmod, check with dmesg, if the module was loaded properly.
"Bosto 2nd Generation USB Driver module being initialised." should appear in the listing.
lsmod should also contain bosto_2g in its listing: lsmod | grep bosto_2g
Debug ouput now pattern matched to entries in the /sys/kernel/debug/dynamic_debug/control file
For example to see each time the driver detects a PEN_IN event, echo the following:
echo -n 'format "PEN_IN" +p' > <debugfs>/control
and off again
echo -n 'format "PEN_IN" -p' > <debugfs>/control
another possibility based on per line number in the source file. (See https://www.kernel.org/doc/Documentation/dynamic-debug-howto.txt )
echo -n 'file ./<path to source>/bosto_2g.ko line 230 +p' > <debugfs>/control