> wacom_features is not shared exactly. Each interface has its own > features but its value is initialized from a common value. > > What you need to do is figure out a way to touch up the values that do > not make sense for a given interface. Normally, this is done in > wacom_parse_hid() but in your case it probably needs to be done > somewhere else (I'll help figure that out with you soon but for now > just hardcode it in wacom_probe() somehow).
Ahh ok, I think I misunderstood why the code was failing when I tweaked the wacom_features for the other interface. I have now done as you suggested and it seems to work well. > True, put you can check USB interface # in wacom_probe() and override > pkglen there. Then you can base your settings in > wacom_setup_input_capabilities() based on pktlen. Yes, this works well. > FYI: I realize this all looks kinda ugly. I'm working on some ideas > on how to clean this up. As long as you get this working, I'll help > clean it up. So far everything works fine in evdev, but I am still having problems getting the X driver to pick up the device. Currently the interface with the buttons works (the L and R buttons on the tablet work as left and right mouse buttons) however the stylus interface is still being ignored. I got the logging working with 'xinput set-prop device_name "Wacom Debug Levels" 10 10' from your other e-mail and the correct events are logged: [ 26093.031] (II) Wacom DTI520UB/L stylus (10:wcmReady): 1 numbers of data [ 26093.031] (II) /dev/input/event13 (10:wcmReadPacket): fd=75 [ 26093.031] (II) /dev/input/event13 (1:wcmReadPacket): pos=0 remaining=256 [ 26093.031] (II) /dev/input/event13 (10:wcmReadPacket): buffer has 72 bytes [ 26093.031] (II) /dev/input/event13 (10:usbParseEvent): [ 26093.031] (II) /dev/input/event13 (10:usbParseEvent): [ 26093.031] (II) /dev/input/event13 (10:usbParseEvent): [ 26093.031] (II) /dev/input/event13 (6:usbDispatchEvents): 3 events received [ 26093.031] (II) /dev/input/event13 (10:wcmEvent): channel = 0 [ 26093.031] (II) /dev/input/event13 (10:wcmEvent): c=0 i=0 t=0 s=1 x=3806 y=2352 b=0 p=0 rz=0 tx=0 ty=0 aw=0 aw2=0 rw=0 t=0 px=0 st=0 cs=0 [ 26093.031] (II) Wacom DTI520UB/L stylus (10:wcmReady): 0 numbers of data [ 26093.031] (II) Wacom DTI520UB/L stylus (10:wcmDevReadInput): Read (1) Yet "xinput test" doesn't display any events for the stylus interface. Any ideas what I could be doing wrong? $ xsetwacom --list devices Wacom DTI520UB/L stylus id: 13 type: STYLUS Wacom DTI520UB/L pad id: 14 type: PAD $ xinput list-props 13 Device 'Wacom DTI520UB/L stylus': Device Enabled (121): 1 Coordinate Transformation Matrix (123): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 Device Accel Profile (245): 0 Device Accel Constant Deceleration (246): 1.000000 Device Accel Adaptive Deceleration (247): 1.000000 Device Accel Velocity Scaling (248): 10.000000 Device Node (620): "/dev/input/event13" Wacom Tablet Area (621): 0, 0, 6282, 4762 Wacom Rotation (622): 0 Wacom Pressurecurve (623): 0, 0, 100, 100 Wacom Serial IDs (624): 58, 0, 2, 0 Wacom Serial ID binding (625): 0 Wacom Pressure Threshold (626): 27 Wacom Sample and Suppress (627): 2, 4 Wacom Enable Touch (628): 0 Wacom Hover Click (629): 1 Wacom Enable Touch Gesture (630): 0 Wacom Touch Gesture Parameters (631): 0, 0, 250 Wacom Tool Type (632): "STYLUS" (441) Wacom Button Actions (633): "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0) Device Product ID (634): 1386, 58 Wacom Debug Levels (635): 0, 0 I am configuring the device like this in wacom_setup_input_capabilities(): case WACOM_DTI: __clear_bit(ABS_MISC, input_dev->absbit); switch (features->device_type) { case BTN_TOOL_PEN: __set_bit(BTN_TOOL_PEN, input_dev->keybit); __set_bit(BTN_STYLUS, input_dev->keybit); __set_bit(BTN_STYLUS2, input_dev->keybit); __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); break; case 0: __set_bit(BTN_BACK, input_dev->keybit); __set_bit(BTN_FORWARD, input_dev->keybit); __set_bit(BTN_LEFT, input_dev->keybit); __set_bit(BTN_RIGHT, input_dev->keybit); __set_bit(BTN_EXTRA, input_dev->keybit); __set_bit(BTN_0, input_dev->keybit); __set_bit(BTN_1, input_dev->keybit); __set_bit(BTN_2, input_dev->keybit); __set_bit(BTN_3, input_dev->keybit); __set_bit(BTN_4, input_dev->keybit); __clear_bit(BTN_TOUCH, input_dev->keybit); break; } break; Perhaps I am not setting something on the BTN_TOOL_PEN interface that I should be. > Maybe this will be helpful to understand what I'm thinking. I'm > working on support for a wireless module that has 3 USB interfaces: A > monitor interface (so you can detect when wireless tablet is > connected), a pen interface, and a touch interface. To help out, I > gave the device type a unique name (BAMBOO_WIRELESS) and then I set > device_type to either 0, STYLUS, or DOUPLETAP (touch) depending on > interface #. I also set pktlen when needed based on interface #. > > http://www.spinics.net/lists/linux-input/msg19345.html > > Between device_type and pkglen, I can tell what interface I'm running > on without looking at interface # any more. Thanks for the example, it was very helpful! Cheers, Adam. ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel