After quick visual inspection everything looked OK so I inserted the SD card into socket, connected HDMI cable to my display, keyboard cable to USB socket and plugged a Nokia USB cellphone charger to power up this latest toy. A familiar Linux bootup screen appeared and after entering the default username "pi" and password "raspberry" I was logged in.
CONFIGURING RASPBERRY PI IN HEADLESS MODE
One of the first objectives was to configure RPI in headless mode. I wanted to have access to this tiny computer via SSH and VNC remotely over the network. Enabling SSH is as simple as renaming the "boot_enable_ssh.rc" to "boot.rc" in the /boot directory. You can do this even before powering up with SD card mounted on another computer and just renaming the file.
I connected LAN cable from my router and checked that I had proper IP address via /sbin/ifconfig command. I used the following steps to get VNC working:
sudo apt-get install tightvncserver - to install VNC server
tightvncserver - to set a password
sudo vi /etc/init.d/vnc - to create a startup script
sudo chmod +x /etc/init.d/vnc - to make the script runnable
sudo /usr/sbin/update-rc.d vnc defaults - to install the script for boot
The vnc script itself is below:
#! /bin/sh
# /etc/init.d/vnc
USER=pi
HOME=/home/pi
export USER HOME
case "$1" in
start)
echo "Starting VNC Server"
#Insert your favoured settings for a VNC session
su - $USER -c "/usr/bin/vncserver :1 -geometry 1024x768 -depth 16 > /tmp/vncserver.log 2>&1 &" &
;;
stop)
echo "Stopping VNC Server"
/usr/bin/vncserver -kill :1
;;
*)
echo "Usage: /etc/init.d/vnc {start|stop}"
exit 1
;;
esac
exit 0
VNC server can now be started with
/etc/init.d/vnc start
On my Mac I used Chicken of the VNC to connect to RPI. In my particular network the configuration is the following (RPI is on 192.168.1.2 port 5901) :
After these steps I am able to connect both via SSH command line and VNC to this Rasperry Pi box. See screenshot below.
The screenshot also shows some additional ham radio software that I have already installed such as FLDIGI and Xastir.
With wireless USB Wifi card installed (I used D-Link DWA-140 that I had available from other projets) RPI becomes quite portable within the range of Wifi access point. I used as wicd network manager to configure wireless USB Wifi card.
PROJECT IDEAS HOW TO USE RASPBERRY PI
RPI does have built-in audio output but no microphone or line input. Therefore you need to get a USB audio device to connect it to a radio. I did not have one available right now but wanted to test how FLDIGI would work. I installed FLDIGI using this command
sudo apt-get install fldigi
and followed these steps to configure ALSA audio. After starting FLDIGI and going through configuration screens I got it running and tested sending some Morse code. Clear audio came out from the headset plugged in. Some other hams have also tested FLDIGI with USB audio devices with positive results. FLDIGI does consume some 80% of CPU when sending - but I have not done any optimizations, just downloaded normal FLDIGI distribution from Debian repositories.
I also installed Xastir to test how APRS tracking would work on Raspberry PI. Installation is as simple as:
sudo apt-get install xastir
I did play some time with Xastir and downloaded some maps but the SD memory card was getting quite full so I decided to postpone these tests until I had a larger SD card available. Anyways, Xastir started without hickups and I was able to see Massachusetts maps and lookup stations. I ended up removing Xastir to make some space.
I also tested the built-in Midori web browser - it is not the fastest browser on the planet but did a pretty good job bringing up http://aprs.fi created by Hessu OH7LZB. See screenshot example below
I also installed nginx webserver using the instruction over here.
Based on this very cursory testing Raspberry Pi seems to run existing ham radio software quite well (given CPU capacity restrictions). I am envisioning that Raspberry Pi could be used for many different kind of Ham Radio projects, such as
- Use Xastir and connect RPI to 2m/70cm hand held radio to provide a simple APRS tactical display for event organizers, like Boston Marathon
- Portable beacon station that can also send telemetry information such as weather, location, even pictures from USB webcams, etc.
- Use a simple Softrock type USB card and SDR software to create ultraportable Software Defined Radio
- Remote control system of ham radio station over the Internet
- Portable APRS digipeater
I am positively surprised how capable this tiny $35 Linux computer actually is. It certainly exceeded my expectations.
73
Mauri AG1LE
I just got a Raspberry and am waiting to hook it up! W3TTT
ReplyDeleteThat's great that you got xastir on the pi!
ReplyDeleteUnfortunately when I run apt-get I get "Package xastir is not available...Package xastir has no installation candidate" I'm using the latest Raspbian. Any ideas?
Which distro? Raspbian, Arch? I'm hoping to get xastir running on my pi soon!
ReplyDeleteHi Doug
ReplyDeleteI used April 19th version of Debian "Squeeze" see http://elinux.org/RPi_Distributions
Doug
ReplyDeleteDid you do 'sudo apt-get update' before trying to install xastir?
Check also your /etc/apt/sources.list file contents, this is what I have there:
deb http://ftp.uk.debian.org/debian/ squeeze main
deb http://ftp.uk.debian.org/debian/ squeeze main non-free
# Nokia Qt5 development
deb http://archive.qmh-project.org/rpi/debian/ unstable main
deb http://www.pvv.ntnu.no/~knuta/xmms/squeeze ./
deb-src http://www.pvv.ntnu.no/~knuta/xmms/squeeze ./
Hi Mauri,
ReplyDeleteMy RPi has been successfully set up for remote access in X from within my home local network. The next task is to dig out the interface I built for my FT-817 and test the setup out on PSK. Just received a USB audio adapter today, to be used for audio input. A recent article in QST addressed a method of using a tone for PTT rather than requiring a serial port. That circuit is in the 'gathering-parts' mode. With any luck, I'll have the ability to work PSK anywhere on my network, within a month.
You've made some great progress! My 2nd RPi should arrive in another 60 days, or so. Not certain what its application will be.
Regards,
Michael
K6MLE
hi Michael
ReplyDeleteIt would be great to see a little write-up on your interface for FT-817....I have a SignaLink USB box but have not tried to integrate that with Raspberry Pi yet.
73
Mauri AG1LE
Got it running now. Hope to hook it up to rf this weekend.
ReplyDeleteAdafruit.com has a free tweaked Pi distro that enables sshd right out of the box, plus built-in support for SPI, IC2, one-wire, etc. The website for this is:
ReplyDeletehttp://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro
-Rich de KY6O
Did anyone get Xastir working with the SignaLink USB box?
ReplyDeleteI plugged my Signalink USB into the Pi and fldigi had no trouble using it without running into any driver/module issues. Total PNP under Wheezy.
ReplyDeleteI was not able to get it to decode any PSK31 though. CPU did not seem fast enough and it just picked up a character here and there. I did not try any optimization, just ran the fldigi from the repository with slow CPU checked. Also did not try overclocking at all; maybe that would help.
73 de Mike KB1DBL
Nice article Mauri.
ReplyDeleteI came across one more use for Raspberry Pi - cheap remote SDR receiver using RTL-SDR dongle: http://m3php.com/2012/10/10/remote-sdr-using-raspberry-pi-rtl_tcp/
Paul VA3PAW
Just so you know. Gentoo Linux repositories for their desktop has a lot of stuff for software defined radio. I cant imagine their Pi distro is any different. Though you will want to utilize their cross compiler method of compiling for their source code only software. Otherwise it will take forever to compile a program on your Pi. Over-clocking is rather easy to do with the Gentoo Pi distro from what I have seen in their quick start guide. I am patiently waiting for my Pi to come. I cant wait. I plan on using a very lightweight window manager (i3 WM). This way I will have much more ram available for the system. I plan on over-clocking my Pi to 1ghz. There is so much I want to do with this little Pi. I haven't been geeked out on something like this in a very long time.
ReplyDeleteI've had my Pi for sometime from Adafruit. I tried running fldigi to decode PSK31 and it was unable to cope with processing demand. I even upped the clock one step and it was still unable to decode. So, the Pi has limitations and I am still looking for good ham radio applications for it. Other than just, it is just a fun platform to fool around with and try out Python. Adafruit has some nice projects to test and has terrific support pages.
ReplyDeleteHaving a problem. I don't know if "sudo vi /etc/init.d/vnc" is working on my Pi. I get this:
ReplyDeletepi@RaspberryPi ~ $ sudo vi /etc/init.d/vnc
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
/etc/init.d/vnc
....after that, I cannot do anything (well except open a new terminal window). I'm clearly missing something
vi is an editor. You can use "i" command to go to insert mode and the copy / paste the vnc script above (starts with line #! /bin/sh) on the window. Then you press ESC key to exit "insert" mode, and type ":wq" command to write the file and quit vi editor.
DeleteSee this http://ss64.com/vi.html to learn more about vi editor.
I have Xastir running on my Pi using the default igate as input, what are others using for the igate as I get zip incoming posits. Thanks..ACJ
ReplyDeleteI just found out about RasberryPi. Can't wait to get one, this stuff looks so cool ! :)
ReplyDeleteThanks Mauri, I put a link of this blog entry on our club's face book page. I have been reading about the RP for some time and think it's got great potential for amateur radio community. The RP is not a power house but it can serve a useful purpose.
ReplyDelete73
John KB3SVJ
Mauri,
ReplyDeletehere is an example of using it for SSTV without external transmitter.
http://www.instructables.com/id/Raspberry-Pi-security-Slow-Scan-Television-Camera/
I just started this very same project a few days ago. I found that I could use a $5 USB sound card from Amazon for mic-in to use for digi.
ReplyDelete