Page 1 of 2

Has anyone got this 3.5" TFT + Touch working? -Solved kinda

Posted: Wed Feb 17, 2016 9:04 am
by TheQuestor
s-l16001.jpg
s-l16001.jpg (38.96 KiB) Viewed 7960 times
Has anyone been able to get one of these display modules working with RPI at all?

I have tried a dozen or so different "how to" and so far I have not been able to get anywhere with it :(

So far the ebay vendor I bought it from has been about as helpful as a bullet to the brain and that is what my brain feels like trying to get it going :(

Re: Has anyone got this 3.5" TFT + Touch working?

Posted: Wed Feb 17, 2016 12:31 pm
by DirkS
Try one of the overlays from https://github.com/swkim01/waveshare-dtoverlays
AFAICT this screen is compatible with the Waveshare 3.5".

Follow the instructions from the link above.
In short:
copy waveshare35a-overlay.dtb to /boot/overlays/
Then add

Code: Select all

dtparam=spi=on
dtoverlay=waveshare35a
to /boot/config.txt
If it works the screen should light up first and then go black.
To get output on the screen on boot you need to add

Code: Select all

fbcon=map:1
to the end of the line with parameters in /boot/cmdline.txt

Re: Has anyone got this 3.5" TFT + Touch working?

Posted: Thu Feb 18, 2016 1:29 pm
by TheQuestor
I was able to contact the vendor I bought it from and they gave me a link to an image and docs and it works actually pretty well lol.
booted it up and presto working screen, working touch, pen works.

the link I was provided is 116.6.104.5:801/yks/s/a9d61e0c not sure how long it will last and it took me like 3 or 4 attempts to download.

I will give your info a shot with a clean image later though and thanks for the reply :)

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Sat Feb 20, 2016 3:09 am
by Blandest
TheQuestor wrote:I was able to contact the vendor I bought it from and they gave me a link to an image and docs and it works actually pretty well lol.
booted it up and presto working screen, working touch, pen works.

the link I was provided is 116.6.104.5:801/yks/s/a9d61e0c not sure how long it will last and it took me like 3 or 4 attempts to download.

I will give your info a shot with a clean image later though and thanks for the reply :)
Thank you for this link. I tried this image and it's not working for me (the green LED does not come on) so I've probably done something wrong.

I would also appreciate it if someone could clarify how to get this running on a clean install of the 2016 February release of Raspian Jesse.

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Sun Feb 21, 2016 5:02 am
by TheQuestor
Blandest wrote:
TheQuestor wrote:I was able to contact the vendor I bought it from and they gave me a link to an image and docs and it works actually pretty well lol.
booted it up and presto working screen, working touch, pen works.

the link I was provided is 116.6.104.5:801/yks/s/a9d61e0c not sure how long it will last and it took me like 3 or 4 attempts to download.

I will give your info a shot with a clean image later though and thanks for the reply :)
Thank you for this link. I tried this image and it's not working for me (the green LED does not come on) so I've probably done something wrong.

I would also appreciate it if someone could clarify how to get this running on a clean install of the 2016 February release of Raspian Jesse.

