This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am3517 and usb touch screen

Other Parts Discussed in Thread: AM3517

Hi

I am testing an am3517 evm, does any body knows how to setup a usb touch screen with dvi output?

I have a 15” egalax touch screen, but it seems that it has to work with X window, I am developing applications ( powervr based ) without X.

thanks

  • Erwin,

    we have this working but for a different screen. What you need is tslib. Depending on the output of your screen you may have to adapt some module in tslib.

    See for some help here: http://processors.wiki.ti.com/index.php/Tslib or google. Use ts_test and ts_calibrate for testing the touch.

    Alternatively you might check if the screen vendor provides a Linux driver that you can port.

    Regards.

  • Hi Frank

    I have already installed tslib in my am3517 evm, and it works fine.

    But after I changed the output from on-board LCD to DVI- a 15” LCD (with an egalax touch screen), both ts_calibrate and ts_test are all failed, the cursor could not moved.

    I can read xres and yres in my program, e.g 1280x720, but ts_read() always return 0, even if the screen have been touched.

    I think I have to compile the driver of touch screen and load it when booting, but the driver depends on xorg which I do not have on evm, and because lack of xorg, the driver can not be compiled.

    Thanks for your quick reply.

  • I think the first point to clarify would be to see if your USB touch interface is detected by the Linux kernel when you plug it in.

    Then you need to figure out what /dev/input you get the data in. This is used to set the tslib environment variables accordingly. Once tslib receives any data from the touch it should at least move the mouse - maybe in the wrong direction or with bad sensitivity.

    Don't think it will help to install the original driver in parallel but you could use the sources to learn how to get the data in.

    Regards.

  • Frank Walzer said:
    I think the first point to clarify would be to see if your USB touch interface is detected by the Linux kernel when you plug it in.

    Through dmesg command, I got these messages:

    usb 1-1: new high speed USB device using ehci-omap and address 2

    usb 1-1: New USB device found, idVendor=05e3, idProduct=0608

    usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0

    usb 1-1: Product: USB2.0 Hub

    usb 1-1.3: new full speed USB device using ehci-omap and address 3

    usb 1-1.3: New USB device found, idVendor=0eef, idProduct=0001

    usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0

    usb 1-1.3: Product: USB TouchController

    usb 1-1.3: Manufacturer: eGalax Inc.

    generic-usb 0003:0EEF:0001.0001: input: USB HID v1.00 Pointer [eGalax Inc. USB TouchController] on usb-ehci-omap.0-1.3/input0

    Frank Walzer said:
    Then you need to figure out what /dev/input you get the data in. This is used to set the tslib environment variables accordingly. Once tslib receives any data from the touch it should at least move the mouse - maybe in the wrong direction or with bad sensitivity.

    These are the contains in /dev/input:

    root@am3517-evm:/dev/input# ls

    event0 event1 touchscreen0

    These are my environment variables:

    export TSLIB_FBDEVICE=/dev/fb0

    export TSLIB_TSDEVICE=/dev/input/touchscreen0

    export TSLIB_CONFFILE=/etc/ts.conf

    export TSLIB_PLUGINDIR=/lib/ts

    How to modify these settings? Thanks.

     

     

     

  • Ok, looks good so far.

    Now check what input you receive the touch data on. Just do a 'cat /dev/inputs/event0' and touch the touch... if you see some output you have the device that you need to use for TSLIB_TSDEVICE. If not try the next. If all of them fail then your Linux kernel settings are not correct yet. I can't remember anymore if we had to change anything there. I need to check. Usually we get more devices on /dev/input as there are two for mouse and keyboard usually. The USB touch in our case is not touchscreen0 but one of the eventsX.

    Once you have the event just do an 'export TSLIB_TSDEVICE /dev/input/eventX' and run ts_test. If there is nothing happening or wrong directions have a look at modifying /etc/ts.conf.

    Regards.

  • Frank:

    Frank Walzer said:
    Just do a 'cat /dev/inputs/event0' and touch the touch... if you see some output you have the device that you need to use for TSLIB_TSDEVICE


    After input 'cat /dev/input/event1', some thing displayed on the screen, like:

    #�#K3„##�##�#K3„##�#�#K3�#�#K#(####

     

    So I changed TSLIB_TSDEVICE variable :

    export TSLIB_TSDEVICE=/dev/input/event1

     

    Execute ts_calibrate, it shows:

    xres = 1280, yres = 720

    selected device is not a touchscreen I understand

    And the cursor still can not be moved.

    Frank Walzer said:
    If there is nothing happening or wrong directions have a look at modifying /etc/ts.conf

    I used to uncomment 'module_raw input' in ts.conf, if I uncommented the others (one by one at a time), none of them could function correctly.

     

     

     

  • In your answer it is not clear if you see output on event1 if you touch the screen. Only then I would assume it is connected to the touch output data. The values are obviously binaries and not useful at that point.

    The module concept in tslib allows for easy configuration of different touch devices. If you get touch data from event1 you may still have to modify one of the provided modules in tslib to work with the data you get. E.g. in one case we had to reverse x and y data. At this point I can't help you anymore as this is real development and debug for a hardware that we don't have... Sorry.

    Regards.

  • Dear Frank

    I am very thankful for your generous help. I will keep on solving it.

     

    But, by the way, I got another similar problem, I have connected a RFID card to my am3517 evm through a USB hub, by command dmesg I could find the RFID card had already been detected:

     

    usb 1-1: new high speed USB device using ehci-omap and address 2

    usb 1-1: New USB device found, idVendor=05e3, idProduct=0608

    usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0

    usb 1-1: Product: USB2.0 Hub

    usb 1-1.3: new full speed USB device using ehci-omap and address 3

    usb 1-1.3: New USB device found, idVendor=067b, idProduct=2303

    usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0

    usb 1-1.3: Product: USB-Serial Controller

    usb 1-1.3: Manufacturer: Prolific Technology Inc.

     

    I could read or write this card through /dev/ttyUSB0 on my ubunbu tesktop PC, but I don't know which port on the evm would been used to communicate with this RFID card?

    Sorry for bothering you so much, thanks a lot.

     

     

     

  • Good luck with the touch :-)

    Now for the RFID we did that once too with a TI reader. We had to enable an option in the kernel for USB-serial emulation. There are quite a few of them and you need to try. This then should give you the data on a COM port. I can't remember any of the details as this work was done by a peer mainly.

    No guarantee there is already a working USB-serial emulation in the kernel that works with your case...

    Regards.

  • Looking at the device information the USB Serial driver you probably want is the pl2303. In your kernel source, do 'make menuconfig' and then select Device drivers, USB support, USB Serial Converter support, USB Prolific 2303 Single Port Serial Driver.  The reason I'm suggesting this one is because the device information says your USB Serial Controller is made by Prolific and the Product ID is 2303.

    Steve K.

  • Hi Frank
    
    Here is an article I searched:
    
    Everything works on a embedded system  with the omap3530 processor.
    The system was made up from scratch but is basicly a linux driven system
    using the 2.6.22-18 kernel. I did not use eGalax drivers nor the kernel
    touchscreen drivers. Everything runs using the usbhid subsystem. My system
    uses the /dev/hiddev0 to capture touchscreen data which is then passed to a
    custom tslib module that converts the touchscreen raw data into x and y
    coordinates.

    If it means that he had re-compiled the kernel with usb hid driver added, and my linux kernel had not?

     

  • Hi Steve
    Yes, I need pl2303 driver, I will try to re-compile the kernel, thanks. 

  • Sorry, but I have no experience with HID USB drivers and I don't know the article mentioned. I suggest you contact the author. Anyway it seems he had to create a custom tslib module too. So the approach is not much easier.

    Regards.

  • Hello Erwin,

    Regarding your problem with touch screen, have you solved your problem? I'm in the same issue.  i'll be very grateful.

    Thank you in advance.

  • Hi,

    We have connected the usb based atmel touch panel. Whenever we connected we are getting the following log. event0 also created. A plus symbol is appearing for calibration. when we touch that it is not proceeding. Kindly suggest that what might be reason. We have followed procedure as per the processors.wiki.ti.com/.../Tslib. We dont have tslib. When we downloaded and try to configure we are getting errors.

    calibrating touch screen (first time only)
    *** To continue, please complete the touchscreen calibration
    *** by touching the crosshairs on the LCD screen[ 39.047046] PVR_K: HWRecoverd

    root@am57xx-evm:~# [ 703.574772] usb 1-1: USB disconnect, device number 3
    [ 706.246972] usb 1-1: new full-speed USB device number 4 using xhci-hcd
    [ 706.395587] usb 1-1: New USB device found, idVendor=03eb, idProduct=212c
    [ 706.402345] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 706.409674] usb 1-1: Product: Atmel maXTouch Digitizer
    [ 706.414836] usb 1-1: Manufacturer: Atmel
    [ 706.441118] input: Atmel Atmel maXTouch Digitizer as /devices/platform/44000000.ocp/488c0000.omap_dwc3_2/488d0000.usb/xhci-hcd.0.auto/usb1/4
    [ 706.458701] hid-multitouch 0003:03EB:212C.0005: input,hiddev0: USB HID v1.11 Device [Atmel Atmel maXTouch Digitizer] on usb-xhci-hcd.0.auto0
    [ 706.477824] hid-multitouch 0003:03EB:212C.0006: hiddev0: USB HID v1.11 Device [Atmel Atmel maXTouch Digitizer] on usb-xhci-hcd.0.auto-1/inp

    root@am57xx-evm:~# ls -l /dev/input/
    total 0
    drwxr-xr-x 2 root root 60 Jan 1 00:11 by-id
    drwxr-xr-x 2 root root 60 Jan 1 00:11 by-path
    crw-rw---- 1 root input 13, 64 Jan 1 00:11 event0
    crw-rw---- 1 root input 13, 63 Jan 1 1970 mice
    crw-rw---- 1 root input 13, 32 Jan 1 00:11 mouse0
    lrwxrwxrwx 1 root root 6 Jan 1 00:11 touchscreen0 -> event0






    Thanks & Regards,

    N.V.Subbaiah