Jump to content
Sign in to follow this  
jim

PCDuino & ELO Touch

Recommended Posts

Hi,

connected an ELO Touch 17" with Touch on USB to PCDuino.
But no luck with Touch, didn't move mouspointer.

What i've found out: The ELO Touch Driver is inside the Image!  (have a look inside /sys/class/input/event2/device/name)
On Shell i can do following: getevent -t /dev/input/event2  and get the Touch Events displayed!

Because i need Touchscreen functionality from start up, it is no way to read coordinates inside App and set them as event actions on mouspointer. (had to start also the app with touch...)

So anyone has an idea what's the reason, that touch is not acting as pointing device?

Share this post


Link to post
Share on other sites

Hi,

shell command getevent -p produces following output:

...
add device 4: /dev/input/event1
  name:     "EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interfac"
  events:
    KEY (0001): 0110 
    ABS (0003): 0000  : value 0, min 184, max 3932, fuzz 0, flat 0, resolution 0
                0001  : value 1537, min 184, max 3932, fuzz 0, flat 0, resolution 0
                0028  : value 0, min 0, max 256, fuzz 0, flat 0, resolution 0
    MSC (0004): 0004 
  input props:
   
...

with getevent /dev/input/event1 i get Touchscrenn values every time i touch it.

So, why the Touch data is not "routed" to System?

Headbanging....

Share this post


Link to post
Share on other sites

Hi,
i made a File named Vendor_04e7_Product_0050.idc under /system/usr/idc with following content:

# This is an example of an input device configuration file.
# It might be used to describe the characteristics of a built-in touch screen.

# This is an internal device, not an external peripheral attached to the USB
# or Bluetooth bus.
device.internal = 1

# The device should behave as a touch screen, which uses the same orientation
# as the built-in display.
touch.deviceType = touchScreen
touch.orientationAware = 1

After, i change File acces as following:

chown 0,0 /system/usr/idc/ Vendor_04e7_Product_0050.idc
chmod 06755 /system/usr/idc/ Vendor_04e7_Product_0050.idc
reebot

that's it.

I have connected an USB Hub on USB. This Unit has a LED for each Port. As i can see, Keyboard and mouse led's are toggeling, but touchpad usb connector led isn't; just once if i plug it in.

best, michael

Share this post


Link to post
Share on other sites

I just write a fake touch driver for test, ant it works.
Test steps:
1) write /system/usr/idc/test_touch.idc

touch.deviceType = touchScreen
touch.orientationAware = 1
touch.size.calibration = diameter
touch.size.scale = 10
touch.size.bias = 0
touch.size.isSummed = 0
touch.orientation.calibration = none

2) insmod driver (test_touch.ko)

3) run test script ( touch_test.sh )

#!/bin/sh
dev=/dev/input/event2

type_key=1
type=3
pressure=24
bin_touch=330

press()
{
    x=$1
    y=$2
    sendevent $dev $type 0 $x
    sendevent $dev $type 1 $y
    sendevent $dev $type $pressure 1
    sendevent $dev $type_key $bin_touch 1
    sendevent $dev 0 0 0
}

release()
{
    sendevent $dev $type $pressure 0
    sendevent $dev $type_key $bin_touch 0
    sendevent $dev 0 0 0
}

main()
{
    x=0
    y=0
    step=4
    release
    while [ 1 ]; do
       if [ $x -gt 4000 ] || [ $y -gt 4000 ]; then
           release
           exit 0
       fi
       
       press $x $y
       x=`busybox expr $x + $step` 
       y=`busybox expr $y + $step` 
       busybox usleep 100000
   done
}

main

log:

