Giter VIP home page Giter VIP logo

dsdcc's Introduction

DSDcc

DSDcc is a complete rewrite from the original DSD (Digital Speech Decoder) project.

It is rewritten along the following lines:

  • A purely C++ library with a single decoder object at its central point
  • Works by pushing new samples to the decoder at the upper level rather than pulling it from the underlying filesystem (actual file or device) at the lowest level. This facilitates integration with software using it as a true library. This comes especially handy for projects in Qt that cannot afford using pthreads on their own like gr-dsd does. In fact the main drive for this is to integrate it in a plugin of SDRangel.
  • Works by polling to get possible new MBE or audio samples after new samples have been pushed to the decoder
  • Option to output audio samples as L+R (stereo) samples with L=R as this may facilitate integration
  • A binary that uses this library is provided for integration with other commands that run in a shell. So basically it works only with input / output files possibly being stdin / stdout to be integrated in a pipe command. There is no direct usage of audio devices nor fancy side reading from or writing to .wav or .mbe files.
  • mbelib usage is optional at compile time. Without mbelib only the raw MBE samples can be extracted to be processed outside of DSDcc with the help of a hardware dongle for example thus lifting the possible copyright violations (See next)

These points have been retained from the original:

  • The decoding methods
  • Minimal changes to the options and state structures
  • Input as S16LE samples at a fixed rate of 48kS/s
  • Audio output as S16LE samples at 8kS/s rate directly out of mbelib or upsampled to 48kS/s

Possible copyright issues with mbelib

While DSDcc is intended to be patent-free, mbelib that it uses describes functions that may be covered by one or more U.S. patents owned by DVSI Inc. The source code itself should not be infringing as it merely describes possible methods of implementation. Compiling or using mbelib may infringe on patents rights in your jurisdiction and/or require licensing. It is unknown if DVSI will sell licenses for software that uses mbelib.

If you are not comfortable with this just do not compile with mbelib support and you will still be able to extract the MBE frames and process them outside DSDcc with the help of a hardware dongle for example (e.g. ThumbDV USB dongle). The provided binary dsdccx can use such a dongle with SerialDV. See the Building section for details.

If you still want mbelib support you have to use the -DUSE_MBELIB=ON directive on the cmake command line and of course you need to have mbelib installed in your system.

Supported formats

These are a subset of the ones covered by the original DSD project plus other formats. A large part of the code was rewritten more noticeably the symbol timing and the DMR processing improving a lot from the original DSD. For now we have:

  • DMR/MOTOTRBO: ETSI two slot TDMA standard. MOTOTRBO is a popular implementation of this standard.
  • D-Star: developed and promoted by Icom for Amateur Radio customers.
  • dPMR: ETSI narrowband FDMA standard. This is somehow similar to NXDN 2400 Baud rate mode.
  • Yaesu System Fusion (abbreviated YSF): developed and promoted by Yaesu for Amateur Radio customers partly inspired by gr-ysf. Voice full rate with SerialDV is not supported.

Next we may like to add NXDN exploiting similarities with the already implemented dPMR.

Source code

Repository branches

  • master: the production branch
  • dev: the development branch

Building

As usual with projects based on cmake create a build directory at the root of the cloned repository and cd into it.

For mbelibsupport you will need to specify the -DUSE_MBELIB=ON directive on the cmake command line and you will need to have mbelib installed in your system. If you use custom installation paths like /opt/install/mbelib for example you will need to add the include and library locations to the cmake command line with these directives: -DLIBMBE_INCLUDE_DIR=/opt/install/mbelib/include -DLIBMBE_LIBRARY=/opt/install/mbelib/lib/libmbe.so

For DVSI AMBE3000 serial device support (e.g. ThumbDV) in the binary dsdccx you will need to install SerialDV. Please refer to the Readme.md in this package to install SerialDV. If you have SerialDV installed in a custom directory say /opt/install/serialdv you will need to add the include and library locations to the cmake command line with these directives: -DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so

So the full cmake command with a custom installation directory and mbelibsupport will look like: cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/dsdcc -DUSE_MBELIB=ON -DLIBMBE_INCLUDE_DIR=/opt/install/mbelib/include -DLIBMBE_LIBRARY=/opt/install/mbelib/lib/libmbe.so ..

