Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Guide]Use a Wavehare 3.5In SPI TFT Screen #124

Closed
JRWR opened this issue Oct 3, 2019 · 10 comments
Assignees
Labels
Milestone

Comments

@JRWR
Copy link
Contributor

@JRWR JRWR commented Oct 3, 2019

  • First, SSH into your pwnagotchi, and give it some internet! Don't forget to check your default gateway and apt-get update
  • Follow Guide here: https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)#Method_1._Driver_installation
  • At the step with ./LCD35-show add lite to the command prompt (./LCD35-show lite)
  • Reboot
  • as root, make three symlinks, cd ~; ln -s pwnagotchi.png pwnagotchi_1.png; ln -s pwnagotchi.png pwnagotchi_2.png; ln -s pwnagotchi.png pwnagotchi_3.png;
  • apt install fbi
  • change display type to "inky" in config.yml
  • add "modules-load=dwc2,g_ether" to your kernel command line ( /boot/cmdline.txt ) or it will break!
  • Also must add "dtoverlay=dwc2" to the bottom of ( /boot/config.txt )
  • edit /etc/rc.local and add
    fbi -T 1 -a -noverbose -t 15 -cachemem 0 /root/pwnagotchi_1.png /root/pwnagotchi_2.png /root/pwnagotchi_3.png &

reboot and you should be good, some of this guide will work with other framebuffer based displays!

@evilsocket

This comment has been minimized.

Copy link
Owner

@evilsocket evilsocket commented Oct 5, 2019

@hexwaxwing mind adding this to the docs?

@evilsocket evilsocket added this to the 1.0.0 milestone Oct 5, 2019
@hexwaxwing

This comment has been minimized.

Copy link
Contributor

@hexwaxwing hexwaxwing commented Oct 5, 2019

Derek assign: hexwaxwing

hexwaxwing added a commit to hexwaxwing/pwnagotchi that referenced this issue Oct 5, 2019
evilsocket added a commit that referenced this issue Oct 5, 2019
added Hacks.md; fixed typo; put official links into a table #124
@evilsocket

This comment has been minimized.

Copy link
Owner

@evilsocket evilsocket commented Oct 5, 2019

closed by @hexwaxwing

@evilsocket evilsocket closed this Oct 5, 2019
@michelep

This comment has been minimized.

Copy link
Contributor

@michelep michelep commented Oct 18, 2019

Following this guide LCD displays phwagotchi just for few seconds before login prompt: i've solved using the autologin features (use raspi-config) and changing the line to add to /etc/rc.local as follow:

ln -s /root/pwnagotchi.png /tmp/pwnagotchi_1.png; ln -s /root/pwnagotchi.png /tmp/pwnagotchi_2.png; ln -s /root/pwnagotchi.png /tmp/pwnagotchi_3.png;

on /etc/profile i've added, at the end:

. /home/pi/pwnagotchi.sh

and /home/pi/pwnagotchi.sh contains:

#!/bin/bash
sudo fbi -T 1 -a -noverbose -t 15 -cachemem 0 /tmp/pwnagotchi_1.png /tmp/pwnagotchi_2.png /tmp/pwnagotchi_3.png &

Just remember to chmod +x pwnagotchi.sh !

dadav pushed a commit to dadav/pwnagotchi that referenced this issue Oct 20, 2019
dadav pushed a commit to dadav/pwnagotchi that referenced this issue Oct 20, 2019
added Hacks.md; fixed typo; put official links into a table evilsocket#124
@moty66

This comment has been minimized.

Copy link

@moty66 moty66 commented Oct 28, 2019

This hack is really working bad and not clear at all

I suggest to execute this code from in rc.local or from /etc/profile or where ever you want:

PID=0
while true; do
        fbi -d /dev/fb1 -T 1 -noverbose -a /root/pwnagotchi.png  > /dev/null
        sleep 1
        PID=$(pidof fbi)
        if ps -p $PID > /dev/null
        then 
                kill $PID
        fi
done

I didn't load any kernel modules, I didn't edit the /boot/config.txt file, I only installed the driver as described in https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)#Method_1._Driver_installation!

@michelep

This comment has been minimized.

Copy link
Contributor

@michelep michelep commented Oct 31, 2019

I've worked to a more stable solution, adding support for Waveshare 2,4" LCD display (could be adapted to 3,5") directly in pwnagotchi code. Take a look here: https://www.zerozone.it/tecnologia-e-sicurezza/fatgotchi-pwnagotchi-on-a-24inch-spotpear-display/16589

@evilsocket

This comment has been minimized.

Copy link
Owner

@evilsocket evilsocket commented Oct 31, 2019

the "more stable solution" does exactly what the on_frame configuration already does @michelep ... you literally call the fbi binary exactly as the on_frame does

@b0n3zx

This comment has been minimized.

Copy link

@b0n3zx b0n3zx commented Nov 4, 2019

have any of you got a better refresh rate working on the TFT 3.5 screens yet?

@MoJo2600

This comment has been minimized.

Copy link

@MoJo2600 MoJo2600 commented Nov 4, 2019

@b0n3zx you can change the -t 15 parameter. Currently it is refreshing every 15 seconds. Mine is set to -t 1 an thus refreshing every second.

@michelep

This comment has been minimized.

Copy link
Contributor

@michelep michelep commented Nov 12, 2019

I have definitively solved any refresh issue with a pure python framebuffer memory mapping implementation, that draw directly to fb device without needs of fbi: i got a fps up to 15 without any problem! (it's currently on a pull request)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.