Tuesday, April 8, 2014

Techy Tuesday - Amateur Digital Voice

There's a large and healthy group of liberty sphere folks who have gotten amateur radio licenses as part of their preps.  Ham radio offers both many more frequencies to operate on and many more modes to operate that dwarf anything obtainable any other way.  I've written somewhat on the topic before but bow deeply in recognition to Sparks31 who has done a great job on many topics. 

In the last month or so, I heard of and looked into a piece of open source software put together by some very technically savvy hams; it's called FreeDV or Free Digital Voice.  FreeDV allows you to put an HF transceiver on the air using digital modulation techniques as advanced as any you'll find.  Let me quote from their intro page:
FreeDV is a GUI application for Windows, Linux and MacOS (BSD and Android in development) that allows any SSB radio to be used for low bit rate digital voice.

Speech is compressed down to 1600 bit/s then modulated onto a 1.25 kHz wide 16QPSK signal which is sent to the Mic input of a SSB radio. On receive, the signal is received by the SSB radio, then demodulated and decoded by FreeDV. Communications should be readable down to 2 dB S/N, and long-distance contacts are reported using 1-2 watts power.

FreeDV was built by an international team of Radio Amateurs working together on coding, design, user interface and testing. FreeDV is open source software, released under the GNU Public License version 2.1. The FDMDV modem and Codec 2 Speech codec used in FreeDV are also open source.
If you want to hear what it sounds like, check out this YouTube video of a test contact which goes back and forth between analog SSB and FreeDV voice.  An important point that they don't mention is that the only reason you can understand both is that the receiver is using FreeDV.  If that software isn't available, the speech will be unintelligible.  This YouTube Video lets you hear what the FreeDV sounds like just coming out of a speaker with no decoder.  It's also a test of the software algorithms in degraded conditions by artificially introducing degradations into speech test clips. 