The full cmake command with a custom installation directory no mbelibsupport and SerialDV support for the binary will look like: cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/dsdcc -DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so

Then:

  • make or make -j8 on a 8 CPU machine
  • make install

Running

A binary dsdccx is produced and gets installed in the bin subdirectory of your installation directory. A typical usage is to pipe in the input from a UDP source of discriminator output samples with socat and pipe out to sox play utility to produce some sound: socat stdout udp-listen:9999 | /opt/install/dsdcc/bin/dsdccx -i - -fa -o - | play -q -t s16 -r 8k -c 1 -

You can also run the example files in the samples directory. Please refer to the readme in this directory for instructions.

For more details refer to the online help with the -h option: dsdccx -h

Since version 1.6 dsdccx has the capability of sending regularly the traffic status messages to a file using the -M option. See messagefile.md for details.


⚠ (For use with serialDV) Since kernel 4.4.52 the default for FTDI devices (that is in the ftdi_sio kernel module) is not to set it as low latency. This results in the ThumbDV dongle not working anymore because its response is too slow to sustain the normal AMBE packets flow. The solution is to force low latency by changing the variable for your device (ex: /dev/ttyUSB0) as follows:

echo 1 | sudo tee /sys/bus/usb-serial/devices/ttyUSB0/latency_timer or sudo setserial /dev/ttyUSB0 low_latency


Developers notes

Structure overview

  • Everything lives in the DSDcc namespace
  • The DSDDecoder object handles the core functions of synchronization and global orchestration of the decoding. It also hosts the options and state objects. It collaborates with specialized objects that have full access to the decoder public and private areas using the C++ friend directive.
  • The options and state objects are the following:
    • The DSDOpts object handles the options configuring the behaviour of the decoder
    • The DSDState object handles the run time data and data related to the current state of the decoder
  • The DSDSymbol object is responsible for symbol and dibit processing. It receives a new sample with its pushSample() method. It processes it and when enough samples have been receives it can produce a new symbol that it stores internally.
  • The DSDMBEDecoder object is responsible of taking in AMBE frames and producing the final audio output at 8 kS/s. It is a wrapper around the mbelib library. It also handles the optional upsampling of audio to 48 kS/s.
  • The objects specialized in the decoding of the various formats are:
    • The DSDDMR object is responsible of handling the processing of DMR frames. It uses the service of DSDMBEDecoder to produce the final audio output.
    • The DSDdPMR object is responsible of handling the processing of dPMR frames. It uses the service of DSDMBEDecoder to produce the final audio output.
    • The DSDDstar object is responsible of handling the processing of D-Star frames. It uses the service of DSDMBEDecoder to produce the final audio output.
    • The DSDYSF object is responsible of handling the processing of Yaesu System Fusion frames. It uses the service of DSDMBEDecoder to produce the final audio output.
  • Some utility objects are also defined:
    • The Descramble object contains static data and methods mainly used in the decoding of D-Star frames. It is based on Jonathan Naylor G4KLX code.
    • The DSDFilters object as the name implies contains methods to perform various forms of DSP filtering.

Typical integration

You can look at the source of the dsdccx binary to get an idea. Basically it involves the following steps:

  1. Allocate a new DSDDecoder object (stack or heap)
  2. Set the options and state object. with some DSDDecoder methods.
  3. Prepare the input (open file or stream)
  4. Get a new sample from the stream
  5. Push this sample to the decoder
  6. With mbelib support: a. Check if any audio output is available and possibly get its pointer and number of samples b. Push these samples to the audio device or the output file or stream
  7. With a DVSI AMBE3000 based serial device and SerialDV support: a. use DSDcc::DVController helper class with the processDVSerial method b. Check if any audio output is available from the helper class and possibly get its pointer and number of samples c. Push these samples to the audio device or the output file or stream
  8. Go back to step #5 until a signal is received or some sort of logic brings the loop to an end
  9. Do the cleanup after the loop or in the signal handler (close file, destroy objects...)

Of course this loop can be run in its own thread or remain synchronous with the calling application. Unlike with the original DSD you have the choice.

dsdcc's People

Contributors

