Mimo 720-S Touchscreen [Solved]


257 posts   Page 1 of 11   1, 2, 3, 4, 5 ... 11
by philharlow » Mon Dec 31, 2012 9:28 pm
Hello,

I didn't want to have to post, but I'm stuck. I've been googling for two days now, but I still can't get anything to work. I'm a developer, but I rarely use linux except for web maintenance, so the deeper kernel building aspect of linux are over my head currently. I got video output working on my display after 10 min (thanks to http://anup.info/blog/2012/10/13/raspbe ... mo-monitor), however I am stuck on the touchscreen part.

My setup:
Mimo 720-S Touchscreen - Uses DisplayLink tech - Worked OTB on Ubuntu 12.10, w/ drivers on Win7
Raspberry Pi rev B
Raspbian Wheezy + FrameBuffer support kernel (from http://anup.info/blog/2012/10/13/raspbe ... mo-monitor)


In my 2 days of reading I have encountered solutions for similar touch screens on similar OSs, but nothing I found directly applied to my configuration. I'm reading everything from tslib, to patched eGalax drivers, to patched e2i touchscreen modules, to usbtouchscreen, to evdev, to ev touch, to several others I don't remember. I'm lost. I don't know which road to start down. Do I just need to install drivers? Do I just need to edit some config files? Do I need to build a new kernel with some additional "modules" baked in? Do I need to write my own drivers? I feel like I'm shooting randomly into space at this point.

I feel like these Mimo screens should be common enough that someone has managed to get it working before me, I just need help to narrow down my searches to find the information I need.

Most of the installation steps I've found start with finding the input# or event# of the touchscreen with "ls /dev/input/" or "cat /proc/bus/input/devices", etc. But for me, the touchscreen doesn't show up in either of those outputs.

If I do "lsusb -v" I do see the device, and I see that it has a "Interface Descriptor" with the bInterfaceClass field being "Human Interface Device", but the two following fields (bInterfaceSubClass, bInterfaceProtocol) are blank, where as on my logitech mouse, those fields are populated with "Boot Interface Subclass" and "Mouse" respectively.

The closest thing I've found, I think, is this: http://webcache.googleusercontent.com/s ... =firefox-a (original site was down as of this post)
where the last comment on that page is from someone who has a 720-S and they claim they got the touchscreen working, but don't elaborate on how.

I'm hoping one of the linux gods in this forum could point me in the right direction. If I could get the device showing up with an event# or input# I think I could figure out the rest, but I'm not well versed enough in linux to figure out with it's not even showing up.

Thanks!

UPDATE:

This has been solved! viewtopic.php?p=306513#p306513 has links embedded to the changes necessary that solve the problem for me!
Last edited by philharlow on Sun Mar 10, 2013 10:02 am, edited 1 time in total.
Posts: 48
Joined: Mon Dec 31, 2012 9:17 pm
by philharlow » Fri Jan 04, 2013 10:59 pm
Any linux geniuses care to lend a hand? I really just need to know what direction to start going down, if anyone ha any ideas or tips!

Thanks!
Posts: 48
Joined: Mon Dec 31, 2012 9:17 pm
by DaneGardner » Sun Jan 20, 2013 9:40 pm
Following the tutorial that you linked to, also add the correct USB touchscreen driver to the kernel when running `make [...] menuconfig`.

Device Drivers >> Input device support >> Touchscreens >> USB Touchscreen Driver >> e2i Touchscreen controller (e.g. from Mimo 740).

Once you (re)install the kernel and modules it should "just work," but you may have to modify the /etc/X11/xorg.conf file. I hope this helps you out!
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by gella1992 » Tue Jan 22, 2013 4:11 pm
Hello,

I have the same configuration as philharlow.

With his tutorial I got the Display working, but I can´t use the touch.
I tried the Kernel from the Tutorial posted below in the comments because when I tried to compile my own, I got an error at ("make [...] menuconfig".). I was using Ubuntu 12.04.

Thanks for your help!
Posts: 14
Joined: Tue Jan 22, 2013 3:55 pm
by DaneGardner » Tue Jan 22, 2013 5:36 pm
gella1992 wrote:Hello,

I have the same configuration as philharlow.

With his tutorial I got the Display working, but I can´t use the touch.
I tried the Kernel from the Tutorial posted below in the comments because when I tried to compile my own, I got an error at ("make [...] menuconfig".). I was using Ubuntu 12.04.

Thanks for your help!


For the sake of brevity, and easy reading, I used "[...]" to indicate that the command was truncated (i.e. I was lazy, and could only remember the easy bits :D ). Copying from the original tutorial, try this instead: `make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig`. You would continue following the tutorial starting from that command. Good luck!
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by gella1992 » Tue Jan 22, 2013 6:06 pm
Thanks for you reply. Indeed I just copy past it from you post, to shorten the command, too.

While compiling I used the correct line. But I got an error, that some packages are missing. Tried to install them, but it failt. So I decided to take the kernel, that is posted below the tutorial in the comments.

With this kernel I get the Display working, but not the touch.

Maybe it helps you, when I post my xorg.conf. SO here we go ;) :