130|root@android:/mnt/usbhost1 # logcat -c                                     
root@android:/mnt/usbhost1 # logcat &
[1] 20265
t/usbhost1/test_touch.ko                                                      <
--------- beginning of /dev/log/main
E/EventHub(  158): could not get driver version for /dev/input/mouse0, Not a typewriter
I/EventHub(  158): New device: id=15, fd=183, path='/dev/input/event2', name='test_touch', classes=0x4, configuration='/system/usr/idc/test_touch.idc', keyLayout='', keyCharacterMap='', builtinKeyboard=false
I/InputReader(  158): Device reconfigured: id=15, name='test_touch', surface size is now 1280x720, mode is 1
I/InputReader(  158): Device added: id=15, name='test_touch', sources=0x00001002
--------- beginning of /dev/log/system
I/ActivityManager(  158): Config changed: {1.0 0mcc0mnc en_US layoutdir=0 sw720dp w1280dp h672dp lrg long land finger qwerty/v/v -nav/h s.15}
D/OpenGLRenderer(  225): Flushing caches (mode 0)
I/StatusBar.HeightReceiver(  225): Resizing status bar plugged=false height=48 old=48
root@android:/mnt/usbhost1 # D/VoldCmdListener(   87): volume shared /mnt/sdcard ums
D/ViewRootImpl(  225): pckname = com.android.systemui
I/WindowManager(  158): MediaPlayer.is not PlayingVideo
D/dalvikvm(  158): GC_EXPLICIT freed 50K, 14% free 8681K/10055K, paused 3ms+5ms

root@android:/mnt/usbhost1 # /system/touch_test.sh 

Share this post


Link to post
Share on other sites

test_touch.c

#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/kernel.h>
#include <linux/delay.h>

static struct input_dev *test_dev = 0;

static int __init test_touch_init(void)
{
    int ret;
    struct input_dev *input_dev;

    input_dev = input_allocate_device();
    test_dev = input_dev;
    input_dev->name = "test_touch";
    input_dev->id.bustype = BUS_HOST;
    input_dev->dev.parent = NULL;

    set_bit(ABS_X, input_dev->absbit);
    set_bit(ABS_Y, input_dev->absbit);
    set_bit(ABS_PRESSURE, input_dev->absbit);
    set_bit(BTN_TOUCH, input_dev->keybit);
    set_bit(EV_ABS, input_dev->evbit);
    set_bit(EV_KEY, input_dev->evbit);

    input_set_abs_params(input_dev, ABS_X, 0, 4095, 0, 0);
    input_set_abs_params(input_dev, ABS_Y, 0, 4095, 0, 0);
    input_set_abs_params(input_dev, ABS_PRESSURE,0,2, 0, 0); 

    ret = input_register_device(input_dev);
    if (ret)
    {
        printk(KERN_ERR "%s register input device failed!\n", __FUNCTION__);
        goto err1;
    }

    return 0;

err1:
    input_free_device(input_dev);
    test_dev = NULL;
    return -1;
}

static void __exit test_touch_exit(void)
{
    if ( test_dev )
    {
        input_unregister_device(test_dev);
        input_free_device(test_dev);
    }
}

module_init(test_touch_init);
module_exit(test_touch_exit); 
 
MODULE_DESCRIPTION("test touch driver");
MODULE_LICENSE("GPL");

Share this post


Link to post
Share on other sites

Dear lds,
tried it with logcat and below is the result:

I/USB3G   (   94): event { 'add', '/devices/platform/sw-ohci.2/usb5/5-1/5-1.3', 'usb', '', 189, 522 }
I/USB3G   (   94): path : '/sys/devices/platform/sw-ohci.2/usb5/5-1/5-1.3'
I/USB3G   (   94): VID :size 5,vid_path '/sys/devices/platform/sw-ohci.2/usb5/5-1/5-1.3/idVendor',VID  '04e7
I/USB3G   (   94): '.
I/USB3G   (   94): PID :size 5,Pid_path '/sys/devices/platform/sw-ohci.2/usb5/5-1/5-1.3/idProduct',PID  '0050
I/USB3G   (   94): '.
I/USB3G   (   94): cmd=/system/etc/usb_modeswitch.sh /system/etc/usb_modeswitch.d/04e7_0050 &,
I/USB3G   (   94): excute ret : 0,err:No such file or directory
E/EventHub(  160): could not get driver version for /dev/input/mouse0, Not a typewriter
E/EventHub(  160): could not get driver version for /dev/input/js0, Invalid argument

