Sorry, this is long. More of a tome than a posting. Originally I hadn't posted this to Planet, but on re-reading it for the thirtieth time I realized it is as much about Fedora as it is about radio.
I thought it worthwhile to document some of my recent trials and tribulations around JNOS.
But for background, it is becoming more and more obvious that digital comms is a key, if not THE key, component of emergency communications. What is perhaps a bit less obvious is that, while NBEMS modes offer simplicity and much wider acceptance than packet, they are often not up to the task. Even less obvious is that we need a broader based connection to WinLink.
Many of you may be aware that my personal JNOS is running on a BeagleBoard xM, a small, ARM-based PC, somewhat more powerful than a Raspberry Pi, but available for much longer. My JNOS is running on Fedora 17. It works quite well, although is is something of a kludge.
You see, my Beagle's Ethernet port is broken, so it is connected to my LAN via a wireless dongle. I never got the headless JNOS working on F17, but it didn't matter all that much anyway - WiFi takes a relatively long time to make a connection, so automatically starting JNOS on boot is pretty darned messy. As a result, I start JNOS manually on the serial port through gtkterm. The nice part about this is that JNOS doesn't know whether there is actually anything connected to the serial port, so unlike a virtual terminal, it doesn't need to stay connected.
Power to the Beagle is supplied through a little board containing a 7805 and a couple of caps, and a cobbled together coaxial jack connected to the station supply. The TNC-X is connected via USB.
It took me a while to get the TNC connected over USB; I had long since lost the documentation and there are a number of jumpers to switch. I was able to write off and get a schematic and eventually get it to work.
OK, that much is ancient history. The Beagle has worked quite well. The only real maintenance is restarting JNOS whenever I loose power, and dusting the thing off every few months (I really should get some sort of case).
I do use the mail server on the Beagle/JNOS, and I do all my packet traffic with Evolution (ugly I know, but it is the default). If you send packet traffic to firstname.lastname@example.org it appears in my email inbox, just like it should.
Somewhat out of sequence here, for a long time I have been wanting to get soundmodem working. I recently found the trick (it turns out to be pretty simple), and soundmodem is WAY COOL. On Linux, soundmodem automatically grabs the AX.25 stack, so all the normal Internet stuff works over packet whenever an ampr.org address is presented.
My first reaction was soundmodem/Raspberry Pi would make an amazingly cheap JNOS, and since the Pi image is on an SD card, it would be easy to make a JNOS image cheap and easy to configure. Hmmmm....
But then I said, HEY, what about soundmodem on Windows. It is available for that platform, and might have an even greater impact than a cheap JNOS. Unfortunately, while soundmodem is available for Windows, Windows doesn't have a AX.25 stack, so it is no more than a cheap TNC. It really doesn't address the complexity, which, IMO, is the major problem.
So, on to JNOS/Raspberry Pi.
An off-topic word about the Raspberry Pi. This thing truly is a game changer. You see, when you have a very capable PC that is SO
cheap, it becomes realistic to dedicate it to pretty simple applications. And dedicating a computer to a single application greatly simplifies everything.
I am on my third Pi, and I can see a need for at least two more:
- Pi #1 is in the Salvation Army vehicle for use in logging during Search and Rescue operations. (MySQL/PHP)
- Pi #2 is destined to be installed in a local contractor's shop as an electronic sign-out board. (MySQL/PHP)
- Pi #3 will probably become my JNOS
- Pi #4 wants to become a media center (MythTV)
- Pi #5 needed for experimentation on the next new thing
I was able to build JNOS on the Pi, and better yet, I was able to build the headless version and run it as a service. Very nice. OK, there were some flaky things around running JNOS as a service that I'm not so sure I completely understand, but I can say
systemctl start jnos.service
systemctl status jnos.service
systemctl stop jnos.service
and it all seems to work. I haven't always been successful with
systemctl enable jnos.service
but I think that will succumb with a little more beating my head against the wall. (Fedora is just about complete with the systemd conversion, so although the service jnos start stuff still works, it is the old thing, and probably will disappear at some point.)
One hiccup I observed. In making it headless, I wanted to deconfigure as many options as possible. I had trouble on F17 making the headless version work, but I had configured in everything I thought I might some day like to play with. On the Pi I took the alternate approach of configuring out everything I didn't absolutely need.
The problem here is Maiko has a bit of a bug. At the end of config.h he makes sure that if, for example, you select NETROM off, anything that depends on NETROM is also off. But he missed something (and of course now I forget what it was!) Fortunately, this caused JNOS not to build instead of occasionally hanging later, so finding what I missed wasn't too much of an issue.
So, on to running JNOS on the Pi. Well, first thing I ran into an uh-oh. The minute I started JNOS the OS hung. Eventually, I concluded that the system hung as soon as I tried to attach the TNC-X. I got the same result with the normal Fedora 18 as well as with the new Pidora.
Wondering whether the problem was in JNOS or lower in the stack, I connected the TNC and tried to poke it with gtkterm. As soon as I selected ttyUSB0 the Pi hung!
The USB chip in the TNC-X is basically a USB to Serial converter, so I tried a couple of others, and no problem with them. Unfortunately, all the USB to Serial converters I had, all two of them, used the same chip, so I can't be sure, but it looks as if the issue is related to the chip in the TNC-X.
Since this worked on Fedora 17, perhaps I could make it work on some other Rasperry Pi operating system. I had both Wheezy and Arch Linux for the Pi, so I decided to try them.
Unfortunately, I am sufficiently immersed in Fedora that these other distros are just weird, particularly their package managers. Wheezy's apt-get wasn't too strange, but I couldn't figure out how to search the repos, and it is clear that the packages have different names than I'm used to, so I couldn't install a package that messes with the serial port, nor could I install enough stuff to build JNOS. Arch Linux was even worse. While I could browse their repos on the web and see what was there, Pacman didn't seem to do anything useful.
So, I posted a bug around the USB to serial converter and on to the next idea.
Actually, there are two potential courses here. JNOS won't use the native AX.25 stack since it has its own, but soundmodem could be a nice, cheap approach. Unfortunately, the Raspberry Pi only has sound out, so it would require a soundcard dongle and some sort of transmit/receive circuitry, so not as simple as I would like. Still, a transistor and a sound or modem chip might be put on a daughter card pretty cheaply, so that idea isn't totally scratched off the list.
The other approach, somewhat simpler but more expensive, is to use a normal USB to serial converter with a TNC-X. Along the same lines, the newer TNC-X's use a different USB chip, so they might well work.
I tried converting my TNC-X back to serial, but the result was weird. When JNOS said to transmit, the transmit light came on but no audio came out. Evidently, there is some jumper or another that I missed, so the next thing is probably to track that down.
But it looks like I need to order another TNC-X and maybe another Raspberry Pi or two while I'm at it, perhaps even a sound chip. An even more interesting possibility is to convert the TNC-X code to the dsPIC, which has enough gas to generate and detect the tones itself, making for a single-chip daughter card. The newer TNC-X code, as far as I know, hasn't been published, but the original has, and I suspect a lot of the stuff in the newer code has to do with his GPS and APRS addons so probably not interesting anyway.
And going back to the top, I really need to find someone to take point on a project to construct a few gateways between our packet network and the NTSD/WinLink network. Supposedly doable, but not yet demonstrated, and then of course there is the issue of supporting something permanent.
Ahh, so much fun to be had, so little time.
73 de WB8RCR