Some Notes on Using the Official Raspberry Pi LCD Touchscreen with Xastir

This is the new Raspberry Pi 7" LCD Touchscreen Monitor. It is a 800 x 480 pixel display that is surprisingly crisp and bright (this image does not do it justice). It connects to the Pi's DSI port and draws power off the Pi's header, so no additional power supply is necessary. Best of all, the price is in the $60 range.

 

RPi Display

 

Xastir

 

Here's Xastir running on the 7" RPi LCD monitor. Again, the photo doesn't really do it justice. The texturing of the background is an artifact of the photo; it is not visible on the display. The monitor has a touchscreen and it works quite well. You can easily select menu items without using a keyboard. However, while 10 point touch is supported by the monitor, it is not supported by the Raspian version of X windows, So you can not zoom by pinching.

RPi Monitor Guts

Here's where the magic happens. The monitor is shipped with an adapter board that bolts onto the back of the monitor itself (hardware included). The Raspberry Pi then mounts on top of the adapter board and connects with a ribbon cable for the video and two jumpers for power (also included). Then the TNC-Pi mounts on top of the Raspberry Pi. The only external connections that are needed to run this are a micro-USB power cable (2 amps needed) and a radio cable. In this photo the entire assembly is being held by my Panavise.

When I originally wrote the paper that described using Xastir with the TNC-Pi, I suggested using downloadable maps from Cloudmade. Cloudmade no longer makes these available for free. However there are a couple of other sources where these maps can be found. If you want to download regionally (say, state by state) you can download the maps from:

http://download.geofabrik.de/

Perhaps an even better source is the bbbike website. It allows you to specify exactly the area you want to have on your map. So, for example, if you are doing radio support for a bike race or walk-a-thon type event you can download the relevant area and the files will be very, very small and load extremely quickly. Here's a link to the map download site:

http://download.bbbike.org/osm/

People have contacted me because with the Cloudmade maps street names appeared on the maps and with these maps from other sources they don't. However, those names are still in the map files and with a little bit of effort you can get them to appear on the displayed maps. The image above, for example, came from the geofabrik website.

The reason that the names don't appear is not that they aren't in the maps you download; it's because Xastir was set up to process these maps as if they came from Cloudmade. The way the maps are displayed is controlled by a feature called "DBFAWK". The files that do this have the extension .dbfawk. Fortunately, Kevin Ratcliff, KB9MQU, looked into this and found a way to alter the dbfawk file that controls how roads (called highways in Cloudmade) are displayed. The following link contains a file that will place the road names back on the maps:

dbfawk.zip

All you have to do is unzip the file (roads.dbfawk) and place it in the same directory that the roads files (eg., roads.shp) are in on your Pi. You may need to reindex your files in Xastir (on the maps menu) and the road names will appear on your maps. I have tested this with both the maps from Geofabrik and bbbike and it works with both.

Here are some other tips that may help you improve the display of these maps:

1. The default background color for the map is pretty ugly. However, from the Map menu, you can select Configure and then pick Background Color to pick a new background color. The one displayed on the map above is Pale Green.

2. The default font for roads is not very readable. You can change this by selecting Configure from the File menu and the picking Fonts. The font you will need to change is the one marked Station Font. I thought the Lucida font worked pretty well. To use this fill in the following in the Station Font box:

-*-lucida-*-*-*-*-14-*-*-*-*-*-*-*

To change the size of the font, just increase or decrease the value that is currently 14 in the above line. However, the only valid settings are: 11, 14, 17, 20, 25, 26, and 34. I found either 11 or 14 to be about right.

3. You'll notice in the screen above the Xastir program takes up the entire screen. If you come from the Windows world, you might have thought that this was accomplished by maximizing the window. In fact, that won't do it. You can do this by picking the button in between minimize and maximize and then dragging the edges to fill the screen (you'll need a mouse for this, the touchscreen won't do it). If you want to see the desktop menu bar again, push the maximize button on the Xastir window.

4. The map wil look better if you turn off the grid. This can be done by unselection Enable Map Grid on the maps menu.