that's all i get...

i don't have any special driver on this ELO Touch... 
maybe the error is coming up from the long device name? (EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interfac)

best, michael

Share this post


Link to post
Share on other sites

 

 

maybe the error is coming up from the long device name? (EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interfac)

I don't think so,  because Input device configuration files are located by USB vendor, product (and optionally version) id or by input device name.

Can you please attatch more logs ?

 

without /system/usr/idc/test_touch.idc, the log is something like this:

D/EventHub(  160): No input device configuration file found for device 'test_touch'.
I/EventHub(  160): New device: id=5, fd=231, path='/dev/input/event2', name='test_touch', classes=0x4, configuration='', keyLayout='', keyCharacterMap='', builtinKeyboard=false
I/InputReader(  160): Device reconfigured: id=5, name='test_touch', surface size is now 1280x720, mode is 3
I/InputReader(  160): Device added: id=5, name='test_touch', sources=0x00002002
D/dalvikvm(  160): GC_CONCURRENT freed 545K, 13% free 9408K/10695K, paused 27ms+60ms

Share this post


Link to post
Share on other sites

Dear lds,

ok, renamed Vendor_04e7....

I/USB3G   (   93): event { 'add', '/devices/platform/sw-ehci.2/usb4/4-1/4-1.1', 'usb', '', 189, 410 }
I/USB3G   (   93): path : '/sys/devices/platform/sw-ehci.2/usb4/4-1/4-1.1'
I/USB3G   (   93): VID :size 5,vid_path '/sys/devices/platform/sw-ehci.2/usb4/4-1/4-1.1/idVendor',VID  '04e7
I/USB3G   (   93): '.
I/USB3G   (   93): PID :size 5,Pid_path '/sys/devices/platform/sw-ehci.2/usb4/4-1/4-1.1/idProduct',PID  '0050
I/USB3G   (   93): '.
I/USB3G   (   93): cmd=/system/etc/usb_modeswitch.sh /system/etc/usb_modeswitch.d/04e7_0050 &,
E/EventHub(  155): could not get driver version for /dev/input/mouse0, Not a typewriter
E/EventHub(  155): could not get driver version for /dev/input/js0, Invalid argument
D/EventHub(  155): No input device configuration file found for device 'EloTouchSystems,Inc Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interfac'.
I/USB3G   (   93): excute ret : 0,err:No such file or directory

i also tried to connect without a usb-hub, tried on different usb connectors, without keyboard and mous connected... all is ending with line: I/USB3G  (   93): excute ret : 0,err:No such file or directory

nothing more.

best, michael

Share this post


Link to post
Share on other sites

I'm trying to connect an elo touch 1940L on the pcduino. I installed with insmod the usb touch screen driver found on this web site for this. It works partially, the pcduino detect when i touch the screen but not at the good emplacement ! under a screen after the command getevent -p :

 

 

 

As i can read on your discussion, i need a idc file to configure my screen. I'm newbie on linux (and android), can you help me for this ?

elo10.jpg

Share this post


Link to post
Share on other sites

@modjo

1. At first, you need to get the USB vendor ID and Product ID of your touch device.
You could run "logcat -c && logcat &" and then plug-in your device to get it from the debug message.

2. create an idc file named Vendor_XXXX_Product_XXXX.idc ( replace XXXX with the value you got from step1),
for example Vendor_04e7_Product_0050.idc,

# busybox mount /system/ -o rw,remount
# busybox vi /system/usr/idc/Vendor_04e7_Product_0050.idc

