Giter Club home page Giter Club logo

extmodem's Introduction

Build status

Build Status

Coverity Scan Build Status

Sound card modem for Amateur Radio AX25

By Alejandro Santos, LU4EXT / HB3YNQ. [email protected].

Web page (old): http://extradio.sourceforge.net/extmodem.html

This is a modem for AFSK AX25 packet (1200 bps APRS compatible). It is capable to both send and receive packets. The main feature of this program is that it is currently running three different demodulators in parallel, increasing the quality of reception.

Therefore, the number of demodulated packets is very good.

Windows Files

Windows 32-bit and 64-bit binaries can be found at: http://files.dakaraonline.org/extmodem/

Usage

Open a new terminal (Start-Execute-"cmd" on windows) and ask for the program's help:

extmodem.exe --help
    
Allowed options:
  -h [ --help ]                     produce help message
  -d [ --debug ]                    produce debug messages
  -a [ --debugaudio ]               produce audio debug information
  -L [ --list-devices ]             list audio source devices and exit
  --config-file arg                 configuration file name
  --audio-backend arg (=portaudio)  Audio backend: alsa,loopback,portaudio,wave
                                    ,null
  --kiss-tcp-port arg (=6666)       set KISS TCP listening port
  --agwpe-tcp-port arg (=8000)      set AGWPE emulator TCP listening port
  --ptt-mode arg (=serial)          PTT mode: serial,parallel,gpio,hamlib,null
  --ptt-port arg (=/dev/ttyS0)      set serial/parallel port PTT file name
  --tx-delay arg (=200)             set tx-delay in ms
  --tx-tail arg (=50)               set tx-tail in ms
  -s [ --sample-rate ] arg (=22050) sample rate
  --in-chan arg (=2)                input channel count
  --out-chan arg (=2)               output channel count
  --frames-per-buffer arg (=8192)   frames per buffer, bigger increases latency
  --hamlib-model arg (=-1)          hamlib Rig Model, -1 for auto detection
  --audio-mult-factor arg (=1)      Audio multiplication factor as float
  --enabled-in-channels arg (=-1)   Enabled input channels as a bitfield (1: 
                                    left, 2: right, 3: both), -1 for all
  --backend-wave-in-file arg        Backend WAVE: input file
  --alsa-in-dev arg (=default)      ALSA input device string, only for ALSA 
                                    backend (not PortAudio!)
  --alsa-out-dev arg (=default)     ALSA output device string, only for ALSA 
                                    backend (not PortAudio!)
  --pa-in-dev arg (=-1)             PortAudio input device id number. See 
                                    --list-devices
  --pa-out-dev arg (=-1)            PortAudio output device id number. See 
                                    --list-devices

You should at least set the PTT Port, Usually COMx on Windows and /dev/ttySX on Linux and Unix. You can run extmodem in receive-only mode by setting a dummy PTT mode with the argument --ptt-mode null.

The program prints the received packets on the screen having the -d switch.

Testing with DTMF

Extmodem provides a DTMF decoder for testing. You can use your handheld radio to test the decoder by sending DTMF codes. You should be able to see on the screen the decoded DTMF code.

Also, using the --debugaudio switch you can see some simple statistics about the received audio.

Selecting the sound device to use.

Using the ALSA backend you can use the --alsa-in-dev and --alsa-out-dev command line options to select specific input and output sound devices, ie, hw:1,0. This option only works with the ALSA backend, not PortAudio backend. To get a list of ALSA PCM input and output devices you can use the aplay and arecord ALSA command line utilities:

$ arecord -L
$ aplay -L

Use the complete line header as a device string. For example:

$ arecord -L
plughw:CARD=C920,DEV=0
    HD Pro Webcam C920, USB Audio
    Hardware device with all software conversions

# ./extmodem --audio-backend=alsa --alsa-in-dev "plughw:CARD=C920,DEV=0"

The Portaudio backend uses by default the default sound device, which is usually the default ALSA device. To select a different PortAudio device you can first get a list of devices with the -L option:

$ ./extmodem --audio-backend=portaudio --list-devices

Take note of the Device NUMBER and then use that number with the --pa-in-dev and --pa-out-dev options:

$ ./extmodem --audio-backend=portaudio --pa-in-dev=44 --pa-out-dev=45

APRX - TCP Kiss Support

Extmodem opens a TCP KISS interface running at port 6666. You can use any TCP KISS capable program to send and receive packets, ie "aprx":

<interface>
  tcp-device 127.0.0.1 6666 KISS
  callsign LU0EXT-1
  tx-ok false
</interface>

AGWPE Support

