# Touchscreen module "Hidtouch" not compiling

## Excluvior

Hi everyone,

I recently bought a Clevo tn120r touchscreen laptop but is seems there is only 

http://www.sporniket-studio.com/data/200811/xf86-input-hidtouch-8.11.01.zip

available as driver.

The thing is I cant seem to get it compiled.

```
# make

make  all-recursive

make[1]: Entering directory `/home/sascha/Desktop/xf86-input-hidtouch-8.11.01'

Making all in src

make[2]: Entering directory `/home/sascha/Desktop/xf86-input-hidtouch-8.11.01/sr

c'

/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -Wa

ll -g -O2 -I/usr/include/xorg    -I../src -MT hidtouch_drv_la-hidtouch.lo -MD -M

P -MF .deps/hidtouch_drv_la-hidtouch.Tpo -c -o hidtouch_drv_la-hidtouch.lo `test

 -f 'hidtouch.c' || echo './'`hidtouch.c

 gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -I/usr/include/xorg -I../src -MT hidt

ouch_drv_la-hidtouch.lo -MD -MP -MF .deps/hidtouch_drv_la-hidtouch.Tpo -c hidtou

ch.c  -fPIC -DPIC -o .libs/hidtouch_drv_la-hidtouch.o

In file included from hidtouch.c:69:

hidtouch__body.h: In function 'hdtOnDeviceOff':

hidtouch__body.h:92: warning: unused variable 'pDevice'

hidtouch__body.h: In function 'hdtOnDeviceInit__initAxes':

hidtouch__body.h:149: error: 'GetMotionHistory' undeclared (first use in this fu

nction)

hidtouch__body.h:149: error: (Each undeclared identifier is reported only once

hidtouch__body.h:149: error: for each function it appears in.)

hidtouch__body.h:149: warning: implicit declaration of function 'GetMotionHistor

ySize'

hidtouch__body.h:156: warning: implicit declaration of function 'InitAbsoluteCla

ssDeviceStruct'

make[2]: *** [hidtouch_drv_la-hidtouch.lo] Error 1

make[2]: Leaving directory `/home/sascha/Desktop/xf86-input-hidtouch-8.11.01/src

'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/home/sascha/Desktop/xf86-input-hidtouch-8.11.01'

make: *** [all] Error 2

```

Perhaps someone with some more knowledge in this erea could have a look?

Thank you

----------

## Excluvior

Ok, here is the entire story.

After expirementing with various drivers like evtouch etc... I came to the conclusion that the problem seems to be that the device for my touchpanel is /dev/hiddev0

this is the output I get:

```

cat /dev/hiddev0 

