# Dell st2220t multi-touch monitor



## ccc (Jun 3, 2011)

Hey,

Has someone got the touchscreen working from Dell st2220t multi-touch monitor under FreeBSD?


----------



## ccc (Jun 15, 2011)

Still cannot find any solution to get touch screen working.


----------



## SirDice (Jun 15, 2011)

I'm doubtful it ever will.


----------



## wblock@ (Jun 15, 2011)

http://en.community.dell.com/support-forums/software-os/f/3525/t/19381168.aspx#19879538, but who knows.  Couldn't hurt to let Dell know there's demand for an open-source driver.

I'd guess the touch stuff is all via USB, and those determined and stubborn enough might be able to reverse engineer it with a USB sniffer and lots of time.  A non-trivial job, though.


----------



## samob (Oct 9, 2017)

I know this is 6yr old thread, but I don't want to open new one, because I have similar goal - enable Dell based touchscreen monitor (uhid0: <Quantamaging OpticalTouchScreen, class 0/0, rev 1.10/0.04, addr 4> on usbus0). I got intrigued after hearing about progress made in realm of Generic Windows USB drivers for FreeBSD.

I started with TrueOS, but soon learned that I need to recompile kernel, which is much more documented for FreeBSD then it is for TrueOS.

Recompile took quit a while, here are steps I did to get to *12.0-CURRENT r324406*
First deleted /usr/src and svn up to latest source, then:


```
# cd /usr/src
# make -j `sysctl -n hw.ncpu` buildworld
# make -j `sysctl -n hw.ncpu` buildkernel KERNCONF=INSPIRON
# make installkernel KERNCONF=INSPIRON
# reboot
# cd /usr/src
# mergemaster -p
# make installworld
# mergemaster -iUF
# yes | make delete-old
# yes | make delete-old-libs
# cd /usr/obj && chflags -R noschg * && rm -rf *
# reboot
```
Next I pkg installed Xorg, xfce, x11-drivers/xf86-input-evdev and adjusted xorg.conf as suggested. But looking into /dev folder I have nothing named "input", am I missing some step?

Step 4. is to tell XOrg to use evdev driver for the device:

```
Section "ServerLayout"
    ....
     InputDevice    "TouchScreen0" "SendCoreEvents"
EndSection


Section "InputDevice"
     Identifier  "TouchScreen0"
     Driver      "evdev"
     Option      "Device" "/dev/input/eventX"
EndSection
```

Here is where I got lost. Author mentioned: Exact value of "/dev/input/eventX" can be obtained with evemu-record utility from devel/evemu. As suggested I pkg installed evemu and tried:


```
% evemu-record /dev/uhid0 > device.txt
error: this device is grabbed and I cannot record events
see the evemu-record man page for more information
```

Also tried this command with sudo, same error. Looking at man page I see:

```
The following command shows the processes with an open file descriptor
      on the device.

           fuser -v /dev/input/eventX
```

But if I run this command:


```
% sudo fuser -v /dev/input/eventX
fuser: illegal option -- v
usage: fuser [-cfhkmu] [-M core] [-N system] [-s signal] file ...
```

I have “killed” X by dropping to *init 1* to see if evemu-record works without X running, but the error is the same: *this device is grabbed and I cannot record events
*
Also I have no idea how to make sure my configuration complies with Note2: wmt.ko should be kld-loaded before uhid driver to take precedence over it! Otherwise uhid can be kld-unloaded after loading of wmt.

I think I'm "almost there", because if I do `cat /dev/uhid0` in terminal and then touch the screen, some weird characters pop randomly in terminal window.


----------



## Phishfry (Oct 9, 2017)

I know some of the touchscreens use webcamd for input. Have you looked into that?
https://lists.freebsd.org/pipermail/freebsd-current/2016-March/059877.html

Pretty easy to load up and check with `webcamd -l`
https://www.freebsd.org/cgi/man.cgi?query=webcamd


----------



## samob (Oct 9, 2017)

I have enabled webcamd by adding `cuse_load="YES"` to /boot/loader.conf and `webcamd_enable="YES"` to /etc/rc.conf
I can see webcamd is running:

```
% ps axu |grep webcamd
root        364   0.0  0.1   20888   5244  -  I<s  11:42     0:00.33 /usr/local/sbin/webcamd -i 0 -d ugen0.3 -B -U webcamd -G webcamd -H
```
Still no response from touchscreen. Also noticed I actually have webcam, but it is not available in app like Cheese that is installed on this system.

```
% sudo usbconfig
ugen1.1: <Intel EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.1: <Intel EHCI root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <vendor 0x8087 product 0x0020> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x8087 product 0x0020> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.3: <Alcor Micro, Corp. LaptopIntegratedWebcam2M> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen1.3: <vendor 0x04b3 product 0x310b> at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
ugen0.4: <Quantamaging OpticalTouchScreen> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (96mA)
ugen1.4: <Logitech 2.4GHz Cordless Desktop> at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (98mA)
```
I have no experience with webcamd and wonder if I have to edit it's config or something else to make it work?


```
% sudo webcamd -l
Available device(s):
webcamd [-d ugen1.1] -N Intel-EHCI-root-HUB -S unknown -M 0
webcamd [-d ugen0.1] -N Intel-EHCI-root-HUB -S unknown -M 1
webcamd [-d ugen1.2] -N vendor-0x8087-product-0x0020 -S unknown -M 0
webcamd [-d ugen0.2] -N vendor-0x8087-product-0x0020 -S unknown -M 1
webcamd [-d ugen0.3] -N Alcor-Micro--Corp--LaptopIntegratedWebcam2M -S unknown -M 0
webcamd [-d ugen1.3] -N vendor-0x04b3-product-0x310b -S unknown -M 0
webcamd [-d ugen0.4] -N Quantamaging-OpticalTouchScreen -S 0000 -M 0
webcamd [-d ugen1.4] -N Logitech-2-4GHz-Cordless-Desktop -S unknown -M 0
Show webcamd usage:
webcamd -h
```