Section "Device"
Identifier "uga"
driver "fbdev"
Option "fbdev" "/dev/fb1"
Option "ShadowFB" "off"
EndSection

Section "Monitor"
Identifier "monitor"
EndSection

Section "Screen"
Identifier "screen"
Device "uga"
Monitor "monitor"
EndSection

Section "ServerLayout"
Identifier "default"
Screen 0 "screen" 0 0
EndSection
Section "InputDevice"
Identifier "touchscreen"
Driver "evtouch"
# You might have to change the following line.
# check the troubleshooting section at the end of
# the post
Option "Device" "/dev/input/event1"
Option "DeviceName" "touchscreen"
Option "ReportingMode" "Raw"
Option "SendCoreEvents" "On"
Option "Calibrate" "1"
Option "InvertY" "true"
Option "InvertX" "true"
Option "MinX" "630"
Option "MinY" "31000"
Option "MaxX" "31700"
Option "MaxY" "1000"
EndSection
# End of xorg.conf
Posts: 14
Joined: Tue Jan 22, 2013 3:55 pm
by DaneGardner » Tue Jan 22, 2013 6:14 pm
I don't have my Pi handy so I can't test this, but does the command `dmesg | grep -i "e2i"` return anything?

Basically there are two separate drivers needed. One for the display, and one for the touchscreen. If the kernel you're using doesn't have the touchscreen driver also compiled in, it will not work no matter what you do with your xorg.conf.

If the touchscreen driver is not available in the kernel you found, you'll have to compile your own kernel with both drivers included.
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by gella1992 » Tue Jan 22, 2013 6:21 pm
Thanks for your reply. Will test it tomorrow, cause my Raspberry is sleeping in the Car at the moment :D . Hope that the Kernel does have touchscreen drivers included, cause I´m a totally noob at compiling kernels :lol:
Posts: 14
Joined: Tue Jan 22, 2013 3:55 pm
by DaneGardner » Tue Jan 22, 2013 6:25 pm
That tutorial was pretty complete. Using the latest Ubuntu and following all of the directions should get you there. I do recall on missing Git command to clone the test repository (which was mentioned in the comment section), but if you read through some of the articles linked in the tutorial it will fill in the gaps.

Good luck!
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by gella1992 » Tue Jan 22, 2013 6:32 pm
Thanks. Do I have to be connected to the Display while doing : dmesg | grep -i "e2i" ?
If not, then I don´t get anything :cry:

So it seems as there is no touch driver included?!
Posts: 14
Joined: Tue Jan 22, 2013 3:55 pm
by DaneGardner » Tue Jan 22, 2013 7:07 pm
gella1992 wrote:Thanks. Do I have to be connected to the Display while doing : dmesg | grep -i "e2i" ?
If not, then I don´t get anything :cry:

So it seems as there is no touch driver included?!