Side note: I was involved in development of a digital voice system called VDL Mode 3 for the FAA about a decade ago.  Even though it was sent at much higher bit rate and channel bandwidth, it didn't sound that much better than this.  One of its features was digital voice using a commercial (very closed source) digital voice codec developed by a couple of post-docs from one of the big schools.  FreeDV uses an amateur-developed, open source, free codec and sounds good enough when running slightly over 1600 Bits Per Second.  The first thing that jumps out at me about these tests is that the phrases used, male and female speakers, are identical to what we were using.
(The FreeDV GUI
As always, if you think you'll want to get to know this mode, there's no time like today.  And the same provisions for security I've always mentioned go for this one, too.   Amateur modes are designed so that they can be publicly read by default.  I don't know where it's buried in the source code, but I'm sure if a couple of guys modified certain key parameters, they could come up with a version that was intelligible to a much smaller number.  It would be thoroughly illegal for use today, AFAIK. 


16 comments:

  1. Interesting.

    DV has been tried many times before in Amateur Radio, and has always used proprietary hardware, software, or both.

    And always landed with a huge THUD of non acceptance due to cost.

    Perhaps it's time has come, courtesy of FOSS.

    ReplyDelete
  2. actually the current rage from ICOM isn't a thud. But it is still fairly expensive. And limited to ICOM FM. There were rumors that Kenwood was going to come out with a more open setup that included Ecolink.

    My guess is that FreeDV (or the codec) will get stuffed into one of the Swiss-Army-Knife operating programs - to allow one interface to handle psk31, CW, DV etc.

    Handy if you are using the spectrum analyzers provided in most Software Defined Radio

    ReplyDelete
  3. Yeah, DSTAR is the first one to kind of take off. Yeasu now has their own, non-compatible, DV system.

    It's getting to be a pain trying to figure out which program to use when I see digital stuff with my Flex radio. Unless you do it a lot (I don't), you wind up wasting a lot of time trying all the codecs before you hit the right one!

    ReplyDelete
  4. Wheelgun - any idea what codec Icom is using in DSTAR? I've heard it's the same codec as we used in Mode4 voice. I simply don't remember who that was.

    A good codec has been the roadblock to amateur DV. Good to see these guys went off and made one.

    How far off is an ASIC dongle that goes between microphone/headphones and radio and allows you to encrypt speech with a public key system?

    ReplyDelete
  5. From wikipedia:

    The technology requires the use of a proprietary AMBE Codec that is owned by Digital Voice Systems, Inc.

    ReplyDelete
  6. DVSI... yeah... that was it. Same guys.

    ReplyDelete
  7. Thank you for the list of articles at "Privacy in Radio Communications - Some Thoughts". I missed the beginning of the series and caught up tonight. Good stuff.
    http://thesilicongraybeard.blogspot.com/p/blog-page.html
    A few thoughts from various articles referenced from the above:

    1) You mention the RasPi being underpowered; the BeagleBoneBlack (BBB) is supposed to be faster. Whether that's fast enough I can't say.
    Your comment about RasPi being underpowered. Of course a lot has changed since 2013-03.
    http://thesilicongraybeard.blogspot.com/2013/03/contemplating-privacy-and-radio_29.html?showComment=1364857860722#c3545556585430478474
    > I read someone saying they had tried their Raspberry pi and it didn't have the horsepower. I realize that can vary with the coding, so I wouldn't rule it completely out, but I don't think it's a slam dunk it would work, either.
    Comparison of RasPi vs BeagleBoneBlack, BBB said to be 2x.
    http://makezine.com/magazine/how-to-choose-the-right-platform-raspberry-pi-or-beaglebone-black/
    > Specifically, even when running at the same clock speed, the processor on the BeagleBone Black is nearly TWICE AS FAST as the processor on the Raspberry Pi. (Source 1: ARM A8 runs 2000 MIPS/MHz, Source 2: ARM11 runs 1250 MIPS/MHz)
    $45 Adafruit BBB (example price) regularly falls in and out of stock.
    http://www.adafruit.com/products/1278

    2) Somewhere in the series, someone asked you to define your acronyms and various techspeek. How about creating a Glossary? Sorry, I have no idea whether that's an easy task with your blog software or not.

    Kudos on the fine work. It regularly teaches me things and sparks the imagination.

    73, Jim

    ReplyDelete
  8. Thanks Jim. I need to look into tools for a glossary/acronym list. And really thanks for those updates on the RasPi vs. the BeagleBoneBlack. I still haven't really started playing with one of those. Yet.

    It regularly teaches me things and sparks the imagination. That's the goal I'm aiming for! Glad to know I'm hitting it every now and then.


    ReplyDelete
  9. Downloaded the software Wednesday to listen on 20 some but no activity yet. Maybe this weekend.
    Speaking of VDL, Mode 2 CPDLC was a solution looking for a problem. The flight deck human factors just didn't work.
    Terry
    Fla.

    ReplyDelete
  10. IMO, CPDLC is not the place for Mode 2. Mode 2 is like a "Super ACARS", with a 31.2 kbps data link instead of 1200 (? I think).

    Mode 3, with digital voice, solves one of the nasty, intractable problems for the VHF radio OEMs: comm-to-comm interference. Having 3 radios with antennas a couple of feet from each other has aspects that the physics just beat you senseless with. The digital voice allows you to not break squelch unless you know its voice and it gets rid of the audio artifacts. But that's a lot of money to avoid that annoyance. If they just want to increase the carrying capacity of the VHF spectrum, the 8 1/3 system seems to be working out in the EU - AFAICT. Heck, we developed that in '96.

    This "Dizzy Dean inside baseball" moment has been brought to you by "Gillette Blue Blades"! ;-)

    ReplyDelete
  11. Agree with all that. We had 3 VHFs at Eastern when most other operators only had 2.

    Finally heard some DV on 14.236 today. Will listen some more before I actually try using the mode. Thanks for the post.

    Terry
    Fla.

    ReplyDelete
  12. 14.236 is generally where Digital SSTV is transmitted. Last time I was doing that, the "EasyPAL" guys hung out there.

    ReplyDelete
  13. It would be thoroughly illegal for use today, AFAIK.

    That's only true if you transmitted it as a HAM. If you transmitted it through a cell phone it would just be modem tones, and the installed base of cell phones is many times larger.

    ASIC dongle == "NSA Inside", you have no way of knowing otherwise. Any kind of public key or symmetric crypto is "NSA Inside", you have little way of knowing otherwise. Instead, XOR the speech data with a one time pad supplied on a USB key. For each transmission, select a byte offset into the pad based on the transmitter time of day clock. Transmit the offset number in the clear at the beginning of packets so clocks don't have to stay in sync. Any OTP when users are quiet is wasted. So what?

    8 Gigabytes of OTP divided by 1600 bits/second = 1.3 years

    (((2^33)*8)/1600)/(3600*24*365) = 1.36

    Will FreeDV accept a patch to do this? It not, will Sparks31?

    ReplyDelete
  14. Anon 1113, ASIC dongle /= "NSA Inside" if I write the ASIC code. Likewise, using public key encryption doesn't mean "NSA inside" if we're smart about the code. Your OTP encryption is one way of doing it, and for sure it's serviceable, but the approach isn't as easy for a group to use.

    Anyone who can write the code to XOR a data stream and a OTP can create an ASIC. More on that to come.

    ReplyDelete
  15. Likewise, using public key encryption doesn't mean "NSA inside" if we're smart about the code.

    Which of the current major cryptographic algorithms do you believe does not have secretly weakened magic constants or random number generators, and why do you believe that? How many secret weakenings in algorithms and implementations have come to light in the last 50 years? Was there ever a timeperiod when the best known crypto was not weakened? Why is today different?

    Anyone who can write the code to XOR a data stream and a OTP can create an ASIC. More on that to come.

    I figured that an ASIC manufacturer will actually send you a known-controversial encryption chip just as much as Shapeways will actually send you a 3D printed gun. Did you mean something you can program at home, like an FPGA?

    ReplyDelete
  16. Which of the current major cryptographic algorithms do you believe does not have secretly weakened magic constants or random number generators, and why do you believe that? I can't answer that because I know nothing about them. But I don't see why we need to use anything in use today. The open source community has been in open revolt against the NSA for some time; Borepatch covers this.

    I meant an FPGA, and used the term ASIC loosely - sorry. A true ASIC probably isn't economically justifiable in any amateur radio product. Development costs can be outrageous on them, and one bug causes you to start over.

    This thread goes into automatic comment shutdown tomorrow - on two weeks. Like all my posts.

    ReplyDelete