Author Topic: How to properly make udev rule for touch screen device controller ?  (Read 12512 times)

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Hi,

under Pluto it was enough to put this rule into /etc/udev/rules.d :

Quote
BUS=="usb", KERNEL=="event[0-3]*", SYSFS{product}=="GeneralTouch USB Touchscreen", SYMLINK=="input/gtouch"

and my touchscreen device always appeared at /dev/input/gtouch. Under LMCE same thing doesn't work. As I see (I don't know Linux so well), rules are now defined in 3 parts : first in 20-names.rules, then in 40-permissions.rules and at last on the spot I was adding my rule before : 60-symlinks.rules .

Currently I'm, getting this in dmesg :

Quote
dmesg | grep input
[   20.699985] input: Macintosh mouse button emulation as /class/input/input0
[   20.752388] input: AT Translated Set 2 keyboard as /class/input/input1
[   33.113212] input: PC Speaker as /class/input/input2
[   34.662851] input: ImPS/2 Logitech Wheel Mouse as /class/input/input3
[   35.248511] input: General Touch Co. Ltd.  GeneralTouch USB Touchscreen as /class/input/input4
[   35.248588] input,hiddev96: USB HID v1.10 Mouse [General Touch Co. Ltd.  GeneralTouch USB Touchscreen] on usb-0000:00:1d.7-3.4
[   35.248604] drivers/usb/input/hid-core.c: v2.6:USB HID core driver
[   53.983763] input: Power Button (FF) as /class/input/input5
[   54.028533] input: Power Button (CM) as /class/input/input6

Does anyone know how to define proper rules, so touchscreen device will be under it's own device hook ?

Thanks in advance,

regards,

Bulek.

Thanks in advance,

regards,

Bulek.

dopey

  • Guru
  • ****
  • Posts: 223
    • View Profile
Re: How to properly make udev rule for touch screen device controller ?
« Reply #1 on: February 03, 2008, 04:37:54 am »
I haven't used a device like this before, so I could be mistaken, but it looks like the new kernel version renamed the device node. It seems before it was called event*, whereas now it's called input*. Also, it's input4 which is outside of your range of [0-3].

Try this:
Code: [Select]
BUS=="usb", KERNEL=="input[0-6]*", SYSFS{product}=="GeneralTouch USB Touchscreen", SYMLINK=="input/gtouch"

dopey

  • Guru
  • ****
  • Posts: 223
    • View Profile
Re: How to properly make udev rule for touch screen device controller ?
« Reply #2 on: February 04, 2008, 09:50:39 am »
After thinking about it more, what you really need to do is look at the Handlers property listed for the device in /proc/bus/input/devices and change KERNEL=="event[0-3]*" to match it.

blackoper

  • Veteran
  • ***
  • Posts: 110
    • View Profile
Re: How to properly make udev rule for touch screen device controller ?
« Reply #3 on: February 05, 2008, 10:55:27 am »
I've got my Elo screen working in normal Kubuntu 7.10 using this guide
http://ubuntuforums.org/showthread.php?t=579155
So far I havn't gotten it working in linuxmce beta 3 but I'll be trying here in a few days

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: How to properly make udev rule for touch screen device controller ?
« Reply #4 on: February 07, 2008, 07:53:20 am »
I just implemented an ELO serial interface in 710. I just edited the xorg.conf. The elographics driver is included in the system. I can provide the details. They will need adjustment for your display.

blackoper

  • Veteran
  • ***
  • Posts: 110
    • View Profile
Re: How to properly make udev rule for touch screen device controller ?
« Reply #5 on: February 07, 2008, 09:40:00 am »
this would be helpful to me as I have a second 12" touchscreen that uses the elo serial driver

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Sorry about the slow reply, I missed your response earlier.

The elographics driver is installed on the system by default. here is how I configured it to worjk with a 12" Elo touchscreen (Usually under $100 on eBay)

Code: [Select]
1) Set screen to 800X600 (or otherwise match touchscreen)

2) add the following to the xorg.conf file:

Section "Module"
Load "elographics"

Section "InputDevice"
        Identifier "Touchscreen1"
        Driver     "elographics"
        Option     "Device"     "/dev/ttyS0"
        Option     "AlwaysCore"
        Option     "screenno"    "0"
        Option      "MinX" "400"
        Option      "MaxX" "3700"
        Option      "MinY" "500"
        Option      "MaxY" "3500"
        Option     "UntouchDelay" "3"
        Option     "ReportDelay" "1"
EndSection

Section "ServerLayout"
        Inputdevice     "touchscreen1"  "SendCoreEvents"

The Elographics driver should be installed. The device setting may need to be changed. Change
        Option     "Device"     "/dev/ttyS0"

To:
        Option     "Device"     "/dev/ttyUSB0"

Assuming that is how the usb-serial port maps.

I hope this helps someone.

blackoper

  • Veteran
  • ***
  • Posts: 110
    • View Profile
thanks for the response that will save me some time when I set up the little 12" screen.