This is for the RPI B not the RPI 2 I have a different LCD coming for my RPI 2 [it's a cheap HDMI+touch 5 inch]

Re: Has anyone got this 3.5" TFT + Touch working?

Posted: Sun Feb 21, 2016 5:15 am
by TheQuestor
DirkS wrote:Try one of the overlays from https://github.com/swkim01/waveshare-dtoverlays
AFAICT this screen is compatible with the Waveshare 3.5".

Follow the instructions from the link above.
In short:
copy waveshare35a-overlay.dtb to /boot/overlays/
Then add

Code: Select all

dtparam=spi=on
dtoverlay=waveshare35a
to /boot/config.txt
If it works the screen should light up first and then go black.
To get output on the screen on boot you need to add

Code: Select all

fbcon=map:1
to the end of the line with parameters in /boot/cmdline.txt
I just did all this and the screen doesn't go black or output anything on boot :(

dmesg shows it as registered though and the touch screen too :?:

Code: Select all

[   13.218174] input: ADS7846 Touchscreen as /devices/platform/soc/20204000.spi/spi_master/spi0/spi0.1/input/input1
[   13.235138] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[   13.299036] fb_ili9486: module is from the staging directory, the quality is unknown, you have been warned.
[   13.307470] fbtft_of_value: regwidth = 16
[   13.307512] fbtft_of_value: buswidth = 8
[   13.307529] fbtft_of_value: debug = 0
[   13.307542] fbtft_of_value: rotate = 90
[   13.307554] fbtft_of_value: fps = 30
[   13.746794] usbcore: registered new interface driver rtl8192cu
[   14.590035] graphics fb1: fb_ili9486 frame buffer, 480x320, 300 KiB video memory, 4 KiB DMA buffer memory, fps=33, spi0.0 at 16 MHz
ok I take it back it does go from white to black and then nothing. Doesn't matter if I set it to boot to cmd or to X :(
I'm considering trying this on my RPI 2 but I'd really like it get it working on my RPI B using Jessie

Re: Has anyone got this 3.5" TFT + Touch working?

Posted: Sun Feb 21, 2016 8:29 am
by DirkS
TheQuestor wrote:dmesg shows it as registered though and the touch screen too :?:
Yes, the overlay takes care of both screen and touch driver.
I just did all this and the screen doesn't go black or output anything on boot :(
Can you ssh in to the Pi?
If so, try the following command:

Code: Select all

con2fbmap 1 1
This changes what gets shown on the screen. I would expect to see some boot messages and the login prompt.

I would suggest setting it to boot to command line while you're configuring the display and touch.

Re: Has anyone got this 3.5" TFT + Touch working?

Posted: Sun Feb 21, 2016 9:21 am
by TheQuestor
DirkS wrote:
TheQuestor wrote:dmesg shows it as registered though and the touch screen too :?:
Yes, the overlay takes care of both screen and touch driver.
I just did all this and the screen doesn't go black or output anything on boot :(
Can you ssh in to the Pi?
If so, try the following command:

Code: Select all

con2fbmap 1 1
This changes what gets shown on the screen. I would expect to see some boot messages and the login prompt.

I would suggest setting it to boot to command line while you're configuring the display and touch.
con2fbmap 1 1 works lol

where do I add that so it shows the bootup messages ?

Re: Has anyone got this 3.5" TFT + Touch working?

Posted: Sun Feb 21, 2016 9:34 am
by DirkS
TheQuestor wrote:con2fbmap 1 1 works lol

where do I add that so it shows the bootup messages ?
Great. The fbcon=map addition should have taken care of that, but I suspect something went wrong there.
To add it edit /boot/cmdline.txt as described above. You will have to add it at the end of the first (and only) line in this file.
Save it and reboot.

Re: Has anyone got this 3.5" TFT + Touch working?

Posted: Sun Feb 21, 2016 9:45 am
by TheQuestor
DirkS wrote:
TheQuestor wrote:con2fbmap 1 1 works lol

where do I add that so it shows the bootup messages ?
Great. The fbcon=map addition should have taken care of that, but I suspect something went wrong there.
To add it edit /boot/cmdline.txt as described above. You will have to add it at the end of the first (and only) line in this file.
Save it and reboot.
Works great thanks! I'll figure out how to calibrate my pen after I get some sleep.

joy!

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Mon Feb 22, 2016 4:56 am
by Blandest
Is it confirmed that this screen doesn't work with the Pi 2?

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Mon Feb 22, 2016 6:40 am
by TheQuestor
Blandest wrote:Is it confirmed that this screen doesn't work with the Pi 2?
screen works fine on a RPI2 still having issues getting the touch to calibrate on both the RPI and RPI2. Both "calibrate" neither save :(

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Mon Feb 22, 2016 9:40 am
by DirkS
Blandest wrote:Is it confirmed that this screen doesn't work with the Pi 2?
Why do you think it doesn't work with the Pi2B?

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Mon Feb 22, 2016 9:44 am
by DirkS
TheQuestor wrote:
Blandest wrote:Is it confirmed that this screen doesn't work with the Pi 2?
screen works fine on a RPI2 still having issues getting the touch to calibrate on both the RPI and RPI2. Both "calibrate" neither save :(
Is this calibration for X / desktop?

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Mon Feb 22, 2016 9:54 am
by TheQuestor
DirkS wrote:
TheQuestor wrote:
Blandest wrote:Is it confirmed that this screen doesn't work with the Pi 2?
screen works fine on a RPI2 still having issues getting the touch to calibrate on both the RPI and RPI2. Both "calibrate" neither save :(
Is this calibration for X / desktop?
Correct. Grey screen comes up. I click on each X as it appears and then a command prompt comes up with the new values for 50-synaptics.conf but on close the calibration is non-existant :(

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Mon Feb 22, 2016 10:00 am
by DirkS
TheQuestor wrote:Correct. Grey screen comes up. I click on each X as it appears and then a command prompt comes up with the new values for 50-synaptics.conf but on close the calibration is non-existant :(
https://learn.adafruit.com/adafruit-pit ... alibration suggests to move the old calibration file out of the way (or delete) it

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Fri Mar 04, 2016 9:32 am
by wilika
Hey!

I'm also struggling with tis type of display. So far I've managed to show some boot information, but then it just enters into "rescue mode". I'm even able to use a usb keyboard to type in commands, or even SSH into the raspberry, but when I exit this rescue mode, the screen will only show an underscore on the upper left corner, and that's it. (SSH still works... mostly)

I have the

Code: Select all

dtparam=spi=on
dtoverlay=waveshare35a
in the config.txt and the
fbcon=map:1 con2fbmap 1 1
at the end of cmdline.txt

Any idea where have I gone wrong?

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Fri Mar 04, 2016 11:26 am
by DirkS
wilika wrote:
fbcon=map:1 con2fbmap 1 1
at the end of cmdline.txt

Any idea where have I gone wrong?
In cmdline.txt
You should just add

Code: Select all

fbcom=map:1
at the end of the line.

Code: Select all

con2fbmap 1 1
is used on the command line (in a terminal / console) to change the mapping manually

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Fri Mar 04, 2016 12:33 pm
by wilika
Geez, thanks.
So now it starts, I can see the lines rolling during booting, but then I get the blank screen, with the static underscore.

I can SSH into the Pi, but running the

Code: Select all

sudo con2fbmap 1 1
does nothing. With or without sudo as well. :(

Shuold I try to install the waveshare drivers as told here?;
http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Fri Mar 04, 2016 12:41 pm
by DirkS
wilika wrote:Geez, thanks.
So now it starts, I can see the lines rolling during booting, but then I get the blank screen, with the static underscore.
I suspect there's something else interfering.

Post the contents of /boot/config.txt, /etc/modules, /etc/c.local

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Fri Mar 04, 2016 12:54 pm
by wilika
modules only has the following uncommented row;

Code: Select all

i2c-dev
the end of config.txt looks like this;

Code: Select all

dtparam=audio=on
dtparam=spi=on
dtoverlay=waveshare35a
/etc/c.local does not exist

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Fri Mar 04, 2016 1:38 pm
by DirkS
wilika wrote:/etc/c.local does not exist
Typo, sorry. That should be /etc/rc.local

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Fri Mar 04, 2016 1:45 pm
by wilika
That's all

Code: Select all

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

exit 0

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Fri Mar 04, 2016 2:20 pm
by wilika
Now, I've tried to install the weveshare drivers, according to the linked site.

The weird thing;
- the red LED doesn't light up at all, once it has booted.
- no booting info on screen

Well, it did mess up the cmdline and the config txt-s a bit.
I guess, I'll revert back to the previous version (I've created an image of the card)

cmdline looks like this;

Code: Select all

dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:1 fbcon=font:ProFont6x11 logo.nologo
modules has got some new lines as well;

Code: Select all

snd-bcm2835
i2c-bcm2708
i2c-dev

flexfb  width=320  height=480  regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x$
fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24
ads7846_device model=7846 cs=1 gpio_pendown=17  keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
And config has also changed;

Code: Select all

start_x=1
gpu_mem=128
core_freq=250
sdram_freq=400
over_voltage=0
dtparam=spi=on
dtparam=i2c_arm=on
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1
dtoverlay=waveshare35a

Re: Has anyone got this 3.5" TFT + Touch working? -Solved ki

Posted: Fri Mar 04, 2016 2:48 pm
by DirkS
Entries in /etc/modules don't go well together with config.txt.

You probably only need

Code: Select all

i2c-dev
in /etc/modules
The rest is taken care of by the entries in config.txt