Here's my kernel and modules <https://docs.google.com/file/d/0B0CEVXA7KYdSY3ZMYVhHY09XQnc/edit>. To install do the following (I'm not actually at a Pi, so I can't test this, you may have to take additional steps thanks to my poor memory ;) ):

On your Raspberry Pi:
Code: Select all
tar xzf 3.2.27-mimo.tgz
sudo chown -R root:root lib/
sudo cp 3.2.27-mimo/lib/modules/3.2.27-mimo+/ /lib/modules
sudo cp 3.2.27-mimo/boot/3.2.27-mimo.img /boot/
sudo echo -e "\n\nkernel = 3.2.27-mimo.img" >> /boot/config.txt
sudo reboot


If for whatever reason the kernel fails to work, load the SD card up on another machine and comment out the "kernel = 3.2.27-mimo.img" line in /boot/config.txt to read "#kernel = 3.2.27-mimo.img". This will allow you to revert to your previous kernel.

Let me know how it works out for you!
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by DaneGardner » Tue Jan 22, 2013 9:02 pm
Ack! Realized I had a typo in my isntructions:

Change this line:
Code: Select all
sudo chown -R root:root lib/


to:
Code: Select all
sudo chown -R root:root 3.2.27-mimo/
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by gella1992 » Wed Jan 23, 2013 1:22 pm
Thank you for compiling. Will try it after work. Do I have to change my previously posted xorg.conf or do I have to pick the one from the Tutorial?
Posts: 14
Joined: Tue Jan 22, 2013 3:55 pm
by gella1992 » Wed Jan 23, 2013 4:38 pm
Tried it now. Applied your settings and of course my old xorg.conf.

But I have to tell you, that there is something wrong, because now I didn´t even get the Display nor the touch to work...
Posts: 14
Joined: Tue Jan 22, 2013 3:55 pm
by DaneGardner » Wed Jan 23, 2013 4:46 pm
gella1992 wrote:Thank you for compiling. Will try it after work. Do I have to change my previously posted xorg.conf or do I have to pick the one from the Tutorial?


The auto-detect feature of Xorg should automatically get your touchscreen "working." The problem for me was the X axis was inverted. Again, I don't have my Pi here, but I used some hints on the touchscreen settings from this article <http://alt236.blogspot.com/2011/02/ubuntu-1010-mimo-um-720s-single-screen.html>. He links to a post which links to a couple others, that might also be of interest to you.

Be careful with just copy/pasting his xorg.conf, there are a ton of bugs (resolution is not 800x400 but 800x480) in it! He does detail how to get the touchscreen /dev/input/event# using dmesg though.
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by DaneGardner » Wed Jan 23, 2013 4:52 pm
gella1992 wrote:Tried it now. Applied your settings and of course my old xorg.conf.

But I have to tell you, that there is something wrong, because now I didn´t even get the Display nor the touch to work...


Might be power issues. I've been having a doozy of a time trying to get any reliability out of the Pi while the screen is attached --it works when it feels like it. I've been trying to understand it better by getting it working on a full-blown AMD/Intel machine lately (hence having to do everything by memory to get this far).

I was up until midnight working on it last night. Will likely put in some hours tonight as well. I'll keep you posted if I figure it out. I suspect it might require a dedicated power supply for the display (on top of my powered USB hub).
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by gella1992 » Wed Jan 23, 2013 5:03 pm
I will try to read through the article attached.

I don´t think it is an power related issue, cause the last kernel I used the screen just shows up perfectly.
At the boot the screen was green till the driver got loaded. But with your kernel the screen doesn´t even get green at booting.

Besides: I´m very very happy about your support!! Thank you so much
Posts: 14
Joined: Tue Jan 22, 2013 3:55 pm
by DaneGardner » Wed Jan 23, 2013 5:09 pm
gella1992 wrote:I will try to read through the article attached.

I don´t think it is an power related issue, cause the last kernel I used the screen just shows up perfectly.
At the boot the screen was green till the driver got loaded. But with your kernel the screen doesn´t even get green at booting.

Besides: I´m very very happy about your support!! Thank you so much


