Forum
[PROBLEM] Waveshare5/Sainsmart 7" HDMI with GPIO touch - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Hardware (/forum-7.html)
+--- Forum: Video and Audio (/forum-28.html)
+--- Thread: [PROBLEM] Waveshare5/Sainsmart 7" HDMI with GPIO touch (/thread-3849.html)

Pages: 1 2


Waveshare5/Sainsmart 7" HDMI with GPIO touch - Matt Larose - 20th Oct, 2016 11:07 AM

Hey all,
Looking for some help on a screen I have, with Xbian. I love the xbian image, it's fast and clean and runs great!
However the screen I have attached is not going well. I had it attached to raspian (with built in drivers for this screen) and it works good, but any other image requires drivers to be installed manually.
Notro drivers seem to work fine on newer versions of raspian, and I've had success before with an overlay - however an overlay doesn't provide the touch screen function.

So here's the deal on this screen: It's a 7" (or 5 depending who you ask) HDMI LCD screen with GPIO pins for touch capability. I purchased it from "sainsmart" who sold it to me as a 7" HDMI LCD screen (800x480)
They provide an old raspbian image with an outdated kernel. It works, I suppose, for what it is.
The pi shows this device as ADS7846, and searching this term online just leads me to a group of screens (from 3.2" to 10.1") so that gave me nothing.
Searching the driver package on the pre-built image (5_HDMI_LCD.tar.gz) leads me to waveshare's 5" screen.....I have tried their drivers, and they work exactly the same as the ones provided by sainsmart. I'm assuming one of those manufactures is copying the other. In any case!
I cannot get it to function in Xbian.
When turned on right out of the box (freshly burned SD card with Xbian rpi3) the screen is all lines and colours, but then turns into the first one quarter of the xbian OS screen. Touch does not respond.
I've tried installing manufacturer drivers, but that seems to break Xbian, because after reboot, nothing loads. It stops at a kernel panic.

Is there anything out there for these screens??


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Nachteule - 20th Oct, 2016 08:10 PM

Do you have a link to the display you purchased?

I bought this one 9 months ago and got display and touch working.

But unfortunately Kodi can not deal with touch driver and I haven't had time to look deeper to this problem Sad


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Matt Larose - 21st Oct, 2016 04:45 AM

(20th Oct, 2016 08:10 PM)Nachteule Wrote:  Do you have a link to the display you purchased?

I bought this one 9 months ago and got display and touch working.

But unfortunately Kodi can not deal with touch driver and I haven't had time to look deeper to this problem Sad

That is the exact model, yes!
How did you get it working?!


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Nachteule - 21st Oct, 2016 04:55 AM

I'll have to look for my configuration.

Posting it tomorrow Smile


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Matt Larose - 21st Oct, 2016 12:24 PM

(21st Oct, 2016 04:55 AM)Nachteule Wrote:  I'll have to look for my configuration.

Posting it tomorrow Smile

Looking forward to it! Thanks


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Nachteule - 22nd Oct, 2016 01:44 AM

So, here is my configuration Smile

Please add following lines to file /boot/config.txt

Quote:# 800x480 HDMI TFT Display und Touch Begin

# Force resolution to 800x480
hdmi_drive=1
hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0

# Enable Touch
dtparam=spi=on
dtparam=i2c_arm=on
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1

dtoverlay=ads7846,penirq=25

# 800x480 HDMI TFT Display und Touch End

If Kodi has issues coming up with forced resolution 800x480 (happened here), you could try following workaround:

1: Boot RPi with connected TV at HDMI
2: Modify /boot/config.txt (see above)
3. Reboot RPi
4. Configure screen resolution to 800x480 in Kodi settings
5. Shutdown RPi
6. Connect LCD display
7. Boot RPi

Now Kodi should come up with forced 800x480 resolution



Running Kodi Krypton (v17) from devel repo on Rpi3


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Matt Larose - 23rd Oct, 2016 04:10 AM

(22nd Oct, 2016 01:44 AM)Nachteule Wrote:  So, here is my configuration Smile

Please add following lines to file /boot/config.txt

