Help with android Capsense

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with android Capsense

2,762 Views
kobusgoosen
Contributor II

I'm trying to get a 7" touchscreen working in android with an IMX6 (technexion edm). The touch IC is from pixcir, and a driver exists for it in newer kernels, but not the 3.0.X used for android. I copied the driver into my kernel and got it to work by sligthy modifying the module interface parts. Andoird now sees the input device, and seems to understand the input from it.

see my original post: Wandboard Discussion Forums • View topic - Help with i2c PCAP panel

There's one problem, when I move my finger over the display it moves a relative cursor, like moving with a mouse (except when I use a mouse the cursor, a circle, turns into a mouse pointer). The touches aren't registered at their absolute position on display.

I originally thought this might be due to the particular input events the driver registers, but this doesn't seem to be the case. I tried removing everything except ABS_MT_POSITION_X and ABS_MT_POSITION_Y, I also tried copying exactly what was done in the egalaxy and driver, where they register and report

ABS_MT_POSITION_X

ABS_MT_POSITION_Y

ABS_MT_TRACKING_ID     (I left this out as my driver doesnt )

ABS_X

ABS_Y

ABS_MT_TOUCH_MAJOR

This does nothing except that when I run cat /proc/bus/input/devices it is reported as both an event device and a mouse...

I can confirm that the events being generated are in absolute coordinates. When I run getevent -lt /dev/input/event1 I get absolute x and y points that to go to roughly 0,0 in the top left corner, and roughly 1024,600 in the bottom left, which tells me that it probably doesnt need to be calibrated.

Does anyone know why the android system would not interpret these as absolute coordinates? the inly thing I can think is that its expecting a calibration file because the build I'm using originally worked with a resisitive display. However my andoird build does not appear to include tslib.

Any help would be appreciated.   

Labels (3)
0 Kudos
9 Replies

1,528 Views
kobusgoosen
Contributor II

