Raspberry Pi & Soundmodem for APRS

So I’ve been tinkering with my Raspberry Pi board, and one of the most recent additions is a pair of heat-sinks to offset the addition of additional thermal loading due to over-clocking. In an effort to get soundmodem working on the pi, I’ve increased the clock frequency by a moderate margin to see if I can alleviate some bottle-necking in the decoding of AX.25 packets.

Raspberry Pi with heatsinks & USB sound card

I am using two different USB soundcards in an attempt to see if the sound devices themselves are part of the resource management issues the Pi seems to be having. In addition, I’ve added a powered USB hub to rule-out power issues for the USB back-plane on the Pi.

Despite my best efforts, the CPU load still seems to be pegged out while running soundmodem, which means that the packet capture rate will be extremely poor at best. This is very frustrating considering that the CPU on the Raspberry Pi should (on paper) be able to handle the task fairly easily.

Now I could take the easy road like many others and use a dedicated hardware TNC but that completely misses the point of this exercise. My objective is to create a $35 TNC/digipeater/igate/tracker module – all exploiting the Raspberry Pi’s hardware. In theory, this task should be relatively straightforward, I mean heck, a fricken’ Arduino is capable of encoding AX.25 packets! (I’ve made a transmit-only position reporter using an ATMega 328)

I haven’t given up on this project, but I am a little dismayed. I’m by no means a software expert and so my attempts at trimming the fat on the Pi have been fairly fruitless. I am hoping that someone a bit more talented has a look at the resource issues and make some headway on the soundmodem implementation on the Pi.

I’ll keep poking and prodding, perhaps I’ll uncover one of the root problems. I’m wondering how better to utilize the Pi in the meantime.

This entry was posted in General, Project and tagged , , , , , , , , , , . Bookmark the permalink.

10 Responses to Raspberry Pi & Soundmodem for APRS

  1. DL7ORE Dali says:

    Hello to everyone.Following this project with interest.A minimalistic embedded Linux system for setting up APRS digipeaters and/or internet gateways, based on Buildroot. 73 de DL7ORE Dali.

    https://github.com/integricho/digipeatux

    https://github.com/integricho/digipeatux-setup-guide/blob/master/English.md#usage

  2. John Langner says:

    Here is an implementation of a “soundcard” TNC, digipeater, APRStt gateway, and IGate, all running on a Raspberry Pi.

    http://home.comcast.net/~wb2osz/Version%200.8/Raspberry-Pi-APRS.pdf

    • Wade says:

      Hi John, Sorry for the Zombie post – do you have that PDF – the link is now dead.

      Wade

      VK1FWBD

  3. HED666 says:

    Hi James,

    I’m also trying to use the soundmodem with a raspberry. How did you solve the PTT-Part? Is there an easy way to use a GPIO for this?

    Thanks, Eduard

  4. Libor OK2ZO says:

    I spend many hours with same idea and hardware (incl. soundcard), trying several raspbian versions, many configurations.
    The issue is in OS. Only in ARCH Linux it finaly works!
    Today I’ve found also this page:
    http://www.pa0esh.nl/index.php?option=com_content&view=article&id=86&Itemid=101
    which describes a little more, then mentioned. It helped me to create startup scripts..
    I had while also succesfully compiled digi_net, I like. Unfortunately I was not able compile aprsd yet. But I have plan not to use as an igate for now.

  5. The loading is from pulse audio handing off to alsa. I would imagine a lot of it is in bitrate conversion of the audio samples. Most USB devices are locked to sample/playback at 48000Hz. Judging by the age of soundmodem, I am going to guess that it does it at a different rate.

    I had a similar problem porting IRLP to raspberry Pi, but now I have IRLP and darkice encoder working in parallel.

    And changing the USB to 1.1 mode made the sound card actually work right. But it then breaks almost all support for USB keyboards.

    How have you come along with this?

    From a fellow Canadian Ham – VE7LTD

  6. Dave Grubb - KC8CF says:

    Following this project with interest. A recent post I found re USB sound interface recommends dumping pulse audio and using USB1.0. Link follows:

    http://kb9mwr.blogspot.com/2013/01/raspberry-pi-and-sound-input.html

    Keep plugging along!

  7. Andrew says:

    Hello,

    This guy seems to have it working:
    https://www.thecraag.com/Raspberry_Pi_APRS_Digipeater

    Is he doing something differently?

    I want to do the same thing, so I hope you have success.

    • James says:

      Hi Andrew,

      There are two notable differences between our setups: soundcards and distribution.

      The author of the website you linked appears to be using a much different USB sound card than what I’ve tried – in both of my tries, I’ve been using Creative Labs SoundBlaster hardware. The sound cards I’ve tried are certainly not el-cheapo brand equipment, and they work just fine on my netbook and my tower machines.

      The second difference is the Raspberry Pi distribution we are using. I’ve been working mostly with Raspbian as it has the most support, the greatest number of users and it is based on Debian – something I am very familiar with. It is possible that the Arch distro. has better sound card optimization or kernel modules, so a change of distribution will be my next move.

      I will definitely keep you posted on my progress!

Leave a Reply

Your email address will not be published. Required fields are marked *