Really? No green screen at boot? That's odd. Mine was working to that point... but the Pi wouldn't always boot fully.

I wonder if Raspbian is assigning the display to a console, which is blanking it out.

Is there a /dev/fb0 and /dev/fb1 device? Have you tried SSHing into the Pi and riffling through dmesg to see what the problem could be? /var/log/messages and the xorg logs in /var/log (can't remember their exact file name, but it's obvious with a file listing) might also mention something.
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by gella1992 » Wed Jan 23, 2013 5:21 pm
Will try it tomorrow again.

The Problem is, that my display is fully installed into my car and there I don´t have any internet access, so I have to improvise.
Posts: 14
Joined: Tue Jan 22, 2013 3:55 pm
by DaneGardner » Thu Jan 24, 2013 2:11 am
So... I finally (sort of) figured out my hardware issues. I have been using Adafruit's Occidentalis spin of Raspbian, which apparently is not compatible with the drivers required for this project. I ripped the kernel config from the one in the comments that you mentioned, added the touchscreen driver and recompiled. It works! :D

Here's the updated kernel (no modules necessary): <https://docs.google.com/file/d/0B0CEVXA7KYdSZVg3OGR3MDAtYjQ/edit>. And this is my /etc/X11/xorg.conf file:
Code: Select all
Section "ServerFlags"
  Option "AutoAddDevices" "True"
#  Option "AllowEmptyInput" "False"
EndSection

Section     "ServerLayout"
  Identifier   "Server Layout"
  Screen 0    "DisplayLinkScreen" 0 0
  InputDevice   "touchscreen" "CorePointer"
  Option     "Xinerama" "Off"
EndSection

Section     "Device"
  Identifier   "DisplayLinkDevice"
  driver       "fbdev"
  Option     "fbdev" "/dev/fb1"
  Option      "ShadowFB" "false"
EndSection

Section     "Monitor"
  Identifier   "DisplayLinkMonitor"
EndSection

Section     "Screen"
  Identifier   "DisplayLinkScreen"
  Device     "DisplayLinkDevice"
  Monitor     "DisplayLinkMonitor"
  DefaultDepth  16
  SubSection   "Display"
    Depth      16
    Modes      "800x480"
  EndSubSection
EndSection

Section "InputDevice"
  Identifier "touchscreen"
  Driver "evdev"
  Option "Device" "/dev/input/event0"
  Option "DeviceName" "touchscreen"
  Option "ReportingMode" "Raw"
  Option "SendCoreEvents" "On"
  Option "Calibrate" "1"
  Option "InvertY" "true"
  Option "InvertX" "false"
  Option "SwapAxes" "false"
  Option "MinX" "630"
  Option "MinY" "31000"
  Option "MaxX" "31700"
  Option "MaxY" "1000"
EndSection


Remember to ensure that the /dev/input/event0 matches your actual touchscreen unit by searching through the dmesg output. Alternatively, you can use the symlinks in the /dev/input/by-id/ path. Mine comes out to:
Code: Select all
  Option "Device" "/dev/input/by-id/usb-e2i_Technology__Inc._USB_Touchpanel_L000000000-event-if00"


Let me know if you have any problems with this.
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by DaneGardner » Thu Jan 24, 2013 5:02 am
Okay, so calibration of the Mimo 720 is a bit of a pain to figure out. There is a lot of information in the forums on how to do it in Debian or Ubuntu, but not Raspbian specifically. But once you know, it only takes 30 seconds to dialed in using `evtest`.

Code: Select all
sudo apt-get install evtest
sudo evtest /dev/input/event0


You'll get the following output showing the min and max possible values for X and Y:
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1ac7 product 0x1 version 0x100
Input device name: "e2i Technology, Inc. USB Touchpanel"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 13596
Min 0
Max 32767
Event code 1 (ABS_Y)
Value 26231
Min 0
Max 32767
Properties:
Testing ... (interrupt to exit)