----------



## samob (Oct 9, 2017)

Reading the webcamd() I found /usr/local/etc/devd/webcamd.conf and combined with previous post hardware info, constructed these last three lines in /etc/rc.conf


```
sendmail_enable="NONE"
hostname="inspiron.sokolc.local"
keymap="si.kbd"
ifconfig_re0="DHCP"
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
dumpdev="NO"
zfs_enable="YES"
dbus_enable="YES"
hald_enable="YES"
slim_enable="YES"
snd_driver_load="YES"
webcamd_enable="YES"
webcamd [-d ugen0.4] -N Quantamaging-OpticalTouchScreen -S 0000 -M 0
webcamd [-d ugen0.3] -N Alcor-Micro--Corp--LaptopIntegratedWebcam2M -M 0
```

Unfortunatelly nothing changed, neither webcam nor touch are recognized. If I understood right, passed -N or -S should be enough? Or do I need both? because one key pair states *unknown
*
If I run from terminal as regular user this happens:

```
% webcamd [-d ugen0.4] -N Quantamaging-OpticalTouchScreen -S 0000 -M 0
Available device(s):
Show webcamd usage:
webcamd -h
webcamd: No USB device match found
```

Running with sudo gives different result:

```
% sudo webcamd [-d ugen0.4] -N Quantamaging-OpticalTouchScreen -S 0000 -M 0
Available device(s):
webcamd [-d ugen0.1] -N Intel-EHCI-root-HUB -S unknown -M 0
webcamd [-d ugen1.1] -N Intel-EHCI-root-HUB -S unknown -M 1
webcamd [-d ugen1.2] -N vendor-0x8087-product-0x0020 -S unknown -M 0
webcamd [-d ugen0.2] -N vendor-0x8087-product-0x0020 -S unknown -M 1
webcamd [-d ugen0.3] -N Alcor-Micro--Corp--LaptopIntegratedWebcam2M -S unknown -M 0
webcamd [-d ugen1.3] -N vendor-0x04b3-product-0x310b -S unknown -M 0
webcamd [-d ugen0.4] -N Quantamaging-OpticalTouchScreen -S 0000 -M 0
webcamd [-d ugen1.4] -N Logitech-2-4GHz-Cordless-Desktop -S unknown -M 0
Show webcamd usage:
webcamd -h

samob@inspiron:~ % webcamd -h
usage: webcamd -d [ugen]<unit>.<addr> -i 0 -v -1 -B
        -d <USB device>
        -i <interface or client number>
        -m <parameter>=<value>
        -s Show available parameters
        -l Show available USB devices
        -S <SerialNumberString> as output by -l option
        -N <DeviceNameString> as output by -l option
        -M <match index> for use with -S and -N options
        -v <video device number>
        -B Run in background
        -f <firmware path> [/boot/modules]
        -r Do not set realtime priority
        -U <user> Set user for character devices
        -G <group> Set group for character devices
        -H Register device by HAL daemon
        -D <host:port:ndev> Connect to remote host instead of USB
        -L <host:port:ndev> Make DVB device available from TCP/IP
        -h Print help
NOTE: The minimum options needed is one of -d, -S, -s, -l, -N or -D
```

Just to be shure, also tried just % webcamd [-d ugen0.4] -N Quantamaging-OpticalTouchScreen with same results as before.


----------



## samob (Oct 10, 2017)

I see on mail archive that other people had better luck with same name convention I used:

```
# webcamd  -N Synaptics-Large-Touch-Screen-SYNAPTICS -S unknown -M 0
Attached to ugen0.2[0]
Creating /dev/input/event0
```

Did `sudo su` on my machine:

```
# webcamd [-d ugen0.4] -N Quantamaging-OpticalTouchScreen -S 0000 -M 0
Available device(s):
webcamd [-d ugen1.1] -N Intel-EHCI-root-HUB -S unknown -M 0
webcamd [-d ugen0.1] -N Intel-EHCI-root-HUB -S unknown -M 1
webcamd [-d ugen1.2] -N vendor-0x8087-product-0x0020 -S unknown -M 0
webcamd [-d ugen0.2] -N vendor-0x8087-product-0x0020 -S unknown -M 1
webcamd [-d ugen0.3] -N Alcor-Micro--Corp--LaptopIntegratedWebcam2M -S unknown -M 0
webcamd [-d ugen1.3] -N vendor-0x04b3-product-0x310b -S unknown -M 0
webcamd [-d ugen0.4] -N Quantamaging-OpticalTouchScreen -S 0000 -M 0
webcamd [-d ugen1.4] -N Logitech-2-4GHz-Cordless-Desktop -S unknown -M 0
Show webcamd usage:
webcamd -h
```


----------



## Phishfry (Oct 10, 2017)

I didn't mean to chase you off evdev. I am really unsure which is recommended for touch input.
I was just researching the topic as I have a 8" Touchscreen embedded PC I am trying to figure out myself.
It is an old N270 Atom rig. Nice but dated. Touch screen is serial input....Yet to test.
https://www.ieiworld.com/en/product/model.php?II=48

Dual Gig LAN too bad its re0


----------



## tobik@ (Oct 10, 2017)

samob said:


> Just to be shure, also tried just % webcamd [-d ugen0.4] -N Quantamaging-OpticalTouchScreen with same results as before.


[-d ugen0.4] means that it's an optional argument. So either remove it or just use -d ugen0.4 (without the brackets).


----------

