* touchscreen wirh 2.6.26 @ 2009-11-25 3:57 Alex Custov 2009-11-27 10:59 ` Jiri Kosina 0 siblings, 1 reply; 7+ messages in thread From: Alex Custov @ 2009-11-25 3:57 UTC (permalink / raw) To: linux-kernel Hello. I have Acer T230H on Debian Lenny with 2.6.26.8 manually complied kernel. The problem is that this is a multitouch monitor and it seems that it doesn't work at all (even single touches). All things under "Drivers => Input device support => Touchscreens" are enabled in kernel (as modules). Is this type of monitor supported, or I should upgrade to a newer kernel? Thanks. Please CC any comments. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: touchscreen wirh 2.6.26 2009-11-25 3:57 touchscreen wirh 2.6.26 Alex Custov @ 2009-11-27 10:59 ` Jiri Kosina 2009-11-27 12:03 ` Alex Custov 0 siblings, 1 reply; 7+ messages in thread From: Jiri Kosina @ 2009-11-27 10:59 UTC (permalink / raw) To: Alex Custov; +Cc: linux-kernel On Wed, 25 Nov 2009, Alex Custov wrote: > I have Acer T230H on Debian Lenny with 2.6.26.8 manually complied > kernel. The problem is that this is a multitouch monitor and it seems > that it doesn't work at all (even single touches). All things under > "Drivers => Input device support => Touchscreens" are enabled in kernel > (as modules). Is this type of monitor supported, or I should upgrade to > a newer kernel? Thanks. How is the touchscreen conntected to system? Is it USB? If so, what is the vendor and product ID? (lsusb will tell). -- Jiri Kosina SUSE Labs, Novell Inc. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: touchscreen wirh 2.6.26 2009-11-27 10:59 ` Jiri Kosina @ 2009-11-27 12:03 ` Alex Custov 2009-11-27 12:10 ` Jiri Kosina 0 siblings, 1 reply; 7+ messages in thread From: Alex Custov @ 2009-11-27 12:03 UTC (permalink / raw) To: Jiri Kosina; +Cc: linux-kernel 2009/11/27 Jiri Kosina <jkosina@suse.cz>: > On Wed, 25 Nov 2009, Alex Custov wrote: > >> I have Acer T230H on Debian Lenny with 2.6.26.8 manually complied >> kernel. The problem is that this is a multitouch monitor and it seems >> that it doesn't work at all (even single touches). All things under >> "Drivers => Input device support => Touchscreens" are enabled in kernel >> (as modules). Is this type of monitor supported, or I should upgrade to >> a newer kernel? Thanks. > > How is the touchscreen conntected to system? Is it USB? If so, what is the > vendor and product ID? (lsusb will tell). > > -- > Jiri Kosina > SUSE Labs, Novell Inc. > > Hi. Thanks for answer. I've already found the /dev device it has - it is /dev/usb/hiddev0. Yes, it is USB connected. I did "cat /dev/usb/hiddev0" and touched some points on the screen, it seems that it works (I got some binary data from 'cat'). Now I will try to add the corresponding section to the xorg.conf to let it work in X. -- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: touchscreen wirh 2.6.26 2009-11-27 12:03 ` Alex Custov @ 2009-11-27 12:10 ` Jiri Kosina 2009-11-27 17:36 ` Alex Custov 0 siblings, 1 reply; 7+ messages in thread From: Jiri Kosina @ 2009-11-27 12:10 UTC (permalink / raw) To: Alex Custov; +Cc: linux-kernel On Fri, 27 Nov 2009, Alex Custov wrote: > >> I have Acer T230H on Debian Lenny with 2.6.26.8 manually complied > >> kernel. The problem is that this is a multitouch monitor and it seems > >> that it doesn't work at all (even single touches). All things under > >> "Drivers => Input device support => Touchscreens" are enabled in kernel > >> (as modules). Is this type of monitor supported, or I should upgrade to > >> a newer kernel? Thanks. > > > > How is the touchscreen conntected to system? Is it USB? If so, what is the > > vendor and product ID? (lsusb will tell). > > Hi. Thanks for answer. I've already found the /dev device it has - it > is /dev/usb/hiddev0. Yes, it is USB connected. I did "cat > /dev/usb/hiddev0" and touched some points on the screen, it seems that > it works (I got some binary data from 'cat'). Now I will try to add > the corresponding section to the xorg.conf to let it work in X. It might not be that trivial -- /dev/usb/hiddev0 gives you only more-or-less raw HID data, but they have still to be interpreted somehow to make sense. If the device is implementing some vendor-specific (or device-specific) protocol, then the data you see coming through hiddev0 might not be useful at all directly in X. Repeating from my previous mail -- please provide the idVendor/idProduct (found by lsusb -v) for this device. It might be supported in later kernels, but without this information, it's impossible to tell. -- Jiri Kosina SUSE Labs, Novell Inc. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: touchscreen wirh 2.6.26 2009-11-27 12:10 ` Jiri Kosina @ 2009-11-27 17:36 ` Alex Custov 2009-11-27 23:30 ` Jiri Kosina 0 siblings, 1 reply; 7+ messages in thread From: Alex Custov @ 2009-11-27 17:36 UTC (permalink / raw) To: Jiri Kosina; +Cc: linux-kernel 2009/11/27 Jiri Kosina <jkosina@suse.cz>: > On Fri, 27 Nov 2009, Alex Custov wrote: > >> >> I have Acer T230H on Debian Lenny with 2.6.26.8 manually complied >> >> kernel. The problem is that this is a multitouch monitor and it seems >> >> that it doesn't work at all (even single touches). All things under >> >> "Drivers => Input device support => Touchscreens" are enabled in kernel >> >> (as modules). Is this type of monitor supported, or I should upgrade to >> >> a newer kernel? Thanks. >> > >> > How is the touchscreen conntected to system? Is it USB? If so, what is the >> > vendor and product ID? (lsusb will tell). >> >> Hi. Thanks for answer. I've already found the /dev device it has - it >> is /dev/usb/hiddev0. Yes, it is USB connected. I did "cat >> /dev/usb/hiddev0" and touched some points on the screen, it seems that >> it works (I got some binary data from 'cat'). Now I will try to add >> the corresponding section to the xorg.conf to let it work in X. > > It might not be that trivial -- /dev/usb/hiddev0 gives you only > more-or-less raw HID data, but they have still to be interpreted somehow > to make sense. > > If the device is implementing some vendor-specific (or device-specific) > protocol, then the data you see coming through hiddev0 might not be useful > at all directly in X. > > Repeating from my previous mail -- please provide the idVendor/idProduct > (found by lsusb -v) for this device. It might be supported in later > kernels, but without this information, it's impossible to tell. > > -- > Jiri Kosina > SUSE Labs, Novell Inc. > Here you are: Bus 004 Device 002: ID 0408:3000 Quanta Computer, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0408 Quanta Computer, Inc. idProduct 0x3000 bcdDevice 0.00 iManufacturer 1 Acer iProduct 2 T230H iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 210 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 8 Device Status: 0x0000 (Bus Powered) -- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: touchscreen wirh 2.6.26 2009-11-27 17:36 ` Alex Custov @ 2009-11-27 23:30 ` Jiri Kosina 2009-12-09 21:21 ` Tamási János 0 siblings, 1 reply; 7+ messages in thread From: Jiri Kosina @ 2009-11-27 23:30 UTC (permalink / raw) To: Alex Custov; +Cc: linux-kernel On Fri, 27 Nov 2009, Alex Custov wrote: > Bus 004 Device 002: ID 0408:3000 Quanta Computer, Inc. > Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 1.10 > bDeviceClass 0 (Defined at Interface level) > bDeviceSubClass 0 > bDeviceProtocol 0 > bMaxPacketSize0 64 > idVendor 0x0408 Quanta Computer, Inc. > idProduct 0x3000 Unfortunately, this touchscreen is not (yet) neither supported by usbtouchscreen kernel driver, nor is it apparently HID standard compliant, so HID driver can't do much with it as well. You will have to reverse-engineer the data protocol the touchscreen is sending. It's usually quite easy, in cases in which the device doesn't require complex initialization before it can become functional. -- Jiri Kosina SUSE Labs, Novell Inc. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: touchscreen wirh 2.6.26 2009-11-27 23:30 ` Jiri Kosina @ 2009-12-09 21:21 ` Tamási János 0 siblings, 0 replies; 7+ messages in thread From: Tamási János @ 2009-12-09 21:21 UTC (permalink / raw) To: Jiri Kosina; +Cc: Alex Custov, linux-kernel, janusz [-- Attachment #1: Type: text/plain, Size: 1089 bytes --] Hi! I wrote a small (and really ugly) uinput driver to this device. I hope this helps somebody to write a proper driver for this touchscreen. 2009-11-28 00:30 keltezéssel, Jiri Kosina írta: > On Fri, 27 Nov 2009, Alex Custov wrote: > > >> Bus 004 Device 002: ID 0408:3000 Quanta Computer, Inc. >> Device Descriptor: >> bLength 18 >> bDescriptorType 1 >> bcdUSB 1.10 >> bDeviceClass 0 (Defined at Interface level) >> bDeviceSubClass 0 >> bDeviceProtocol 0 >> bMaxPacketSize0 64 >> idVendor 0x0408 Quanta Computer, Inc. >> idProduct 0x3000 >> > Unfortunately, this touchscreen is not (yet) neither supported by > usbtouchscreen kernel driver, nor is it apparently HID standard compliant, > so HID driver can't do much with it as well. > > You will have to reverse-engineer the data protocol the touchscreen is > sending. It's usually quite easy, in cases in which the device doesn't > require complex initialization before it can become functional. > > [-- Attachment #2: acer-t230H.c --] [-- Type: text/plain, Size: 3602 bytes --] // uinput.c #include <string.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <linux/input.h> #include <linux/uinput.h> #include <stdio.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> /* * Globals */ static int uinp_fd = -1; struct uinput_user_dev uinp; // uInput device structure struct input_event event; // Input device structure /* * Setup the uinput device */ int setup_uinput_device() { // Temporary variable int i = 0; // Open the input device uinp_fd = open("/dev/input/uinput", O_WRONLY | O_NDELAY); if (&uinp_fd == NULL) { printf("Unable to open /dev/input/uinput\n"); return -1; } memset(&uinp, 0, sizeof(uinp)); // Intialize the uInput device to NULL strncpy(uinp.name, "Acer T230H", UINPUT_MAX_NAME_SIZE); uinp.id.version = 4; uinp.id.bustype = BUS_USB; uinp.absmax[ABS_X] = 1920+1440; // i have another monitor connected; uinp.absmin[ABS_X] = 0; uinp.absfuzz[ABS_X] = 3; uinp.absmin[ABS_X] = 0; uinp.absmax[ABS_Y] = 1080; uinp.absmin[ABS_Y] = 0; uinp.absfuzz[ABS_Y] = 3; uinp.absmin[ABS_Y] = 0; // Setup the uinput device ioctl(uinp_fd, UI_SET_EVBIT, EV_KEY); ioctl(uinp_fd, UI_SET_EVBIT, EV_ABS); ioctl(uinp_fd, UI_SET_ABSBIT, ABS_X); ioctl(uinp_fd, UI_SET_ABSBIT, ABS_Y); ioctl(uinp_fd, UI_SET_KEYBIT, BTN_LEFT); /* * Create input device into input sub-system */ write(uinp_fd, &uinp, sizeof(uinp)); if (ioctl(uinp_fd, UI_DEV_CREATE)) { printf("Unable to create UINPUT device.\n"); return -1; } return 1; } void pukk() { int fd; unsigned int x, y, xx, yy; unsigned char buf[30]; fd = open("/dev/hidraw6", O_RDONLY); while (1) { read(fd, buf, sizeof(buf)); x = buf[4] + (unsigned int) buf[5] * 256; y = buf[6] + (unsigned int) buf[7] * 256; xx = buf[10] + (unsigned int) buf[11] * 256; yy = buf[12] + (unsigned int) buf[13] * 256; // set x & y memset(&event, 0, sizeof(event)); gettimeofday(&event.time, NULL); event.type = EV_ABS; event.code = ABS_X; event.value = x + 1440; // a have another monitor connected :) write(uinp_fd, &event, sizeof(event)); event.type = EV_ABS; event.code = ABS_Y; event.value = y; write(uinp_fd, &event, sizeof(event)); event.type = EV_SYN; event.code = SYN_REPORT; event.value = 0; write(uinp_fd, &event, sizeof(event)); if (buf[2] == 7) { // BTN1 pressed memset(&event, 0, sizeof(event)); gettimeofday(&event.time, NULL); event.type = EV_KEY; event.code = BTN_LEFT; event.value = 1; write(uinp_fd, &event, sizeof(event)); event.type = EV_SYN; event.code = SYN_REPORT; event.value = 0; write(uinp_fd, &event, sizeof(event)); } if (buf[2] == 4) { // BTN1 released memset(&event, 0, sizeof(event)); gettimeofday(&event.time, NULL); event.type = EV_KEY; event.code = BTN_LEFT; event.value = 0; write(uinp_fd, &event, sizeof(event)); event.type = EV_SYN; event.code = SYN_REPORT; event.value = 0; write(uinp_fd, &event, sizeof(event)); } printf("\n%ux%u %ux%u [%u]\n", x, y, xx, yy, buf[2]); } close(fd); } int main() { // Return an error if device not found. if (setup_uinput_device() < 0) { printf("Unable to find uinput device\n"); return -1; } pukk(); ioctl(uinp_fd, UI_DEV_DESTROY); close(uinp_fd); return 0; } ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-12-09 21:29 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-11-25 3:57 touchscreen wirh 2.6.26 Alex Custov 2009-11-27 10:59 ` Jiri Kosina 2009-11-27 12:03 ` Alex Custov 2009-11-27 12:10 ` Jiri Kosina 2009-11-27 17:36 ` Alex Custov 2009-11-27 23:30 ` Jiri Kosina 2009-12-09 21:21 ` Tamási János
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®