I read up about the andoid event structure and porting guide (here's a good doc for porting, and more info on the multi-touch input system), and found out I do actually need a file to tell the android system about the touch screen: I need to put an .idc file under system/usr/idc. I edited the imx6.mk file in the android device folder as follows:

..

device/technexion/common/input/Dell_Dell_USB_Keyboard.idc:system/usr/idc/Dell_Dell_USB_Keyboard.idc \
device/technexion/common/input/eGalax_Touch_Screen.idc:system/usr/idc/eGalax_Touch_Screen.idc \
device/technexion/common/input/eGalax_Touch_Screen.idc:system/usr/idc/HannStar_P1003_Touchscreen.idc \

device/technexion/common/input/eGalax_Touch_Screen.idc:system/usr/idc/Novatek_NT11003_Touch_Screen.idc \

device/technexion/common/input/eGalax_Touch_Screen.idc:system/usr/idc/pixcir-i2c-ts.idc \

device/technexion/common/input/eGalax_Touch_Screen.idc:system/usr/idc/prism.idc \
device/technexion/common/input/eGalax_Touch_Screen.idc:system/usr/idc/ADS7846_Touchscreen.idc \

device/technexion/imx6/etc/init.rc:root/init.rc \

..

The eGalax file is increadibly basic, it just tells android its a multi-touch screen and doesnt need calibration...

unfortunately doesn't seem to have fixed the problem. is there any way of knowing if the IDC was correctly loaded to the correct input device?

0 Kudos

1,528 Views
kobusgoosen
Contributor II

I managed to get this working. The problem was the .idc file not being loaded. It took me a while to figure out as I didn't realise my kernel and file android filesystem were being loaded from 2 different cards (the kernel booted from the card and the filesystem from the emmc).

The basic eGalax touch idc file works fine. I don't have multitouch yet, but this should be simple enough to get back.

1,528 Views
zhanghuan
Contributor I

I've met the same problem, but I can't find the imx6.mk file, even not the imx6 file folder. I don't know why? Can you help me? Thank you very much.

0 Kudos

1,528 Views
zhanghuan
Contributor I

device/fsl/common/input/Dell_Dell_USB_Keyboard.kl:system/usr/keylayout/Dell_Dell_USB_Keyboard.kl \

313         device/fsl/common/input/Dell_Dell_USB_Keyboard.idc:system/usr/idc/Dell_Dell_USB_Keyboard.idc \

314         device/fsl/common/input/eGalax_Touch_Screen.idc:system/usr/idc/eGalax_Touch_Screen.idc \

315         device/fsl/common/input/eGalax_Touch_Screen.idc:system/usr/idc/HannStar_P1003_Touchscreen.idc \

316         device/fsl/common/input/eGalax_Touch_Screen.idc:system/usr/idc/Novatek_NT11003_Touch_Screen.idc \

317         device/fsl/common/input/Dell_Dell_USB_Keyboard.idc:system/usr/idc/Dell_Dell_USB_Keyboard.idc \

318         device/fsl/common/input/eGalax_Touch_Screen.idc:system/usr/idc/eGalax_Touch_Screen.idc \

319         device/fsl/common/input/Goodix_Capacitive_TouchScreen.idc:system/usr/idc/Goodix_Capacitive_TouchScreen.idc     \

320         device/fsl/common/input/HannStar_P1003_Touchscreen.idc:system/usr/idc/HannStar_P1003_Touchscreen.idc\

321         device/fsl/common/input/Novatek_NT11003_Touch_Screen.idc:system/usr/idc/Novatek_NT11003_Touch_Screen.idc \

322         device/fsl/common/input/qwerty.idc:system/usr/idc/qwerty.idc \

323         device/fsl/common/input/qwerty2.idc:system/usr/idc/qwerty2.idc \

324         device/fsl/common/input/TSC2007_Touchscreen.idc:system/usr/idc/TSC2007_Touchscreen.idc \

325         device/fsl/imx6/etc/init.rc:root/init.rc \

326         device/fsl/imx6/etc/apns-conf.xml:system/etc/apns-conf.xml \

327         device/fsl/imx6/etc/init.usb.rc:root/init.freescale.usb.rc \

328         device/fsl/imx6/etc/ueventd.freescale.rc:root/ueventd.freescale.rc \

329         device/fsl/imx6/etc/ppp/init.gprs-pppd:system/etc/ppp/init.gprs-pppd \

330         device/fsl/imx6/etc/ota.conf:system/etc/ota.conf \

331         device/fsl/common/display/display_mode_fb0.conf:system/etc/display_mode_fb0.conf \

332         device/fsl/common/display/display_mode_fb2.conf:system/etc/display_mode_fb2.conf \

333         device/fsl/common/display/display_mode_fb4.conf:system/etc/display_mode_fb4.conf

Above is my imx6.mk. How should I correct it? I don't know. Thank you!

0 Kudos

1,528 Views
kobusgoosen
Contributor II

I need to mention that my hardware/software is significantly different from when I posted  this.

I'd like to help, but I have no idea what hardware, screen or version of Android you are using.

Have you even confirmed that the touch screen is working? You should at least confirm that the kernel is correctly loading and seeing the touch screen before worrying about the idc  file.

0 Kudos

1,528 Views
zhanghuan
Contributor I

I am a beginner. I'm sorry I didn't say it clear. I use a imx6 board now, and I have a ft5x06 touchscreen. The android version is 4.3. I add the ft5x06 driver to the kernel, compile it, and finally it seems to get work right. Unfornately there is a problem: the driver shows a circular cursor on the screen and takes the finger movements as relative coordinates and moves the cursor. It acts as a laptop touchpad. I googled it for a long time, found nothing useful until I found here. I suspect I should edit the imx6.mk as well, but I don't know how to do and why. That's my question. Could you give me some ideas?

0 Kudos

1,528 Views
gpashok
Contributor I

I am beginner, trying tointerface FT5316 based touchscreen to wandboard, and couldn't find a way to do i so far.

I have added FT5x06 driver to kernel, but not sure about the other change. Can you help me the steps I need to follow?

This is what I have done so far.

I am using Marsh-mellow sources from wandboard.org and using i.mx6dl. Display is connected through HDMI and touchscreen through I2C channel 1 ( in kernel it is called as I2C2). i2cdetect -y 2 is detecting the Chip with address 0x38. Connected GPIO (3, 26) as interrupt and GPIO(6, 31) as reset, but not sure how to use these lines as interrupt and GPIO.

Regards,

Ashok

0 Kudos

1,528 Views
kobusgoosen
Contributor II

Well, that does sound like the problem I had back then...

I would say at this point you need to make sure the idc file is actually being copied. this should simple enough, just go into your output directory and browse to system/usr/idc/ and see if the correct .idc file has been placed there.

Then you also need to make sure your driver references one of the .idc files. If I remember correctly, the file has to have the exact name of the driver. So I would say copy eGalaxy_Touch.idc and rename it to ft5x06.idc

Interestingly, the newer version of Android I'm using now (4.4 with kernel 3.10) doesn't seem to need this. I haven't bothered with the idc files after the upgrade and it just works.

0 Kudos

1,528 Views
zhanghuan
Contributor I

Wow, It works! I'm very grateful for your help. Thank you very much!

0 Kudos