Pi Zero W and 2.8" Display
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- kck
- Posts: 29
- Joined: Fri Dec 25, 2015 1:40 pm
Pi Zero W and 2.8" Display
It seems that to get support for the Pi Zero W you need to use the latest (March) Raspbian from the Foundation. However, when I install an Adafruit display on that version using the scripts after reboot the WLAN is gone. System says it can't find a wlan interface. If I plug one in on USB that one gets recognized. Seems I can either use the on-board WiFi or a PiTFT but not both. Can you guys suggest a path forward since you sell both?
- kck
- Posts: 29
- Joined: Fri Dec 25, 2015 1:40 pm
Re: Pi Zero W and 2.8" Display
So I dug into this further. The problem is that the modifications that the pitft helper script makes to config.txt break things for the Pi Zero W. Specifically, if you just run that helper script you will find that on subsequent boots dmesg will show that the machine type is an unknown RPi rather than the Pi Zero W that is showed upon initial install. So a couple of observations to get this working. 1) the latest Raspbian image already has the pitft overlays in the /boot/overlays directory so there is no need to install those and update the kernel. 2) if you just run the helper script to set up the other stuff the display will need but then go back and undo the changes it made to config.txt and simply turn on the 3 dtparameters that it sets and set the dtoverlay to load the correct overlay that you find in the overlays directory (note the names there are slightly different) then you can get the system up. Not being fluent in device tree I believe that the explicit [pi1] and [p12] sections that specify the particular dtb file to start the boot with are the culprit. There is a new dtb file in /boot specific to the Pi Zero W and I think the adafruit script is overriding that incorrectly. In any case, the Adafruit support guys should take a look since I certainly won't be the last person with a W that wants to use a display with it.
- charlesl2
- Posts: 36
- Joined: Thu Feb 27, 2014 9:05 pm
Re: Pi Zero W and 2.8" Display
I would like to add my 2 cents to encourage the adafruit team to publish a corrected scripts for the rpi w. Thanks for the good work guys.
- Re4son
- Posts: 6
- Joined: Mon Sep 12, 2016 7:46 am
Re: Pi Zero W and 2.8" Display
Hi Guys,
I've updated the Re4son-Kernel to support the Raspberry Pi Zero W.
This kernel provides support for all common TFT displays, onboard wifi & bluetooth, etc. and is compatible with all Linuxes on the Raspberry Pi 1/2/3/Zero/ Zero 4.
Head over to this site to download it and you'll be up and running in no time:
https://www.whitedome.com.au/re4son/re4son-kernel
Happy hacking,
Re4son
I've updated the Re4son-Kernel to support the Raspberry Pi Zero W.
This kernel provides support for all common TFT displays, onboard wifi & bluetooth, etc. and is compatible with all Linuxes on the Raspberry Pi 1/2/3/Zero/ Zero 4.
Head over to this site to download it and you'll be up and running in no time:
https://www.whitedome.com.au/re4son/re4son-kernel
Happy hacking,
Re4son
- kck
- Posts: 29
- Joined: Fri Dec 25, 2015 1:40 pm
Re: Pi Zero W and 2.8" Display
Actually I had been watching your site because of the work you had done getting tfts up earlier. Think I managed to pull a very early bad version of your posting because it seemed to not keep the W version of the base device tree when installed over the current Raspbian (which I needed for other reasons). Just did the install again and it works to keep the wlan in place (although contrary to your comments on your blog it did ask me about installing the wifi and bt even though I was starting with the Raspbian version - no big deal there).
I did find something you may want to include or at least point folks at. I was actually doing the install over a Waveshare clone I had around and it turns out that the touchscreen calibration is off in a strange way in X after the install. The cursor won't go to the edge of the screen via touch. Hunting for others with the problem I found a solution at https://github.com/goodtft/LCD-show. It seems that something else is awry in the latest Raspbian that this fixes. I ran LCD-show for the 3.5 screen and installed the fixes and things worked correctly.
Thanks for your efforts on this. Hope the Raspbian and Adafruit guys get around to including all the fixes to less fluent users don't need to go through all this.
I did find something you may want to include or at least point folks at. I was actually doing the install over a Waveshare clone I had around and it turns out that the touchscreen calibration is off in a strange way in X after the install. The cursor won't go to the edge of the screen via touch. Hunting for others with the problem I found a solution at https://github.com/goodtft/LCD-show. It seems that something else is awry in the latest Raspbian that this fixes. I ran LCD-show for the 3.5 screen and installed the fixes and things worked correctly.
Thanks for your efforts on this. Hope the Raspbian and Adafruit guys get around to including all the fixes to less fluent users don't need to go through all this.
- Re4son
- Posts: 6
- Joined: Mon Sep 12, 2016 7:46 am
Re: Pi Zero W and 2.8" Display
Thanks for your feedback kck. I much appreciate it.
I'm gonna fix the blog entry, it was meant to read "Say no if you are running Raspbian - because you shouldn't need to install it".
Awesome find with the evdev update. I've included this fix in version >=4.4-1.12.1 of the “Re4son-Pi-TFT-Setup”
I ended up doing this to fix it:
apt install xserver-xorg-input-evdev
ln -s /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
Thanks again for your help, you’re a champ.
I'm gonna fix the blog entry, it was meant to read "Say no if you are running Raspbian - because you shouldn't need to install it".
Awesome find with the evdev update. I've included this fix in version >=4.4-1.12.1 of the “Re4son-Pi-TFT-Setup”
I ended up doing this to fix it:
apt install xserver-xorg-input-evdev
ln -s /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
Thanks again for your help, you’re a champ.
- ld26464
- Posts: 2
- Joined: Mon Mar 27, 2017 10:49 am
Re: Pi Zero W and 2.8" Display
Agreed re Adafruit support. Their current installer scripts don't work for pi-z and at the very least that should be noted.
- przemo
- Posts: 43
- Joined: Tue Jul 22, 2014 4:28 pm
Re: Pi Zero W and 2.8" Display
[SOLVED - see below] Any updates? I have the same problem: Pi Zero W + PiTFT. I can work around lack of wifi, but I'm building a device where bluetooth LE is essential.. Currently I can have PiTFT or bluetooth.
Edit: for reference viewtopic.php?f=50&t=113419&p=567127&hi ... ft#p567127
Edit: for reference viewtopic.php?f=50&t=113419&p=567127&hi ... ft#p567127
Last edited by przemo on Fri Mar 31, 2017 5:57 pm, edited 1 time in total.
- przemo
- Posts: 43
- Joined: Tue Jul 22, 2014 4:28 pm
Re: Pi Zero W and 2.8" Display
Looks like it's much easier than I expected. My setup:
1. Fresh raspbian jessie lite install from 2017-03-02
2. Pi Zero W
3. PiTFT 2.8" capacitive
Modifications required in /boot/config.txt
1. Uncomment:
2. Add
Modifications required in /boot/cmdline.txt
1. Add after rootwait (the end of line)
That's it! No other modifications are required.
Edit: The solution works for the display, but not for the touch device
Edit: Touchscreen enabled:
3. Add to /etc/udev/rules.d/95-ft6236.rules
1. Fresh raspbian jessie lite install from 2017-03-02
2. Pi Zero W
3. PiTFT 2.8" capacitive
Modifications required in /boot/config.txt
1. Uncomment:
Code: Select all
dtparam=spi=on
Code: Select all
dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,fps=20
1. Add after rootwait (the end of line)
Code: Select all
fbcon=map:10 fbcon=font:VGA8x8 logo.nologo
Edit: The solution works for the display, but not for the touch device
Edit: Touchscreen enabled:
3. Add to /etc/udev/rules.d/95-ft6236.rules
Code: Select all
SUBSYSTEM=="input", ATTRS{name}=="ft6236", ENV{DEVNAME}=="*event*", SYMLINK+="input/touchscreen"
Last edited by przemo on Fri Apr 07, 2017 4:40 pm, edited 1 time in total.
- przemo
- Posts: 43
- Joined: Tue Jul 22, 2014 4:28 pm
Re: Pi Zero W and 2.8" Display
Anyone knows why the kernel changes required to use the PiTFT touchscreen are not yet in the mainline kernel? It's a lack of interest, dirty code or some intellectual property problem?
- kck
- Posts: 29
- Joined: Fri Dec 25, 2015 1:40 pm
Re: Pi Zero W and 2.8" Display
Actually the support for PiTFT is in the standard distribution. It consists of the relevant overlays. The issue is that the Adafruit scripts seem to date from before that was the case and they screw things up for the Pi Zero W (although they are benign for the other models). As pointed out above, you just need to manually adjust the overlays that get loaded and the relevant parameters. Adafruit really ought to update their scripts and their instructions to get them in sync with reality.
- przemo
- Posts: 43
- Joined: Tue Jul 22, 2014 4:28 pm
Re: Pi Zero W and 2.8" Display
Sounds great - I didn't know that. If you have any info what needs to be set please share the links - I'll try to put together a tutorial.
- przemo
- Posts: 43
- Joined: Tue Jul 22, 2014 4:28 pm
Re: Pi Zero W and 2.8" Display
Looks like this sorts out the touchscreen, at least with my configuration:
3. Add to /etc/udev/rules.d/95-ft6236.rules
3. Add to /etc/udev/rules.d/95-ft6236.rules
Code: Select all
SUBSYSTEM=="input", ATTRS{name}=="ft6236", ENV{DEVNAME}=="*event*", SYMLINK+="input/touchscreen"
- przemo
- Posts: 43
- Joined: Tue Jul 22, 2014 4:28 pm
Re: Pi Zero W and 2.8" Display
The above fix will get the touchscreen to semi-working state. The indication that it's working but not exactly as it should is this error:
however evtest works:
The detailed explanation of the problem is here [1], but it suggests that raspbian kernel doesn't properly support PiTFT.
[1] https://blog.turboturbo.net/2016/07/09/ ... rn-kernel/
Code: Select all
pi@raspberrypi:~ $ sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_test
selected device is not a touchscreen I understand
Code: Select all
pi@raspberrypi:~ $ evtest /dev/input/touchscreen
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "ft6236"
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 105
Min 0
Max 240
Event code 1 (ABS_Y)
Value 143
Min 0
Max 320
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 1
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 240
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 320
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
[1] https://blog.turboturbo.net/2016/07/09/ ... rn-kernel/
-
- Posts: 1
- Joined: Sat Apr 08, 2017 4:00 pm
Re: Pi Zero W and 2.8" Display
@przemo Thanks for your research into this! Elegant solution and works like a charm.
Please be positive and constructive with your questions and comments.