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…

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.

Packet Radio: AX25, Direwolf and Linpac on a Raspberry Pi

I’ve been playing around trying to get a working config for using Direwolf as a soundcard modem for packet radio on the Raspberry Pi. I’ve played with getting ax25 and Direwolf running on Ubuntu (see here), and then I tried to copy across what I’d learnt to the Pi (running Raspbian).

The trouble with a lot of this stuff is there’s not much in the way of docs (although the Direwolf docs are really good), so when things don’t work you either start trying stuff randomly or just get stuck. Anyway, here’s the combination I have working:

  • Raspberry Pi (v1 model B) running Raspbian
  • RigBlaster connected via USB, connected to an Icom 880h
  • soundlevels at around 3/4 via alsamixer
  • Per ax25 on CentOS here, I used the ax25 sources from VE7FET’s github repo, compiled and installed

Most of my steps are the same as from my prior experience getting Direwolf and Linpac working on Ubuntu, so follow those steps if you’re looking to get setup, and then I’ve summarized the differences here.

The VE7FET source when you ‘sudo make install’ creates config files to /usr/local/etc/ax25 and not the default location of /etc/ax25. I’m not sure if Linpac likes this, so per a posting I found somewhere, the quick way to keep everyone happy is just create a symlink:

cd /etc/
sudo ln -s /usr/local/etc/ax25 .

Edit the axports file, add a line like:

1 KK6DCT-2 38400 253 2 2m packet

‘1’ is the portname

On the Pi I did run into the kissattach issue getting the ‘error setting line discipline’ error as described in the direwolf docs. Per the docs, I used the second of the workarounds:

sudo /usr/sbin/kissattach /dev/ptmx radio 44.56.4.118

then:

sudo mkiss /tmp/kisstnc /dev/pts/5

where the /dev/pts/5 value is returned from the kissattach step.

At this point I’m ready to go:

‘call 1 kberr’ opens a connection to my nearest node (using port 1)

And also Linpac starts up (with linpac -m), can can connect the same there with ‘:c kberr’

At some point I should probably walk through these steps with a fresh Raspbian install to confirm I didn’t change anything else along the way that was key to getting this to work, but I think this summarizes the key points.

A few other helpful points:

  • in the Mac Terminal app by default, the Alt key doesn’t work so can’t do a Alt-X to exit Linpac. There’s a tip here to enable the Option key as Alt so you can use this to cleanly exit Linpac.