0Z1B[[?1;2cB

011¢B[?1;2cB

01qBB

0'1BB[?1;2cB

0Õ1óB

```

after a lot of googling I came to the conclusion that is was the previous production range that worked with the evtouch driver.

So I mailed the constructor and the touchpanel producer but neither gave me an anwser on this matter.

```

lsusb -v

Bus 007 Device 002: ID 0664:0306  

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0         8

  idVendor           0x0664 

  idProduct          0x0306 

  bcdDevice            1.00

  iManufacturer           1 ET&T Technology

  iProduct                2 TC4UM

  iSerial                 0 

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           34

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          0 

    bmAttributes         0xa0

      (Bus Powered)

      Remote Wakeup

    MaxPower              100mA

    Interface Descriptor:

      bLength                 9

 bDescriptorType         2

    wTotalLength           34

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          0 

    bmAttributes         0xa0

      (Bus Powered)

      Remote Wakeup

    MaxPower              100mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           1

      bInterfaceClass         3 Human Interface Device

      bInterfaceSubClass      1 Boot Interface Subclass

      bInterfaceProtocol      0 None

      iInterface              0 

        HID Device Descriptor:

          bLength                 9

          bDescriptorType        33

          bcdHID               1.00

          bCountryCode            0 Not supported

          bNumDescriptors         1

          bDescriptorType        34 Report

          wDescriptorLength      86

         Report Descriptors: 

           ** UNAVAILABLE **

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            3

          Transfer Type            Interrupt

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0005  1x 5 bytes

        bInterval               7

Device Status:     0x0000

  (Bus Powered)

```

it seems that hiddev device cannot be used by any of the touchpanel drivers.

and the only thing that might give me some hope doesnt seem to compile.

Can annyone please help me out here?  Thanks

----------

## sporniket

 *Excluvior wrote:*   

> Hi everyone,
> 
> I recently bought a Clevo tn120r touchscreen laptop but is seems there is only 
> 
> http://www.sporniket-studio.com/data/200811/xf86-input-hidtouch-8.11.01.zip
> ...

 

Hi ! The error message tells me that the development files (header and dev libs) are likely to be missing or wrong. Check "/usr/include/xorg". I'm not familiar with the Gentoo environnement to tell more...

----------

## Excluvior

Hi sporniket

I just had a look in the folder and this is what I found.

```

# ls /usr/include/xorg/

BT.h          dixgrabs.h       mifpoly.h     shadowfb.h     xf86Pci.h

IBM.h         dixstruct.h      migc.h        site.h         xf86PciInfo.h

TI.h          dri.h            miline.h      swaprep.h      xf86Priv.h

XIstubs.h     dristruct.h      mipict.h      swapreq.h      xf86Privstr.h

afb.h         edid.h           mipointer.h   tda8425.h      xf86RAC.h

assyntax.h    exa.h            mipointrst.h  tda9850.h      xf86RamDac.h

atKeynames.h  exevents.h       misc.h        tda9885.h      xf86RandR12.h

bstore.h      extension.h      miscstruct.h  uda1380.h      xf86Rename.h

bstorestr.h   extinit.h        mispans.h     validate.h     xf86Resources.h

bt829.h       extnsionst.h     mistruct.h    vbe.h          xf86Version.h

cfb.h         fb.h             miwideline.h  vbeModes.h     xf86Xinput.h

cfb16.h       fbdevhw.h        mizerarc.h    vdif.h         xf86_OSlib.h

cfb32.h       fboverlay.h      msp3430.h     vgaHW.h        xf86_OSproc.h

cfb8_16.h     fbpseudocolor.h  opaque.h      window.h       xf86_ansic.h

cfb8_32.h     fbrop.h          os.h          windowstr.h    xf86_libc.h

cfbmap.h      fi1236.h         picture.h     xaa.h          xf86cmap.h

cfbmskbits.h  fourcc.h         picturestr.h  xaaWrapper.h   xf86fbman.h

cfbunmap.h    gc.h             pixmap.h      xaalocal.h     xf86i2c.h

closestr.h    gcstruct.h       pixmapstr.h   xaarop.h       xf86int10.h

closure.h     globals.h        property.h    xf1bpp.h       xf86sbusBus.h

colormap.h    glyphstr.h       propertyst.h  xf4bpp.h       xf86str.h

colormapst.h  i2c_def.h        randrstr.h    xf86.h         xf86xv.h

compiler.h    input.h          region.h      xf86Crtc.h     xf86xvmc.h

cursor.h      inputstr.h       regionstr.h   xf86Cursor.h   xf86xvpriv.h

cursorstr.h   mfb.h            renderedge.h  xf86DDC.h      xisb.h

damage.h      mfbmap.h         resource.h    xf86Keymap.h   xorg-server.h

damagestr.h   mfbunmap.h       rgb.h         xf86Modes.h    xorgVersion.h

dbestruct.h   mi.h             sarea.h       xf86Module.h   xvdix.h

dgaproc.h     mibank.h         screenint.h   xf86OSKbd.h    xvmcext.h

dix.h         mibstore.h       scrnintstr.h  xf86OSmouse.h

dixevents.h   micmap.h         selection.h   xf86Opt.h

dixfont.h     micoord.h        servermd.h    xf86Optrec.h

dixfontstr.h  mifillarc.h      shadow.h      xf86Parser.h

```

----------

## sporniket

Sorry for replying late, I thought I subscribed to this topic...   :Embarassed: 

So, on my computer, the "GetMotionHistory" is declared in "input.h". hidtouch.c includes "<xf86Xinput.h>" that includes "inputstr.h" that includes "input.h". Maybe this is not the case on your computer ? If not, there is something else on your computer that prevent the right inclusion, but I will not be able to help you further, as I go beyond my knowledge...

----------

## sporniket

Well, it seems that there was an change of the function call InitValuatorClassDeviceStruct. I guess I'll have to do conditionnal code on this...

----------