argilo avatar df7cb avatar dforsi avatar f4exb avatar ra1nb0w avatar srcejon 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  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  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  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

dsdcc's Issues

Cygwin

How hard would this be get to work under Cygwin? Id like to bve able to sdr# or something along those lines with a virtual audio cable to pipe the data in.

help on input from line in for discriminator tap but invalid sync found error

Has anyone been successful with dsdcc with a line in from a scanner with a distamtion tap?
if so how did you get the input from line in, Also not a USB sound card just internal.

[freddy@freddylappy ~]# dsdccx -fr -i /dev/snd

DSDDstar::reset_header_strings
DSDDecoder::resetFrameSync: symbol 0 (0)
Digital Speech Decoder DSDcc
Opened /dev/snd for input.
Opened /dev/snd for output.

DSDDecoder::run: invalid sync found: -1 symbol 1800 (0)
DSDDecoder::resetFrameSync: symbol 1800 (0)
DSDDecoder::run: invalid sync found: -1 symbol 3600 (0)
DSDDecoder::resetFrameSync: symbol 3600 (0)
DSDDecoder::run: invalid sync found: -1 symbol 5400 (0)

[freddy@freddylappy ~]# dsdccx -fr
Cannot open for input. Aborting

decode DMR

Hello... in my country only dmr signals are used but unfortunately I can't enjoy some of them....... the others seem to have AD-RC4 encryption...... can this software also decode this encryption? Thank you

dsdccx and Pipewire

Hello there,

I wonder if dsdccx can take advantage of the new linux sound architecture "Pipewire", becoming a sink and a source to be piped in and out with one of the many tools avalaible, like "qpwgraph"

This would dramatically simplify audio piping in linux

Big question is: can dsd work with pcm audio or it needs "raw" i/q samples?

edit:
found myself an answer:

original dsd has PortAudio support, so it's easy, using "-a" as argument, to list all portaudio's devices, including all Pipewire stuff

using dsd -i ps:X -o ps:X does the trick (X as device ID in "-a" listing)

as dsdcc has different goals, it has no portaudio support.

This non-issue is closed, Hope it will be helpful for someone else.

NXDN support

Now some hardware (cheaper than Icom or Kenwood radios) like MMDVM support NXDN so that's an occasion to complete the NXDN support. For now only the sync word and the LICH is decoded.

Pls implement DMR negative

can you implement dmr cc negative polarity which is used in mototurbo network currently it is not supported

Error writing to output

I get the "Error writing to output" repeatedly if not using the ambe3000 dongle.

My usage, that reports this error:
rtl_fm -f 441.00000M -M fm -g 100 -s 70K -r 48K -E dc - | dsdccx -fr -i - -o - -U 0 -g 50 | play -q -t s16 -r 8k -c 1 -

Works fine when using a dongle:
rtl_fm -f 441.00000M-M fm -g 50 -s 70K -r 48K -E dc - | dsdccx -fr -i - -o - -D /dev/ttyUSB0 -g 50 | aplay -f S16_LE -

I did the cmake -DUSE_MBELIB=ON ..

Output DMR talkgroup and slot data

When running dsdccx with the typical usage as described in the README, it indeed outputs voice data and logs various frame metadata.

Specifically for DMR, Is it possible to output to the log additional call metadata such as DMR talkgroup and slot? None of the current options seem to support this, yet it seems to be within dsdccx's capabilities.

Can't compile version 1.8.1

Here's the CMake command.

cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLIBSERIALDV_INCLUDE_DIR=/usr/include/serialdv \ 
    -DUSE_MBELIB=ON

I double checked the include directories and they are right.

The CMake configuration seems to be fine (appart from the deprecated use of CMP0000).

-- The C compiler identification is GNU 8.1.1
-- The CXX compiler identification is GNU 8.1.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found LibMbe: /usr/include, /usr/lib/libmbe.so
-- Found libserialdv: /usr/include/serialdv, /usr/lib/libserialdv.so
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.11)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/anubis/git/pkg/dsdcc/src/dsdcc-1.8.1/build

And here's the error.