You can use UI-VIEW32 with extmodem. This program supports a preliminary version of the AGWPE protocol, effectively emulating its behaviour. It opens a TCP socket on port 8000, the AGWPE default.

Example on the RPi

This is my command line on the Raspberry Pi. I am using an external USB sound card interface:

./extmodem --ptt-mode null --audio-backend alsa --alsa-in-dev "hw:1" -s 44100 --out-chan 2 --in-chan 1 --debug

Build from source

Linux, get the source

On your Linux terminal write:

git clone https://github.com/alejolp/extmodem.git

The source code should be at the "extmodem" directory.

Compile

On Linux systems you can compile with g++ using cmake. You need:

  • Modern C++ compiler with C++11 support
  • CMAKE
  • Boost C++ library development files
  • PortAudio VERSION 19 library development files

On Debian and Ubuntu you can install the required packages easily:

apt-get install cmake build-essential g++ portaudio19-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libhamlib-dev

Then just type, at the "extmodem" directory:

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4

The executable should be at build/extmodem

Raspberry Pi Support

I'm running extmodem on my RPi. To compile with cmake you can:

mkdir build
cd build
CXX=$(which g++-4.8) CC=$(which gcc-4.8) CFLAGS=-O2 CXXFLAGS=-O2 cmake ..
make -j4

License

This program borrows code from Sivan Toledo's javAX25 and Thomas Sailer's multimon. Thank you folks!

Copyright (C) 2013-2017 Alejandro Santos LU4EXT, [email protected].

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

extmodem's People

Contributors

alejolp avatar gherynos avatar mvdswaluw avatar ohanssen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

extmodem's Issues

extmodem decodes only when microphone playback isn't muted

Hi again,

I have another question: In #11 there's specified my environment - I noticed that while Mic in Playback(I'm speaking about alsamixer) is muted, extmodem isn't able to decode either DTMF tones or APRS packets, so in case when RPi mic & speaker output are connected to speaker & mic in my PC, I can hear all sounds back, and I don't know how to solve it - I'm sure that problem is related to USB card at all(on soundblaster even soundmodem worked correctly), but there's maybe some solution - do you have any ideas? APRS is simplex at all, but I don't know how modules like DRA818V will behave.

meshtastic

Is possible to compatible with meshtastic and no licence mode?
or add retticulum network

Compiler error.

Had problems compiling on Rpi2.

In build.py -> CFLAGS -> "-std=c++11" should be "-std=c++0x".

syntax error : identifier 'ptt_parallel_windows'

ifdef _MSC_VER

return ptt_ptr(new ptt_parallel_windows());

endif

Code above produce error while compiling:
extmodem-master\src\ptt.cpp(71): error C2061: syntax error : identifier 'ptt_parallel_windows'

Error: expected a type specifier

Any suggestion?

"UNHANDLED PACKET type: V" while transmitting from Xastir

Hi,

I'm working on a APRS-related project on Raspberry Pi powered by Archlinux ARM - extmodem is much more better at decoding real APRS packets recorded from radio than soundmodem while using cheap, chinese USB cards, but I have other kind of problems:

After running Xastir, logs from debug instance, executed in this way:
/usr/bin/extmodem --audio-backend alsa --agwpe-tcp-port 8000 --kiss-tcp-port 6666 --ptt-mode null -s 48000 --in-chan 1 --t-chan 2 --debug --alsa-device "plughw:0,0"

Results in:

AGWPE New TCP connection, 1 total.
AGWPE new data 108
AGWPE new frame kind: R
AGWPE new frame kind: G
AGWPE new frame kind: k
AGWPE new data 92
AGWPE new frame kind: V
AGWPE UNHANDLED PACKET type: V

I configured Xastir to use AGWPE without success - every time I click "Transmit now!" or trying to send any message, I receive that error in log.

Have you discovered any successful way to connect extmodem to Xastir?

If it might be useful - aplay -L output:

null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Device
    USB PnP Audio Device, USB Audio
    Default Audio Device
sysdefault:CARD=Device
    USB PnP Audio Device, USB Audio
    Default Audio Device
front:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    Front speakers
surround21:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Device,DEV=0
    USB PnP Audio Device, USB Audio
    IEC958 (S/PDIF) Digital Audio Output

Add pty support for KISS

Can support for creating a pseudo terminal be added for KISS? That way the kernel's MKISS module can be used and you get a real kernel network interface.

This should be pretty minimal work of adding a call to openpty(3) and reading and writing to the master side, rather than to a TCP socket.

I tested out the kernel's MKISS module and extmodem by using socat to wrap the tcp socket as a pty and it seemed to work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.