touch.deviceType = touchScreen
touch.orientationAware = 1
touch.size.calibration = diameter
touch.size.scale = 10
touch.size.bias = 0
touch.size.isSummed = 0
touch.orientation.calibration = none

Share this post


Link to post
Share on other sites

Ok i tried this but it didn't work. Under the result of logcat after the creation of idc (now nothing happen when i touch the screen) :

app_38@android:/ # logcat -c && logcat &
[1] 1012
app_38@android:/ # --------- beginning of /dev/log/system
I/USB3G   (   92): event { 'add', '/devices/platform/sw-ohci.2/usb5/5-1', 'usb', '', 189, 516 }
I/USB3G   (   92): path : '/sys/devices/platform/sw-ohci.2/usb5/5-1'
I/USB3G   (   92): VID :size 5,vid_path '/sys/devices/platform/sw-ohci.2/usb5/5-1/idVendor',VID  '04e7
I/USB3G   (   92): '.
I/USB3G   (   92): PID :size 5,Pid_path '/sys/devices/platform/sw-ohci.2/usb5/5-1/idProduct',PID  '0126
I/USB3G   (   92): '.
I/USB3G   (   92): cmd=/system/etc/usb_modeswitch.sh /system/etc/usb_modeswitch.d/04e7_0126 &,
--------- beginning of /dev/log/main
E/EventHub(  156): could not get driver version for /dev/input/mouse1, Not a typewriter
I/EventHub(  156): New device: id=6, fd=106, path='/dev/input/event2', name='Elo TouchSystems Elo TouchSystems 2515 iTouch Plus USB Touchmonitor', classes=0x80000004, configuration='/system/usr/idc/Vendor_04e7_Product_0126.idc', keyLayout='', keyCharacterMap='', builtinKeyboard=false
I/InputReader(  156): Device reconfigured: id=6, name='Elo TouchSystems Elo TouchSystems 2515 iTouch Plus USB Touchmonitor', surface size is now 1280x720, mode is 1
I/InputReader(  156): Device added: id=6, name='Elo TouchSystems Elo TouchSystems 2515 iTouch Plus USB Touchmonitor', sources=0x00001002
I/ActivityManager(  156): Config changed: {1.0 0mcc0mnc fr_FR layoutdir=0 sw720dp w1280dp h672dp lrg long land finger -keyb/v/h -nav/h s.7}
I/StatusBar.HeightReceiver(  235): Resizing status bar plugged=false height=48 old=48
I/USB3G   (   92): excute ret : 0,err:No such file or directory
E/Term    (  953): onCreate
D/ViewRootImpl(  953): pckname = jackpal.androidterm
I/LatinIME(  327): InputType.TYPE_NULL is specified
W/LatinIME(  327): Unexpected input class: inputType=0x00000000 imeOptions=0x00000000
I/Term    (  953): Bound to TermService
I/TermService(  953): Activity binding to service
D/dalvikvm(  327): GC_FOR_ALLOC freed 1669K, 20% free 7221K/8967K, paused 37ms
I/dalvikvm-heap(  327): Grow heap (frag case) to 8.585MB for 1546256-byte allocation
D/dalvikvm(  327): GC_CONCURRENT freed 22K, 3% free 8709K/8967K, paused 2ms+2ms
I/LatinIME(  327): InputType.TYPE_NULL is specified
W/LatinIME(  327): Unexpected input class: inputType=0x00000000 imeOptions=0x00000000
I/WindowManager(  156): MediaPlayer.is not PlayingVideo
D/dalvikvm(  156): GC_EXPLICIT freed 550K, 15% free 9557K/11143K, paused 3ms+6ms
D/ViewRootImpl(  953): pckname = jackpal.androidterm

Share this post


Link to post
Share on other sites

No, i installed the driver after i had connected the screen. Yesterday i tried to modify the idc file with another option with no sucess  undecided.gif
But the pcduino detect when i touch the screen because when i touch this one the mousse pointer disappear.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×