Redirecting console output to a PiTFT screen

I just got a neat 3.8″ PiTFT from Adafruit. Followed the easy setup instructions in the tutorial and it seems I can either startx and get an X Windows desktop on the device, or display the tty1 console to the device on boot.

The trouble with the easy setup is it’s not clear what the scripts actually configured to get it working.

For X Windows, it seems this is the relevant part:

export FRAMEBUFFER=/dev/fb1

startx

 

For the console on boot, adding this section to the line in /boot/cmdline.txt following rootwait:

fbcon=map:10 fbcon=font:VGA8x8

The docs for fbcon here suggest that map:10 will map /dev/fb1 then /dev/fb0 in a repeating pattern across each tty, eg fb1 -> tty1, fb0 – > tty2, fb1 -> tty3 etc

The part I’m missing right now is how to switch the tty mappings on the fly, or how to map a specific  console the to the buffer. This post I think is asking similar questions to what I’m trying to do.

If I want to map output on tty2 to the fb for the PiTFT, I wonder if it would be like this:

fbcon=map:01

I’ll try it and see…

Raspberry Pi with Adafruit PiTFT screen

Just followed the steps in the tutorial to get the modified kernel installed with support for Adafruit’s PiTFT and it all worked great.

What I’m going to be using it for is to monitor status output from Direwolf as it receives/sends packets, so will be running it in text mode, and ideally I want to get Direwolf and LinBPQ starting together at boot, and outputing to the console.

I’ve almost got the startup script working (following suggestions here), but I might take a look to see if I can redirect output to one of the virtual terminals and have that output to the screen (like discussed here). Some more things to take a look at 🙂

fbtext – this might be useful too.

Configuring a static IP for Raspbian/Debian Jessie

Looks like on Raspbian Jessie the way you configure a static IP has changed. You used to configure static IPs in /etc/network/interfaces, but on Jessie it looks like the file to edit is now /etc/dhcpcd.conf (per the comment at the top of the prior file).

Scroll to the end of the file and paste something like this, editing IPs to match your network:

interface eth0
static ip_address=192.168.1.xxx/24
static routers=192.168.1.xxx
static domain_name_servers=8.8.8.8, 8.8.4.4

Reboot, done.