Quote:# 800x480 HDMI TFT Display und Touch Begin

# Force resolution to 800x480
hdmi_drive=1
hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0

# Enable Touch
dtparam=spi=on
dtparam=i2c_arm=on
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1

dtoverlay=ads7846,penirq=25

# 800x480 HDMI TFT Display und Touch End

If Kodi has issues coming up with forced resolution 800x480 (happened here), you could try following workaround:

1: Boot RPi with connected TV at HDMI
2: Modify /boot/config.txt (see above)
3. Reboot RPi
4. Configure screen resolution to 800x480 in Kodi settings
5. Shutdown RPi
6. Connect LCD display
7. Boot RPi

Now Kodi should come up with forced 800x480 resolution



Running Kodi Krypton (v17) from devel repo on Rpi3

Well, it kind of worked. The loading screen for xbian looks great on the screen.
When it gets to loading kodi, however, the screen fades completely grey.

I'll try hooking it up to a tv to see if I can change the resolution settings within kodi.
Hopefully it works!


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Nachteule - 23rd Oct, 2016 04:34 AM

(23rd Oct, 2016 04:10 AM)Matt Larose Wrote:  Well, it kind of worked. The loading screen for xbian looks great on the screen.
When it gets to loading kodi, however, the screen fades completely grey.

I'll try hooking it up to a tv to see if I can change the resolution settings within kodi.
Hopefully it works!

Yeah, it should Exclamation


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Nachteule - 23rd Oct, 2016 04:37 AM

The problem is Kodi requests available resolution from display, but it seems this display does not report anything or only garbage and that's confusing Kodi


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Matt Larose - 23rd Oct, 2016 04:51 AM

Well, changed the resolution in kodi and rebooted, it works!
But no touch screen. Any advice on getting touchscreen functionality?
Thanks for getting me this far!


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Nachteule - 23rd Oct, 2016 05:22 AM

No yet. See my first post in this thread

Currently I do not have time - and motivation - to look deeper into this problem


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Nachteule - 25th Oct, 2016 04:21 AM

@Matt Larose

Good news Smile

Looked a bit around ... and found this post and this blog

Seems Kodi v17 supports touch screens like yours (and mine) out of the box

Will test it next days ...


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Matt Larose - 25th Oct, 2016 04:10 PM

(25th Oct, 2016 04:21 AM)Nachteule Wrote:  @Matt Larose

Good news Smile

Looked a bit around ... and found this post and this blog

Seems Kodi v17 supports touch screens like yours (and mine) out of the box

Will test it next days ...

Best news I've heard all day. Maybe now I can get this jukebox running properly.
Going to test this myself tomorrow - will update if it works.


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Matt Larose - 26th Oct, 2016 06:39 AM

Can confirm that this method How to set up a touch screen in kodi Does NOT work on my installed Xbian.
Half the steps fail - cannot find xinput_calibrator in apt-get. Can not find most of the libraries he says to install.
No user named kodi in system.

This likely has to do with using Xbian which has Kodi built in and probably based on openelec or something similar.

The search continues....


RE: Waveshare5/Sainsmart 7" HDMI with GPIO touch - Nachteule - 1st Nov, 2016 04:49 AM

Oh yes, you're right. Those libs are not longer part of Debian Jessie Sad

But - you do not need all that library stuff for Kodi Smile

Just tested, I only had to add following lines to file /home/xbian/.kodi/userdata/advancedsettings.xml,

Code:
<touchscreen>
    <x_offset>-32</x_offset> <!-- cursor pixel x offset -->
    <y_offset>-35</y_offset> <!-- cursor pixel y offset -->
    <x_stretch_factor>0.209</x_stretch_factor> <!-- stretch factor -->
    <y_stretch_factor>0.131</y_stretch_factor> <!-- stretch factor -->
</touchscreen>

modifying file /usr/local/share/kodi/system/keymaps/mouse.xml [1]

and restart Kodi (v17! from devel repo)

[1] would be good idea to copy this file into folder /home/xbian/.kodi/userdata/keymaps and edit it there