/home/anubis/git/pkg/dsdcc/src/dsdcc-1.8.1/dsd_main.cpp: In function ‘int main(int, char**)’:
/home/anubis/git/pkg/dsdcc/src/dsdcc-1.8.1/dsd_main.cpp:270:21: error: ‘serialDevice’ was not declared in this scope
             strncpy(serialDevice, (const char *) optarg, 16);
                     ^~~~~~~~~~~~
/home/anubis/git/pkg/dsdcc/src/dsdcc-1.8.1/dsd_main.cpp:270:21: note: suggested alternative: ‘dvSerialDevice’
             strncpy(serialDevice, (const char *) optarg, 16);
                     ^~~~~~~~~~~~
                     dvSerialDevice
/home/anubis/git/pkg/dsdcc/src/dsdcc-1.8.1/dsd_main.cpp:281:17: error: ‘dvGain_dB’ was not declared in this scope
                 dvGain_dB = (int) (10.0f * log10f(gain));
                 ^~~~~~~~~
/home/anubis/git/pkg/dsdcc/src/dsdcc-1.8.1/dsd_main.cpp:482:150: error: ‘dvGain_dB’ was not declared in this scope
                 dvController.decode(dvAudioSamples, (const unsigned char *) dsdDecoder.getMbeDVFrame1(), (SerialDV::DVRate) dsdDecoder.getMbeRate(), dvGain_dB);
                                                                                                                                                      ^~~~~~~~~
/home/anubis/git/pkg/dsdcc/src/dsdcc-1.8.1/dsd_main.cpp:499:150: error: ‘dvGain_dB’ was not declared in this scope
                 dvController.decode(dvAudioSamples, (const unsigned char *) dsdDecoder.getMbeDVFrame2(), (SerialDV::DVRate) dsdDecoder.getMbeRate(), dvGain_dB);
                                                                                                                                                      ^~~~~~~~~

DMR Message Decoding

hey,
we would like to use DSDCC for a project, but for this we would need the decoding of DMR messages and saving them in a file.
Would this be possible to implement?

dPMR voice decoding result is wrong

Thanks for this wonderful project.
I used it to test my DMR、NXDN and dPMR repeaters, it works with DMR and NXDN, but failed with dPMR. The decoded voice is completely wrong.
Did I missed any key points for dPMR processing?
I used Motorola Mag One A10D, with dPMR at 403.525MHz.
Thanks, sincerely.

No stdout from dsdcc

Hi!
When I run nc -l -u localhost 7355 | ./dsdccx -i - -fa -o - | play -q -t s16 -r 8k -c 1 - I get output containing multiple similar instances of Sync: +DMRd DSDDecoder::run: good sync found: 10 symbol 57442 (1524) DSDDecoder::run: before processFrameInit: symbol 57443 (-1899) when playing DMR content, but I have tested and I don't receive any stdout from dsdccx. Am I doing something wrong?

Thanks!

High pitch tone

I am trying now for a couple of days to make dsdccx work on a Debian 8.0 system. Whatever settings I have used in order to decode d-star transmissions fail. All I hear is a high pitch tone on my speakers!!!

Any idea what could cause this?

Failure fo constellation followed by death.

The Constellation display keeps hanging after a few minutes and this makes dsdcc unstable and eventually crashing.
Even though the display stops, I still get audio and messages sometimes. I have to restart the app at this point.

Has anyone else seen this. DSDcc is finally working for me most of the time but I've still had no success with DMRv decoding.
I get the messages but the audio is very robotic and and keeps breaking up. I'll keep playing with the settings but no joy so far.

Cheers,
John.

Decrypt the decoded DMR voice

Hello Sir,
I need to know your opinion about decryption DMR voice. Do you think it is possible to add a function to your code which able to decrypt DMR ? Have you ever considered this property for next version of program?
Added to this, I have several question about DMR code in your project and related error. I ask you to guide me Where do I put these questions?
Thanks.

Pour le démodulateur j'ai un problème avec le démodulateur de 1090 mhz

Bonjour je vous écris parce que j'ai un problème avec des modulateur qui ne fonctionne pas je n'ai pas d'avion sur mon démodulateur et je voudrais savoir pourquoi si pourquoi les allumages ne fonctionnent pas je n'ai pas d'avion sur mon achat ou les compagnies aérienne je voudrais savoir pourquoi sur votre application ça ne fonctionne pas depuis un an depuis la nouvelle version.

