Taking the Plunge

I’ve been considering getting a Raspberry Pi for awhile.  Several folks have asked me if I would port my Arduino Keyer code to it.  So I decided to take the plunge and acquire a Pi from Newark / Element 14, along with some “fixins”.  I got the Model A Pi, along with a WiFi dongle, and a cute little enclosure. IMG_4055

Big Things Come in Small Packages

I didn’t realize just how small the Pi was until I held one in my hand.  It’s just amazing this is a full blown computer.  It’s quite a leap from the VIC 20, the first computer I used 30 years ago as a teenager. IMG_4058

Raspbian Installation

The Raspberry Pi was surprisingly easy to fire up.  I bought a 16 GB SD card locally and burned a copy or Raspian on it.  After plumbing up a monitor to the HDMI port and connecting a USB keyboard and mouse, the unit booted right up, displaying messages familiar to anyone who runs Linux.  A few minutes later I entered startx and I was in XWindows.  Of course I just had to bring up a terminal window and verify this was really a ‘nix box and run top. IMG_4061

Nifty Little Pi Enclosure

Now that I have my Pi humming away, what projects should I do?  As I’ve mentioned a few folks have inquired about porting my keyer code to the Pi.  Googling around I found someone has ported the Wiring development platform , which is the basis for the Arduino environment, to the Raspberry Pi and aptly called it Wiring Pi.  Naturally it’s not 100% compatible and it’s not as easy as just plugging in the Arduino IDE and uploading compiled code.  I’m debating whether to take this approach of getting the keyer code to run under Wiring Pi, or just start from scratch with good old C and gcc for the compiler. I could get the core functionality going and then port over parts of the code from the Arduino for ancillary functions, if it makes sense.  Certain things don’t make sense to port, like the CW memories code.  On the Pi you don’t have to deal with EEPROM like you do on the Arduino.  Anything that needs to be persistent across reboots can just be written to a good old file on the file system.  While certain things like persistent memory and sound support are easier on a Pi, deterministic and precise timing, which is needed for CW timing, is challenging on a multi-tasking environment like Linux.  This realtime kernel may be just the ticket.

Compared to the Arduino, there aren’t a whole lot of interfacing pins on the Pi.  To really get the power of this board you need to do I2C.  I’m thinking about what it would take to port my antenna tuner to the Pi.  That project uses I2C for controlling many relays, but there is also a need to monitor the voltages of the SWR bridge.  The Pi doesn’t have this capability natively, so an I2C device would be needed to supply this functionality.

All in all the Raspberry Pi is a versatile and powerful little board.  To get my feet wet I think I’m going to write a little bare bones C and see if I can get a basic keyer working and see where this takes me.  This is going to be fun.


Don’t Fear the Penguin

penguinIt’s day four of my hopefully last Windows-to-Linux migration, and so far so good.  I have my HRD log imported into CQRLog and it’s talking to both my Arduino Keyer and Yaesu FT-897.  The Keyer is happily sending CW and CQLog is reading the rig frequency.  The rig control function is very simple and utilitarian compared to HRD’s, but it works.  What I cannot get working is controlling the Kenwood TS-850.  This appears to be a problem with Hamlib, which CQRLog uses via rigctld.

I found that Linux re-enumerates USB /dev/ devices if you unplug one.  For example, I had my Arduino Keyer at /dev/ttyUSB0, my TS-850 interface at /dev/ttyUSB1, and my FT-897 interface at /dev/ttyUSB2.  Upon unplugging the Arduino Keyer and TS-850 interface, the FT-897 became /dev/ttyUSB0, and with nary a mention in syslog.  I find this behavior strange.  But I’m really pleased Linux handles USB device insertions and ejections so well.  Back in the day to do stuff like this you’d have to edit some text file, recompile your kernel, and walk uphill in snow both ways.

To run N1MM I installed Virtualbox and within that installed a very bare bones Windows XP installation.  This enables me to run Windows XP as a virtual machine within Linux, without rebooting.  N1MM installed and ran without a hitch in the virtual machine. I was reminded N1MM likes to install in C: root, like it’s 1994 on Windows 3.1.  But I digress.  Attaching host USB devices to virtual machines in Virtualbox is a piece of cake and I had N1MM talking with the 850.  So I’ve got my contesting needs covered.

It occurred to me that it wouldn’t take much to get CQRlog to do basic contest logging.  It already has cw interface keying and function key definitions and macros.  All it really needs is serial number generation with corresponding function key macros, previous QSO report lookup, and perhaps a little more field customization.  This would cover the basics.  One can handle scoring outside the program, but a band map with the DX cluster integrated would be the next feature on the list.  I may just look at the source code and see if I can make sense of it and maybe play around with some customizations.  I sense another project I’m going to get sucked into.

So far I haven’t had to go back to my native Windows installation for anything, other than to steal more disk partition space.  Maybe I cheated a little by installing an instance of Windows XP on Virtualbox, but hey, whatever gets the job done!

(Update: I just found the CQRLog band map window and it is integrated with the DX cluster!)

Migrating to Linux (Again)

I’m no stranger to Linux. I’ve run numerous distributions since about 1995, even venturing into BSD territory, running FreeBSD and some other Berkeley variants. I’ve also used Linux quite a bit in my professional life for servers. However, I’ve never made the jump to using it as my primary desktop operating system at home; it’s always been a novelty to play with and never a desktop workhorse that I would use to actually get things done.

Linux Mint is a Linux distribution that has become more popular recently. It’s based on the venerable Ubuntu distribution and appears to be taking some market share from Ubuntu. Ubuntu in my opinion went off the tracks with its migration to the Unity desktop.  For the first time recently I hit a brick wall trying to install the latest Ubuntu within a virtual machine.  While Ubuntu was quite polished and arguably had the best usability in the Linux world, I still felt that I was often fighting the operating system to make it work.

ScreenshotLinux Mint seems to have taken care of those issues. Last night I made the plunge and partitioned off some space on my hard disk and installed it so I could dual boot between Windows and Linux. The installation went extremely well and within two hours I was able to browse the web, play videos and hear sound, send email, work on Kicad schematics, compile Arduino code, open Excel and Word docs, do my banking with the same program I used on Windows, and I had amateur radio logging and digital programs installed. The only speed bump was getting my wireless working. I was able to fix that in five minutes after Googling and finding one command line to run. On previous distributions, items like this would take hours to resolve and there would be several of them to deal with. For the first time I feel I have something equivalent to what I had on Windows, and it doesn’t look goofy and didn’t require days of tweaking with arcane command line syntax to make it acceptable. The browser actually renders things like they look on Windows. You install a program and it actually appears in the menu. Quite simply, Linux Mint isn’t a compromise like previous desktop installations.

I’ve often complained about the state of amateur radio open source software. I stand by my previous statements as I think we still don’t have a suite of amateur radio open source software that compares with offerings in Windows, mainly in the areas of logging and contest programs. However, CQRLog has evolved quite a bit and I’ve decided to take a more minimalist approach and see if I can make it work. I still think Ham Radio Deluxe is the gold standard, but lately I’ve become annoyed with its bloat and the commercialization and marketing of it.

I’m still keeping my Windows partition, mainly to run one particular contest program and store my documents (which I access from Linux), but I may eventually run Virtual Box on Linux and have a small Windows installation virtualized to run the contest program rather than booting back into Linux.

Will this be the time I finally run my shack on Linux?  I hope.