Touch the one corner (as close as you can to the physical corner), and then touch the opposite corner diagonally. Write down the max and min values for each axis (X and Y):
Event: time 1358998253.090903, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1358998253.090909, type 3 (EV_ABS), code 0 (ABS_X), value 632
Event: time 1358998253.090911, type 3 (EV_ABS), code 1 (ABS_Y), value 1111
Event: time 1358998253.090912, -------------- SYN_REPORT ------------
Event: time 1358998253.217917, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1358998253.217923, -------------- SYN_REPORT ------------
Event: time 1358998253.574979, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1358998253.574984, type 3 (EV_ABS), code 0 (ABS_X), value 847
Event: time 1358998253.574986, type 3 (EV_ABS), code 1 (ABS_Y), value 1116
Event: time 1358998253.574987, -------------- SYN_REPORT ------------
Event: time 1358998253.778005, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1358998253.778010, -------------- SYN_REPORT ------------
Event: time 1358998261.397184, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1358998261.397190, type 3 (EV_ABS), code 0 (ABS_X), value 32024
Event: time 1358998261.397191, type 3 (EV_ABS), code 1 (ABS_Y), value 31806
Event: time 1358998261.397193, -------------- SYN_REPORT ------------
Event: time 1358998261.584205, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1358998261.584210, -------------- SYN_REPORT ------------
Event: time 1358998261.888255, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1358998261.888260, type 3 (EV_ABS), code 0 (ABS_X), value 32036
Event: time 1358998261.888261, type 3 (EV_ABS), code 1 (ABS_Y), value 31770
Event: time 1358998261.888263, -------------- SYN_REPORT ------------
Event: time 1358998261.984266, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1358998261.984270, -------------- SYN_REPORT ------------


Then set your values in /etc/X11/xorg.conf such that you have the range for x then y. For example "xMin xMax yMin yMax".
[...]

Section "InputDevice"
Identifier "touchscreen"
Driver "evdev"
Option "Device" "/dev/input/by-id/usb-e2i_Technology__Inc._USB_Touchpanel_L000000000-event-if00"
Option "DeviceName" "touchscreen"
Option "ReportingMode" "Raw"
Option "SendCoreEvents" "On"
Option "Calibrate" "1"
Option "Calibration" "630 32000 1100 31800"
Option "InvertY" "true"
Option "InvertX" "false"
Option "SwapAxes" "false"
EndSection


Hope this helps somebody out there!
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by gella1992 » Fri Jan 25, 2013 11:33 am
Thanks again for compiling. Wanted to try it yesterday, but my Raspberry didn´t boot up :o Seems like it has destroyed my SD-Card.

Have to take a look on it befor I can test it. Will report as far as I have found the reason.
Posts: 14
Joined: Tue Jan 22, 2013 3:55 pm
by DaneGardner » Fri Jan 25, 2013 5:55 pm
gella1992 wrote:Thanks again for compiling. Wanted to try it yesterday, but my Raspberry didn´t boot up :o Seems like it has destroyed my SD-Card.

Have to take a look on it befor I can test it. Will report as far as I have found the reason.


Did you make sure to change the kernel name in the /boot/config.txt file?
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area
by philharlow » Fri Jan 25, 2013 9:14 pm
Wow. I got the initial email from the forums saying Dane had replied, but I've been too busy this week to read it and kept putting it off. By the time I finally got around to pulling it up last night, to my amazement, Dan had already compiled a kernel for me/gella/the community! Thanks DaneGardner! I will be trying this first thing tonight!
Posts: 48
Joined: Mon Dec 31, 2012 9:17 pm
by DaneGardner » Fri Jan 25, 2013 9:29 pm
philharlow wrote:Wow. I got the initial email from the forums saying Dane had replied, but I've been too busy this week to read it and kept putting it off. By the time I finally got around to pulling it up last night, to my amazement, Dan had already compiled a kernel for me/gella/the community! Thanks DaneGardner! I will be trying this first thing tonight!


You're very welcome. To be honest, I was doing it anyway for my project; I merely made my notes and work public. ;) Let me know if you run into any problems.
Posts: 40
Joined: Sun Jan 20, 2013 9:25 pm
Location: Greater Seattle Area