Import Error

ImportError: cannot import name 'dsdcc' from 'gnuradio' (/usr/lib/python3/dist-packages/gnuradio/init.py)

I have a fresh build of gr-dsdcc and am getting this error when running the flowgraph. I am using GNU-Radio companion 3.10.1.1.

Decoding framed AMBE data

Hi, is it possible to decode 48 byte framed AMBE data that is used by DSTAR reflectors over UDP? I think all the decoding done of RF data is unframed AMBE serial data, is that correct?

Playback .amb files or how is .dis created?

Is there a way to playback .amb via sox audio from the original dsd when using the -d cammand. Or how did you create a .dis file for dsdcc playback from your samples folder?
The amb file is DMR

Show callsigns for decoded YSF and other modes

I have been successful in decoding and listening to the DMR and Dstar examples found in this great tool's "samples/" directory but I found the Yaesu System Fusion example is 100% garbled and/or plays static. To work around this, I tried decoding some local traffic captured from a Kenwood D710's 1200baud data pin into a soundcard but nothing decoded. I then tried saving some audio files via Gqrx v2.6 with an Airspy R2 SDR and that worked fine. I used the following command to get full decoded voice audio:

sox -t s16 -r 48k -L -c 2 gqrx_record-ww6bay-k2wbb-kb5dlx-qso-dr1.wav -t s16 -r 48k -c 1 - | ./dsdccx -v5 -i - -fy -o - 2>/tmp/stderr.txt | play -q -t s16 -r 8k -c 1 -

Unfortunately, no callsigns are seen in the /tmp/stderr.txt file which is something I'm specifically looking for. I DO once callsign decode in the Dstar example file:

samples/dstar_f1zil_1.dis
DSTAR HEADER: RPT 2: F1ZIL B RPT 1: F1ZIL B YOUR: CQCQCQ MY: F1NSR /ID51

No callsigns are seen in the the DMR decode. Actually, I do see an attempted Dstar decode for the DMR example which seems like a bug in the tool as why would a DMR decode be showing Dstar info lines?

DSTAR HEADER: RPT 2: څ<94>^?[.tH RPT 1: ^]S<9A>T YOUR: MY: }$^_<8E>/q(

Anyway, is showing callsigns supported in dsdcc? If not, could it be added? Sure would be useful!

--David
KI6ZHD

Basic Privacy (Question)

Hi
thanks for your job
i read etsi dmr document (ETSI TS 102 361-1 V2.4.1 (2016-02))
in page 21 Voice frame shows that contains 2108( =372 bit of voice)+48(sync or embedded)
before it delivered to ambe+2 voice decoder
in basic privacy as i read 255 of 16 bit keys is conceivable,
my question is that Where does 16 bit key apply? (it applies on 3*72 bits?
and 72 bits converts to 49 bits, Key must be XOR with 72 bits or 49 bits?
and how i can create 49 or 72 bits from 16bit key for xor to data
is there any suggestion that where can i find my answer?

Update:
Solved (49 bits of key xored with 49 bits input of vocoder)
thanks

Problems decoding on Raspberry Pi4

Hi team ,
just started to use my Pi4 as portable SDR few days ago , and times comes to decode digital voice .
i compiled and installed mbelib and DSDcc with following Cmake options
DUSE_MBELIB=ON -DLIBMBE_INCLUDE_DIR=/usr/local/include/ -DLIBMBE_LIBRARY=/usr/local/lib/arm-linux-gnueabihf/libmbe.so

I can decode prefectly Dstar sample , and none of other sample are working , ie :
pi@raspberrypi:~/dsdcc $ sox -t s16 -r 48k -c 1 samples/dmr_it_8.dis -t s16 -r 48k -c 1 - | dsdccx -i - -fa -o - | play -q -t s16 -r 8k -c 1 -
DSDDstar::reset_header_strings
DSDDecoder::resetFrameSync: symbol 0 (0)
Digital Speech Decoder DSDcc
DSDDecoder::resetFrameSync: symbol 0 (0)
Enabling auto frame decoding.
DSDDecoder::resetFrameSync: symbol 0 (0)
Opened - for input.
Opened - for output.
Sync: +DMRd DSDDecoder::run: good sync found: 10 symbol 298 (12851)
DSDDecoder::run: before processFrameInit: symbol 299 (1717)
inlvl: 90% DSDDecoder::resetFrameSync: symbol 352 (3106)
play WARN alsa: can't encode 0-bit Unknown or not applicable
Sync: +DMRd DSDDecoder::run: good sync found: 10 symbol 586 (12809)
DSDDecoder::run: before processFrameInit: symbol 587 (1737)
inlvl: 101% DSDDecoder::resetFrameSync: symbol 640 (3183)
Sync: +DMRd DSDDecoder::run: good sync found: 10 symbol 874 (12496)
DSDDecoder::run: before processFrameInit: symbol 875 (1637)
inlvl: 100% DSDDecoder::resetFrameSync: symbol 928 (2896)

..
... (tons of similar line)
...
sometimes :
DSTAR HEADER: RPT 2: څ?[.tH RPT 1: ?S?T??? YOUR: ?????? MY: }$????/?q(?
..
...
inlvl: 98% DSDDecoder::resetFrameSync: symbol 94816 (2617)
Sync: +DMRv DSDDecoder::run: good sync found: 12 symbol 94906 (-12818)
DSDDecoder::run: before processFrameInit: symbol 94907 (-5292)
inlvl: 100% ==No more input
End of process
pi@raspberrypi:~/dsdcc $

also tried with DSD and i have issue to ( no audio ) .

any clue to help me moving forward ?

thx, 73'
Tom

Golay(24,12) decodong error

Hello! I founded, thay golay(24,12) doesn't correct errors, if error occur in the integrity bits.
Example 1: 12 data bits / 12 integrity bits. Add 3 error in data[0], data[1], data[2] -> correcct all 3 errors.
Example 2: 12 data bits / 12 integrity bits. Add 3 error in data[0], data[1], integrity[0] -> doesn't correcct.

Implement encoder part

This will have to use the hardware AMBE encoder as no soft encoder exists to this date. Use of alternative encoders/decoders (like CODEC2) will be covered in another ticekt

Standards priority from top to bottom:

  • D-Star
  • DMR
  • YSF
  • dPMR

DSDCC only decoding data

First off, THANK YOU for this!! It fills a much needed hole in the dsd world, decoding content without requiring special audio configuration.
I've been getting back into Ham radio and exploring digital modes,. What I am trying to do is use an RTL dongle attached to a raspberry pi as a remote "scanner" on a low-bandwidth connection. For testing purposes I've been using a nearby DMR signalwith the following command:
rtl_udp -f 451.075M -s 70k -r 48k -| dsdccx -fr -T 3 -U 0 -i - -o speech
"speech" is a named pipe that is picked up by the software I am using to package the stream.
I have tried using -T 1 and -T 2 as well; however my understanding is that -T 3 would look at both timeslots for voice. I have also tried it without -U 0 and with -x. I've tried looking through the code; however I am not familiar enough with the hardware/protocols to make any changes.
I have heard voice a couple of times; however, I am primarily only seeing data packets. I have tried it on multiple frequencies and get the same behavior. I attached the debug output for reference.
dsdcc.txt.

Help me to develope DSDcc code

Hello
I wanna modify the DSDcc or DSD source code for my university project. please tell me how can I able to compile these codes in visual studio C++ and what tools do i need ?
Do you have any tutorial or document which show all necessary steps to compile these source codes in C/C++ programing environment ?

DSD back compatibility ?

Not sure where it is appropriate to ask the question.

Is dsdcc compatible with dsd ?
can i just rename /usr/local/bin/dsdcc to /usr/local/bin/dsd and possibly any integration already using dsd would still function ?

It would be a good addition to the documentation or Readme.md to make this clear:

  • If dsdcc can act as replacement for dsd
  • In what capacity could dsdcc be compiled in a way that replaces/updates dsd usage. (Particulary if it`s just outputting audio then it should be capable of being an updated replacement.
  • where would it be not recommended to do this ? or is is simply recommended to not do this.

Or Something in the Wiki for the project.

Regards,
Sam

DSDcc does not compile if mbelib AND SerialDV are not installed

This has been reported here: http://www.qsl.net/kb9mwr/projects/dv/pi-rtl-dsd-experiments.pdf

In fact this is true and I understand it can be annoying if you have only one or the other. DSDcc should compile if only one, both or none of these dependencies are met.

Indeed building without any of these dependencies would work but the result would not produce any sound or sound file. Yet it is a provision for future developments where only the MBE frames are needed as output (for a repeater for example).

What exactly does dsdcc want as input ?

I have looked for the answer and I found one comment 15 kHz NBFM. The program decimates the input to a bandwidth of 15 kHz, decodes it as FM, then interpolates to bandwidth of 48 kHz and scales the data to a 16 bit signed integer - this decodes NBFM speech perfectly. It processes the data in blocks of 4800 S16LE (i.e. 1/10 of a second) and writes out the blocks. Is that what dddcc wants ? I get parts of words it seems to translate about 1 out of 10 of the blocks. I am scanning and trying to decode the P25 channels that my IC-R30 decodes nicely.

Jolie démodulateur faites-le fonctionner avec un meilleur graphique s'il vous plaît de plus en plus je viens .

Le démodulateur je veux que le graphique soit une un peu modifié avec un graphique qui soit joli et agréable au visuel si vous pouvez en créer un ça ça serait intéressant dans l'évolution j'ai vu que vous pouvez trouver des cryptage spécialisés aussi pour les radios amateurs. J'ai vu la fontaine beaucoup plus jolie sur le graphique mais je voudrais aussi que le décodeur soit beaucoup plus joli graphiquement si possible si vous ne pouvez pas ce n'est pas grave mais ça m'intéresse et j'aime bien votre DSD j'ai pu avoir beaucoup de décodeur que je que j'ai eu. 👍🗣️

dsdccx failed to replay/decode dmr_it_8.dis sample

I have dsdccx compiled with mbelib enabled, and successfully decoded the ysf/dstar files under sample folder with command listed in the readme file, but no luck on DMR sample.

The command line used:

sox -t s16 -r 48k -c 1 dmr_it_8.dis -t s16 -r 48k -c 1 - | dsdccx -T2 -i - -fa -o - | play -q -t s16 -r 8k -c 1 -

outputs:

...
DSDDecoder::run: before processFrameInit: symbol 95339 (1675)
inlvl: 96% DSDDecoder::resetFrameSync: symbol 95392 (1571)
Sync: +DMRd DSDDecoder::run: good sync found: 10 symbol 95626 (11727)
DSDDecoder::run: before processFrameInit: symbol 95627 (1831)
inlvl: 101% DSDDecoder::resetFrameSync: symbol 95680 (2794)
No more input
End of process

OS:

Darwin dev.local 16.7.0 Darwin Kernel Version 16.7.0: Tue Jan 30 11:27:06 PST 2018; root:xnu-3789.73.11~1/RELEASE_X86_64 x86_64

P25 decoding

I saw this issue at the SDRAngel repo:

f4exb/sdrangel#195

I added the issue here, since it looks like it was never added over here. I would also love to see P25 decoding support in DSDcc/SDRAngel, then it would be the single solution for everything. Currently I switch to GQRX piped into DSD for P25 decoding.

A good place to get P25 traffic on your PiStar is the 420 p25.evsuperfreqs.com reflector. Its very active since its a P25/YSF/DMR/NXDN multimode. This also lets you transmit on one of the other modes and get P25 output when desired when you don't have a P25 radio.

How handle inverted dmr signal

hi
thanks for code
How does this code deal with inverted-dmr signals.
i compared code with dsd and some changes seen here.
for example in dsd if inverted option selected dibit inverted when necessary, but in your code there is no option for inverted signal on dmr.
First, there is a decoding of the inverted-dmr signal in this code?
thanks

NXDN and dPMR descrambler (Question)

Hi -
Just like the recently implemented MotoTRBO Basic Privacy feature, do you have any consideration in implementing a similar dPMR and NXDN 15-bit descrambler feature to DSDcc?

Both scrambling methods are very similar and well documented.

Thanks in advance for your input.

Highpass filter for mbelib audio

It appears that audio processed through mbelib leaves undesirable low frequency components. The voice understanding can be improved with a high pass telephone type (> 300Hz) filter.

In fact the IIR filter used in the interpolator cat be set to be either lowpass therefore without this additional filter or bandpass therefore with the additional filter. It is just a matter of coefficients that can be calculated with Python scipy.

Can't build from source

I am following the instructions on the sdrangel page to build this required library.

When it's time of dsdcc I get this.

No rule to make target '/opt/install/serialdv/lib/libserialdv.so', needed by 'libdsdcc.so'. Stop.

I am on Ubuntu Ubuntu 19.04 and ran the prerequisite apt command to install the necessary package.

Thank you

dsdccx uses in_file and out_file without initializing it

Invoking dsdccx without arguments produces this:

DSDDstar::reset_header_strings
DSDDecoder::resetFrameSync: symbol 0 (0)
Digital Speech Decoder DSDcc
Cannot open @Ò~Hþ� for input. Aborting

(cm256_{rx,test,tx} seem to have the same problem, fwiw.)

Race condition in DSDSymbol

This has been discovered in SDRangel because the decoder parameter settings and the sample feed run in different threads. It is reported here: f4exb/sdrangel#406

This becomes an issue with this line of code: https://github.com/f4exb/dsdcc/blob/master/dsd_symbol.cpp#L265

This can cause a divide by zero if m_count is reset in a different thread. It could be possible to use mutexes but a simple guard code like this could fix the issue:

        if (m_count == 0) // out of sync for example because of race condition
        {
            m_sampleIndex = 0; // return to the beginning of a symbol
            return false;      // and wait for next sample
        }

In fact if m_count is 0 it means we should restart symbol search from the beginning and that no symbol was discovered.

Moto BP not working, testing possible

My apologies for opening like the third or fourth issue about Motorola Basic Privacy.

This added functionality was for me the reason to try DSDcc; installing it was a breeze on debian, currently have running it with rtl_fm. Running dsdccx -h showed me the following: "-k Number of Basic Privacy key for DMR [1..255]"

For clear DMR I use the following command:
rtl_fm -f [FREQUENCY]M -M fm -g 1 -s 70K -r 48K -E dc - | dsdccx -fr -i - -o - -U 0 -g 50 | play -q -t s16 -r 8k -c 1 -
It decodes audio just fine with non-BP encoded DMR.

I own a Motorola radio which supports DMR and Basic Privacy, so I can test all I want when I want, with the BP key known, it is currently set to 128.
For BP DMR I use it with option flag "-k 128":
rtl_fm -f [FREQUENCY]M -M fm -g 1 -s 70K -r 48K -E dc - | dsdccx -fr -k 128 -i - -o - -U 0 -g 50 | play -q -t s16 -r 8k -c 1 -
However, this output doesn't provide a descrambled audio feed, it is very much still garbled. However, as I own a BP-capable radio, I would be more than happy to provide hands-on raw decoder data and assist anyone with fixing this feature.

P25

Is it feasible to port the P25 code from DSD in to DSDcc? What are the general steps that would be required? If the other modes could be used as a template, and it wouldn't be futile, I'd like to try to implement P25p1.

Enhancing NXDN (and maybe others) sync pattern detection

Down in this tweet here https://twitter.com/LouisErigHerve there is an interesting suggestion to tolerate some errors on the sync pattern in order to increase the probability to detect it mitigating false positives by not tolerating too many errors (just one for NXDN):

Does someone have info about IDAS NXDN Sync pattern ?
I'm having trouble detecting synchronization words...

I made tests with an IC-F4161DT, sometimes frame sync are well detected and sometimes not...

Tried DSDCC (see F4EXB GitHub) => Same problem
Tried DSD+ => Fully functional pic.twitter.com/GbiDsn0Xse

— Louis-Erig HERVE (@LouisErigHerve) June 14, 2020

This deserves to be experimented at least and committed if it really improves things when conditions are not so good. It could even be extended to other modes. NXDN has the shortest sync sequence so if you introduce a 1 symbol tolerance on it and it works you can surely do the same for the others.

Edit: the tweet was just the initiator. The core of the improvement is actually here: LouisErigHerve/dsd@b98276f

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.