Giter Site home page Giter Site logo

dsd-fme's Introduction

Digital Speech Decoder - Florida Man Edition

DSD-FME is an evolution of the original DSD project from 'DSD Author' using the base code of szechyjs, some code and ideas from LouisErigHerve, Boatbod OP25 and Osmocom OP25, along with other snippets of code, information, and inspirations from other projects including DSDcc, SDRTRunk, MMDVMHost, LFSR, OK-DMRlib, and EZPWD-Reed-Solomon, Eric Cottrell, SP5WWP and others. Finally, this is all brought together with original code to extend the fuctionality and add new features including NCurses Terminal and Menu system, Pulse Audio, TCP Direct Link Audio, RIGCTL, Trunking Features, LRRP/GPS Mapping, P25 Phase 2, EDACS, YSF, M17, OP25 Capture Bin compatability, etc. DSD-FME is primarily focused with Linux Desktop users in mind, so please understand that this version may not compile, compile easily, or run correctly in other environments.

This project wouldn't be possible without a few good people providing me plenty of sample audio files to run over and over again. Special thanks to jurek1111, KrisMar, noamlivne, racingfan360, iScottyBotty, LimaZulu, Forts, thewraithe2008, RayAir, Cretu, ilyacodes, and others for the many hours of wav samples and information provided by them. Most importantly, HRH17, whose insight, information, samples, and willingness to let me remote into a computer half-way across the globe in order to test trunking features are what make DSD-FME what it has become. I'd also like to thank mrscanner2008 for providing an additional remote where additional NXDN Type-C, 'Idas' Type-D, and XPT decoding and trunking could be sorted out. Thanks to volo-zyko for cleaning up a lot of code. Thank you everybody.

DSD-FME

DSD-FME

Information

See the examples folder for information on cloning and installing, example usage, and trunking examples.

License

Copyright (C) 2010 DSD Author GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

dsd-fme's People

Contributors

axpe95 avatar balr0g avatar chronosxyz avatar dreinhold avatar edfuentetaja avatar ilyacodes avatar jpwichern avatar kuzvlad avatar linuxsheeple-e avatar lwvmobile avatar lz2dmv avatar midnightmagic avatar ra1nb0w avatar robotastic avatar szechyjs avatar volo-zyko avatar waffle-iron avatar yinette 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

dsd-fme's Issues

NXDN - Increase Various Array Sizes to Accomodate Longer Message Types and Mitigate Erroneous Decodes/Segfaults

Currently, we are passing a variable sized message to the NXDN_Elements_Content_decode function, but depending on the message, we could exceed an array bounds by trying to, for example, erroneously send a site_info or adj_site info CAC/CCCH only message from a 72-bit sacch message where some elements reference a bit depth greater than 72 bits, and get garbage decodes (at best) or worse case scenario, cause a segfault crash.

Usually, DSD-FME will safeguard against this by requiring good CRC values, but the user can disable/bypass those if desired.

Also, some arrays are not currently initialized with memset so its possible that they have garbage fill and could possible cause some erroneous decodes on certain elements where they don't have a zero fill. This could lead to issues where the same message types exists on CAC/CCCH, FACCH1, and FACCH2, but certain elements will be 'optional' or only present on CCCH and not FACCH1, etc. See example below:

Screenshot from 2023-04-12 14-17-43

To mitigate some decoding issues, I will be expanding some array sizes and memset with a zero fill arrays that

Crash on windows (pulseaudio out)

Hello! After updating to aero-100, got following error while trying to open menu:

Assertion 'p' failed at /usr/src/ports/pulseaudio/pulseaudio-11.1-1.i686/src/pulseaudio-11.1/src/pulse/simple.c:273, function pa_simple_write(). Aborting.
                                                                                                           0 [main] dsd-fme-aero 709 cygwin_exception::open_stackdumpfile: Dumping stack trace to dsd-fme-aero.exe.stackdump

my arguments for launch:
-i tcp:127.0.0.1:7355 -o pulse -N -fi

This also happens when dsd-fme is trying to send data to audio output, it seems.

Win10, just in case.

Piping input

Hello, as we can mention "-i rtl" and pipe-in stream from Rtl sdr.
Is there a way i can pipe-in input from any other SDR ?

Thanks.

P25: Add SVC OPT decoding on Applicable Voice Grants; Allow User to Toggle Following Encrypted Calls;

For P25 systems, many (but sadly not all) channel grants have service options much like the usual link control information, and I am adding the extra decoding for these grants and going to include a toggle for users to select if they want to follow or not follow any encrypted p25 channel grants (most would probably not want to by default, but the toggle will be turned on by default for reasons below)

The only issue with this, is that some abbreviated/implicit/mfid90 grants do not have available service options, so the option is to either not allow trunking on those particular ones when the toggle is turned off, or allow it and also allow some encrypted calls to be trunked. Currently, I am unsure if this may or may not affect tuning to channel grants that aren't enc just by excluding them when attempting to not tune to encrypted channel grants. I've seen some systems use multiple forms of channel grants (initial and updates) so its possible that it may still tune fine, or that it may not tune clear voice channel grants when toggled. it really just depends on the system setup and manufacturer.

Anyways, its just going to be an option to the user (sadly, I don't see any other format) that has the service options (or similar) available in the call grants, so we can't preemptively filter those out. Users will need to use a group.csv file with blocking if they wish to filter those groups out from tuning.

WIP: Provoice Conventional Framesync

I've recently received a batch of Provoice Conventional samples where no known software had the ability to sync on the sample. What I have found is that Provoice Conventional has two factors going on. First, it has a different framesync pattern, but otherwise, appears to operate exactly like the usual batch of Provoice. Second, in the different framesync pattern, we see a shorter framesync pattern of 16-bits that is always the same, and the next 16-bits of the Provoice Sync Pattern correlating to TX/RX address personalities that are programmed into the radio making up the second half of the framesync pattern. For comparison, the normal PV framesync pattern is 32-bit (PV is 2 level GFSK, so its not dibit based, but one symbol = one bit)

This of course, leaves me wondering, if the framesync pattern on all Provoice is 16-bit and the other 16-bit is another value entirely, its just that every repeater uses the same value, or if this is an intentional occurrence on the frame sync pattern. Here is a snippet from the radio personality manager used to program the radio to send me the samples.

Screenshot (125)

The TX address is 8-bit and the RX address is 8-bit, thus our 16-bits on the second part of the frame sync being different. According to this, both parties have to have the same addresses programmed or they will not unmute. So, looks like this is either accomplished by having the frame sync pattern change depending on the programmed TX/RX value, or, the sync pattern is only 16-bit, and those values are the very next values sent. Here is my findings across multiple samples with different TX/RX values.

In this pattern (inverted polarity, the norm for PV) 3 is bit 0, and 1 is bit 1 (2 level GFSK)

                 //same pattern  //TX     //RX
Sync Pattern = 3131311133313313 31331131 31331131 TX/RX 77  -- 31331131 symbol = 01001101 binary = 77 decimal
Sync Pattern = 3131311133313313 33333333 33333333 TX/RX 0   -- 33333333 symbol = 00000000 binary = 0 decimal
Sync Pattern = 3131311133313313 33333331 33333331 TX/RX 1   -- 33333331 symbol = 00000001 binary = 1 decimal
Sync Pattern = 3131311133313313 13131133 13131133 TX/RX 172 -- 13131133 symbol = 10101100 binary = 172 decimal
Sync Pattern = 3131311133313313 11333111 11333111 TX/RX 199 -- 11333111 symbol = 11000111 binary = 199 decimal
Sync Pattern = 3131311133313313 31313131 31313131 TX/RX 85  -- 31313131 symbol = 01010101 binary = 85 decimal

I have written some code that can framesync based off of the shortened framesync pattern and read the TX and RX values, and then forward to PV voice decoding, and it is working decently. There is an issue, due to the short framesync, with occassional false positives (not even nearly as bad as NXDN though), so I am going to make this a cmake option only kind of thing, where the user has to specify whether or not to turn on this framesync pattern when compiling. That being said, the image above shows the default value of TX/RX at 85, so I will allow that to be enabled always, so if users have their own radios programmed to conventional on 85, then it will framesync just fine since we have a hard 32-bit pattern that doesn't pop false positives.

cmake -DPVC=ON .. will disable the 85 default, but allow all PV conventional at the risk of occassional frame sync false positives. Using squelched source audio highly recommended for using this mode. -fp option will still be required to enable provoice decoding.

Leaving it off will allow only default personality PV Conventional TX/RX85.

Nether option disables the already established PV/EDACS sync patterns as that behaves extremely well due to their long sync patterns.

With PVC on in cmake, decoding PV Conventional will look like this:

03:55:30 Sync: -PV_C  TX: 0 RX: 0  VOICE
 N64: 6969696969696969
 LID: 0000 FF83DF1732094ED1
 IMBE 6C00000000000000000000 err = [0] [0] 
 IMBE 6C00000000000000000000 err = [0] [0] 
 BF: 2175 
 IMBE 6C20120090000012000024 err = [0] [1] 
 IMBE 0C1F49190F004012058029 err = [1] [0] 
03:55:30 Sync: -PV_C  TX: 0 RX: 0  VOICE
 N64: 6969696969696969
 LID: 0000 FF83DF1732094ED1
 IMBE 584384092820003874AE2C err = [1] [1] 
 IMBE 540D8C53D1E000CCEDC94C err = [1] [0] 
 BF: 2175 
 IMBE 0C0CEE465C60346C94651D err = [1] [1] 
 IMBE 0C149EB66360239D5B826D err = [1] [0]

This code will need a round of testing, along with the rest of the updates. Hopefully, it'll be ready to go sometime this weekend, barring any major issues.

No Color Cmake Build Option

Next Commit Batch Push will have a cmake option -DCOLORS=OFF to allow users to disable color in both console output and the ncurses terminal when building and compiling dsd-fme.

When building, instead of running cmake .. user will run cmake -DCOLORS=OFF .. if they want to disable, colors will remain on by default.

Screenshot from 2023-04-13 08-13-17

Screenshot from 2023-04-13 08-11-53

Decription tools

greetings to everyone........can basic privacy be decrypted with this version of dsd? functions like dsdplus can be implemented ..... such as id display and others? thanks

Originally posted by @romanremus in #79 (comment)

It would be nice to have decryption features

Add Active Channel Display to Ncurses Terminal

Following addition will add active channel display to the ncurses terminal when decoding any sort of trunking based signal. Currently, this is done with P25 and EDACS, but I am going to expand it to cover all known trunking formats. I feel this will be most useful on systems like Cap+, and XPT (distributed trunking), but will also be on DMR TIII, Con+, NXDN Type C and Type D, but will most likely be limited to which channel is currently tuned, or otherwise will just swap in the last decoded channel update in case of multiple updates on a control channel.

I had considered using a tree-view instead, each on a separate line, but the code for that would get a bit complex and this is just meant to see channel activity at a glance so it will be a simple one line addition to the ncurses terminal for simplicity of coding and preservation of my sanity.

Proposed Examples:

Screenshot from 2023-04-30 23-41-47

Screenshot from 2023-04-30 23-46-11

Screenshot from 2023-04-30 23-39-11

Screenshot from 2023-04-30 23-54-47

Update will be pushed in the next batch of updates, whenever that may occur.

WIP: Testing NXDN Frame Sync Improvement Ideas and Discussing Demodulator/Buffer Woes;

This isn't so much as something that is coming out soon, as much as it is some ideas and things I am trying to test out regarding NXDN Frame Sync related woes, in particular, the short Framesync Pattern (10 symbols FSW) can cause tons of false positives on plain noise if you don't squelch it. The simple answer is to say 'just use squelch' and I highly recommend that squelch is used on NXDN to prevent false positives. There is a reason NXDN is currently disabled by default in DSD-FME unless explicitly turned on.

All that being said, I have been doing some testing and trying things to see how to mitigate the FSW issues.

First, the easiest thing to say, is that currently I have (or will be with the next batch of commits) have where the user will not see any sync or false sync (unless payload printing is turned on) until it passes with a good lich parity. That being said, lich parity is 1 bit parity, so false positives happen on that all the time. I've made a few tweaks to not even turn on carrier until after the parity check passes, so that will also help with the Sync: No Sync: happening quite often.

The other thing I have tried to do is to, in addition to above, is to change the conditions of the FSW. Up to current, going way back to 'DSD Author' the symbol_p buffer holds demodulated symbols as a hard 1 and 3 symbol, which is fine for most sync patterns, except NXDN, which has a FSW pattern of (-3, +1, -3, +3, -3, -3, +3, +3, -1, +3), or hex value of 0xCDF59 when converted to dibit values. If you take this pattern and convert it to how the open source dsd project handles framesync patterns, the value for FSW would need to be something like 3031331121, which, if you can only work with 1s and 3s, you can't get this value out of the current demodulator when looking at framesync. (I should note that during framesync, we don't attempt to demodulate actual 4-level dibits, which, if it could do that, would be a lot more beneficial here and take away half the problems with this issue)

The way Louis Erig Herve found to work around is to compare the string in the synctest and say if it has one error, then we can proceed, which works well enough for most sync when you turn on squelch and don't feed it noise. The issue with this comparison, is which symbol is allowed to be in error. If any of them can be in error, but only up to one, that allows a lot more framesync issues than we need. Instead, we can narrow this down to symbol errors in 2 positions, where the 0 and the 2 are. Even further, I think we can rule out the 0 position, since that should always be the low and result in a '1' from the demodulator. Currently, I have in testing some code for doing an exact comparison between 4 values for FSW (as opposed to checking the string and letting it pick if any of those 10 symbols and saying this is a FSW but in reality, its just noise. I think this may also be able to be down to check for two FSW values, but currently it is at four. We can look for the exact string values and I have had pretty good luck in testing with getting good patterns with just these four, implemented like this

else if ( (strcmp (synctest10, "3131331131") == 0 ) ||
              (strcmp (synctest10, "3331331131") == 0 ) ||
              (strcmp (synctest10, "3131331111") == 0 ) ||
               (strcmp (synctest10, "3331331111") == 0 )   )

These four values above, 3131331131, 3331331131, 3131331111, 3331331111, are all the variations you get from 3031331121 when the 0 and the 2 will be filled with a 1 or a 3. I believe I may be able to narrow this down further to just two of these four values, 3131331131 and 3131331111 since i believe that 0 will always result in a 1 during framesync here.

The inverse values are used to check for inverted polarity.

Another thing I am trying out is the theory, that when there is just plain noise, or lack of signal, the audio level is much louder than an organized signal. We can use that to say, limit when we allow FSW frame sync based off of the state->max value. If the value or its average is extremely high, then we most likely just have a ton of noise. If the max drops down to a certain range, then it is more likely organized signal. I made a secondary condition to check the state->max value, which is essentially like the inlvl, and say if it is above a value, then don't proceed, but if it falls low enough, then allow it to sync up. I've found this works extremely well and allows me to turn off squelch on nxdn decoding and rarely get false sync. The downside to doing is is that the user will need to be mindful of the audio input gain level, and may need to lower the gain in order to get good frame sync on signal and not on noise. Another downside is that this still will not allow NXDN to be autodetected as opposed to intentionally turned on as is, as any organized signal (DMR, etc) will still trigger a false sync pattern.

In the upcoming batch of updates, NXDN sync tests will be a cmake option, so users can toggle them on if they want to try it. It will be highly volatile and subject to change though, so probably don't use it unless you just want to see it in action or similar.

cmake -DNXDN=ON .. will enable the test sync patterns and conditions for NXDN and building without it will be the same as before.

One last thought or two on NXDN Framesync and related problems, however.

First, one idea regarding NXDN framesync, we currently store patterns in a long synctest_p buffer. What we currently do for most synctests is to just grab the last x bits off of the buffer and compare it for framesync. The thing is, the buffer goes back pretty far, so we could just look at the current offset for a sync, then go backwards an nxdn frame worth of symbols and see if there was a FSW back there too, and then judge based off of that and say, okay, now we are really in a framesync. This one might be easier to implement since its already there, just needs to be tested/evaluated. Another idea would be a buffer where we store dibits, and when we get a framesync, we can store dibits. When we have a few FSW, then we can start to decode them and see if its just garbage data, and then if it is good data, then start voice and presenting data to the user. If its just garbage after several syncs then just discard all of it and the user never sees this happen behind the scenes. This option would require rewriting and careful layout. Something like a circular buffer for dibits. The only thing this idea brings me to logically is my second point.

Second, the most obvious solution to a lot of the issues with the framesync (along with DMR dibit buffer storage and P25 LSM), and other related issues. Is to re-write the code for framesync, the symbol buffer, demodulator, etc. Basically, in the long run, I will want to start at framesync, working backwards to everything involved, and rip it out and rewrite it entirely, or do major overhauls to it. I must admit, that would probably take me a year or more to do, and most of it would be spent learning as I go and/or trial and error. I really need to study demodulation, dsp, and buffers better and get a better grasp on it. For now however, I am okay with just working on things I can work on, adding a little here and there, and making what works today work a little better. I honestly think that starting from scratch would be a better option than rewriting tons of the demodulator related issues.

Hashed TG Keys Not Loading Correctly Due to Variable Type Error;

Hello
comment when entering TG with length 7, B-P KEY doesn't work.
Example:
TG=2025000 KEY=44
Result in terminal
Logging Frame Payload to console
Hashed Key [47331] [00044]
Enabling NCurses Terminal.
OSS Input /dev/dsp.
OSS Output /dev/dsp.
Audio In/Out Device: /dev/dsp

Greetings

Cygwin Build Info

I recently deleted the Cygwin branch due to it being out of date with the main project on the pulse audio branch, and with the same amount of work, the pulse audio branch can be built and run in Cygwin anyways.

Prior to deletion, I pulled the cheat sheet screenshots for cygwin dependencies and the build instructions, I'll post them here for reference. Also, note, if you really want to use the old precompiled WIndows version, build 9044, it should still be available in the release section, along with the source code.

Again, this is informational only, and I will not support users attempting to build in cygwin due to the myriad of little issues that come up with dependencies, performance issues, and so on. I highly recommend using a Linux VM if you are a Windows user and wish to use DSD-FME.

https://github.com/lwvmobile/dsd-fme/releases

##CYGWIN Dependencies - Install using the Cygwin Installer##

dep1

dep2

dep3

dep4

wget -O itpp-latest.tar.bz2 http://sourceforge.net/projects/itpp/files/latest/download?source=files
tar xjf itpp*
#if you can't cd into this folder, double check folder name first
cd itpp-4.3.1
mkdir build
cd build
cmake ..
make
make install
cd ..
cd ..

git clone https://github.com/lwvmobile/mbelib
cd mbelib
mkdir build
cd build
cmake ..
make
make install
cd ..
cd ..

git clone https://github.com/lwvmobile/dsd-fme
cd dsd-fme
git branch -a
git checkout remotes/origin/pulseaudio
git checkout -b pulseaudio
git branch -a #double check to see if you are on pulseaudio branch
mkdir build
cd build
cmake ..
make

//After make has successfully completed, go into the mbelib/build folder and copy cygmbe-1.dll and paste it into the dsd-fme/build folder.

##rebuild in cygwin from pulse audio branch for subsequent updates##

##Open your clone folder##
git pull https://github.com/lwvmobile/dsd-fme pulseaudio
##cd into your build folder##
cd build
cmake ..
make
##only run make install if you want this to be your main DSD install##
make install

NCurses Terminal inside of Windows Command Prompt

Just a heads up to anybody who uses the windows RC releases with the ncurses terminal, you may want to disable all the edit mode options in the command prompt. You can right click on the command prompt window title bar and select defaults, then you will want to uncheck all the boxes in Edit Options and Text Selection.

I've found that with these enabled, left clicking randomly inside the ncurses terminal will cause text to be highlighted, and this stops FME from working until you exit by right clicking. Conversely, if you right click more than once, or right click in the command prompt will ncurses terminal is running, it sends random keyboard shortcut keys to FME, changing its setting and most likely killing your session until restarted. By disabling all the default edit options, i've found this behavior stops happening, and things just work properly without the fear of accidentally clicking something in the prompt and making you start it again.

Screenshot_89

Scrub ANSI Color Characters ( [36m ) from Log Files

Log files may end up containing lots of ANSI color characters which may display as random garbage things in your logs when viewing in a text editor. A good way to scrub these logs is to use the ansi2txt tool available either in ubuntu repo as 'colorized-logs':

sudo apt install colorized-logs

or to build the software and install it from the github page from kilobyte.

Use of this scrubbing technique is to use anisi2txt in this manner:

cat logfile.log | ansi2txt > cleanedlog.log

To append to a current log instead, just use two >> instead of one.

cat logfile.log | ansi2txt >> appendedlog.log

Going forward, DSD-FME will contain lots of color text in the console, and there is no easy method to simply disable this at current, so this is the best method to clean your logs up in post if you are keen to keep long logs and view them in text editors and not just view the data in the terminal.

I also believe some text editors like atom have support for ANSI color characters, but I'll have to do more research on this and find out. Any other use suggestions are more than welcome.

NXDN DFA Base Value Error

uint32_t base = (ca_info >> 19) & 0x7; //Base Frequency

Current code grabs the wrong 3-bit value for the NXDN DFA base frequency. The shift value needs to be changed from

>> 19 to >> 18

Code will be fixed in future commit along with a few other additions (NXDN ADJ_SITE_INFO) and other various minor NXDN Message tweaks in the next few days. New Compiled RC5c will be issued on the next weekend as well, barring any other 'major' issues being discovered.

DMR - Cap+ Channel Status CSBK Block Number Counting Issue

state->cap_plus_block_num++;

Just noticed an coding flaw on Capacity Plus CSBK 0x3E "Cap+ Channel Status" whereas when have multiple blocks for the PDU, we aren't counting them correctly. To be more precise, when the code was reworked and expanded to include 16 LSNs, I had originally discovered the need to seperate each timeslots blocks and store them seperately. The problem is is that I did not account for the appended block counter, which also needed to be seperated by timeslot.

While the code worked fine for the samples and systems that I had (to my observation) this is still an issue and could cause issues on handling appended blocks, and the fix should be simply just to count each timeslot's appended blocks seperately. I have already made the few minor changes to code, and will do a round of testing on a few systems checking for proper block appending before committing the code changes, making sure its still decoding and trunking fine and whatnot.

Recording Output synthesized speech as .wav file

The -w option helps to record Output synthesized speech to a .wav file,but it works for legacy auto modes only.
Request if code can be modified to support recording output as wav file for all modes?

NXDN -- Reset SACCH Superframe and CRC Validity to clear out stale values.

I've identified an issue where the SACCH Superframe and its CRC Validity isn't reset often enough (it happens quite a bit) but more specifically, we need to reset the entire structure after reading in a completed superframe and decoding its message. It is currently possible, due to how each SACCH segment in a superframe is collected, and its CRC validity stored, that a random SF Part of Field could be missed, or the final part of field collected out of order, and yet since we accumulated all good CRC values on the individual segments, we decode the SACCH superframe as being correct, even if it could possibly contain stale values from another message type. SACCH superframes are run on its final part of frame, but again, if we are missing a part of frame (due to marginal or bad signal) but somehow, the other segments have valid CRC, and the missing segment from a previous message's part of frame was still stored as valid, we erroneously decode it. This doesn't happen often, but can cause random issues when, for example, one superframe SACCH message contains an ALIAS, and the next, a VCALL. This alternating message pattern could cause stale bits to remain in a new message.

I have identified a few extra areas to reset the SACCH superframe field, including right after decoding it, and also after decoding non-superframe SACCH. We are already resetting on bad lich, loss of carrier signal, when tuning during trunking operations, and during DISC or TX_REL events.

This is one issue with each Part of Frame having an individual CRC, but the completed message NOT having a CRC. Its fine for NSF SACCH, but causes issues with proper SACCH Superframe Message decoding if not taking care to reset the superframe and its CRC validity from storage when after decoding a completed message.

These 'fixes' will be in the next batch of updates along with the next batch of commits pushed.

WIP: Use zDEV branch to consolidate 'Main' and 'Aero' Branches

Going to take a break from active coding for a while, but going to do a little work here and there to work on consolidating the 'Main' and 'Aero' branches into one codeset so I won't have to keep trying to maintain both of them at the same time, even when its only just copy and paste from one to the other in most cases, it still becomes tedious to double check that I'm doing the same things in both while being mindful of the changes required for Aero (OSS garbage mostly) and other little odds and ends.

Will also use the branch to attempt to 'fix' the rtl input issues I'm having, and whatever else comes along.

So, plan is just to make them one codeset, but will be in zDEV for a while until I'm sure its all good to go.

Output in WINDOWS (-o)

How do I see in Windows OS the device path of the dedicated sound card through which I want to transfer the sound?
(I tried through the device manager and it didn't work)

[tcp] Restart network connection after disconnect?

Hello! Just started using DSD-FME.
I noticed that after you connect TCP (i use SDRAngel) and DSD, in case of connection timeouts or goes down (ie i switched something in SDRAngel that took several seconds to apply) DSD-FME falls back to pulseaudio input. I wonder if it's possible keep checking for connection instead of going to menu and restarting TCP (or restarting DSD-FME).

Stolen code ?

I'm a bit surprised, because after analyzing some part of your DSD-FME code, some functions are very, very similar to my private DSD code (same variables/functions name, same comment, same layout...) and I suspect this code has been stolen...

Example : The PI header decoding function (ProcessDmrPiHeader) is not included in my public version of DSD but in your code I found almost the same code of my private version of DSD, how can you explain it ? Where did you get this code ?

Virtual Sink: pacmd commands no longer function in Ubuntu 22.10

Found out that pacmd commands no longer work in Ubuntu 22.10 to set up a virtual sink, but users will have to switch to using pactl command with the same syntax instead. Will make changes to the virtualsink.sh file when I can verify the pactl command works in other linux environments without issue, or will just make a secondary sh file to handle either case.


user@B550-AORUS-PRO-AX:~/dsd-fme$ ./virtualsink.sh 
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
user@B550-AORUS-PRO-AX:~/dsd-fme$ cat virtualsink.sh 
pacmd load-module module-null-sink sink_name=virtual_sink  sink_properties=device.description=Virtual_Sink
pacmd load-module module-null-sink sink_name=virtual_sink2  sink_properties=device.description=Virtual_Sink2

Instead, run:

pactl load-module module-null-sink sink_name=virtual_sink  sink_properties=device.description=Virtual_Sink
pactl load-module module-null-sink sink_name=virtual_sink2  sink_properties=device.description=Virtual_Sink2

This issue will probably continue to occur as more distros transition to pipewire. Looking into it more, if my understanding is correct, pacmd is to control an entire pulse server, and pactl only exposes a certain subset of that control, this is probably because pipewire is the server now and only exposes portions available in pactl. Just a guess.

dsd-fme issues building in old branch folder *resolved* delete/use new install folder.

Linux mudary1 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux.
Was running very well on pulseaudio, then installed the main branch and built that. Now my dsd-fme ncurses screen freezes. Any suggestions?

mudary1@mudary1:~/dsd-fme/build$ cmake ..
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (PulseAudio)
does not match the name of the calling package (PULSEAUDIO). This can lead
to problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindPULSEAUDIO.cmake:44 (find_package_handle_standard_args)
CMakeLists.txt:17 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/mudary1/dsd-fme/build

WIP: NXDN Type D - 'IDAS' Support: Ongoing Work

I have run across some Type-D 'IDAS' systems and will add some very initial support for them, the first step will be to just identify them as Type D or IDAS by using the relevant LICH codes found in Part 1-E Common Air Interface Ver.1.3 and having the console output a distinct frame sync pattern for those as opposed to NXDN48, and identify which elements are present in the LICH codes, i.e. SCCH, FACCH3, UDCH2, and any other confusing and superfluous acronyms you can think of.

Screenshot from 2023-04-13 13-59-26

17:48:15 Sync: IDAS D  L61 - Data   SCCH  VCALL
 Group Call - Half Duplex 4800bps/EHR - Src=20550 - Dst/TG=20550  VCALL
 Group Call - Half Duplex 4800bps/EHR - Src=20550 - Dst/TG=20550 
17:48:15 Sync: IDAS D  L77 - Voice  SCCH 
17:48:15 Sync: IDAS D  L77 - Voice  SCCH 
17:48:15 Sync: IDAS D  L77 - Voice  SCCH 
17:48:15 Sync: IDAS D  L77 - Voice  SCCH 
17:48:15 Sync: IDAS D  L77 - Voice  SCCH 
17:48:15 Sync: IDAS D  L77 - Voice  SCCH 
17:48:15 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:16 Sync: IDAS D  L77 - Voice  SCCH 
17:48:17 Sync: IDAS D  L77 - Voice  SCCH 
17:48:17 Sync: IDAS D  L77 - Voice  SCCH 
17:48:17 Sync: IDAS D  L77 - Voice  SCCH 
17:48:17 Sync: IDAS D  L77 - Voice  SCCH 
17:48:17 Sync: IDAS D  L77 - Voice  SCCH 
17:48:17 Sync: IDAS D  L77 - Voice  SCCH 
17:48:17 Sync: IDAS D  L77 - Voice  SCCH 
17:48:17 Sync: IDAS D  L77 - Voice  SCCH 
17:48:17 Sync: IDAS D  L61 - Data   SCCH  TX_REL TX_REL
17:48:17 Sync: IDAS D  L61 - Data   SCCH  DISC DISC


Later on, I'll chip away at adding handling for SCCH deperm/depunc, crc, and relevant message decoding. Same for FACCH3, and UDCH2. I have no time table for completing this, let alone being able to trunk it, but I would suspect it may work similarly to Capacity Plus or Hytera XPT based on the nature of Type D and its short bursts and 'free repeater' messages.

"Reset call history" bug and feature request "-i tcp with host parameter"

First: Well done work! I like it :)

1.) Reset Call Hiistory:
Performing will leave at least one (the last) entry.
Solution: Replace line 1382 in dsd_ncurses.c

  • for (short int k = 0; k < 9; k++)
  • for (short int k = 0; k <= 9; k++)

2.) -i tcp with host parameter
With every pull i have to change from localhost to real remote host inside coding ;(((

regards and 73

save each decoded sound to a separate file

Hi, is it possible to save each decoded sound to a separate file? e.g. when it receives something at 13:00 , it saves it as 2023-06-06-13_00.wav and then when it receives it at 13:10 for example, it does 2023-06-06-13_10.wav

Thank you

Remus Hot Topics Corner

  1. Download Ubuntu2204-220620.AppxBundle from https://aka.ms/wslubuntu2204.
  2. Copy the bundle in the same folder with these 2 scripts
    elevated.bat
    rem [BEGIN COPY]
    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    wsl --set-default-version 2

powershell -Command "Rename-Item .\Ubuntu2204-220620.AppxBundle .\Ubuntu.zip"
powershell -Command "Expand-Archive .\Ubuntu.zip .\Ubuntu"
cd Ubuntu
powershell -Command "Rename-Item .\Ubuntu_2204.0.10.0_x64.appx .\Ubuntu.zip"
powershell -Command "Expand-Archive .\Ubuntu.zip .\Ubuntu"
rem [END]

Install.bat
rem [BEGIN COPY]
powershell -command "Start-Process elevated.bat -Verb runas"
wsl --set-version Ubuntu-22.04 2
timeout 600
cd Ubuntu
cd Ubuntu
Ubuntu2204.exe install --root
wsl.exe DEBIAN_FRONTEND=noninteractive sudo apt update
wsl.exe DEBIAN_FRONTEND=noninteractive sudo apt upgrade -y
wsl.exe DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt install -y git make cmake libitpp-dev libsndfile1-dev portaudio19-dev gcc g++ sox librtlsdr-dev libncurses5-dev libncursesw5-dev pulseaudio libpulse-dev
wsl.exe git clone --branch pulseaudio https://github.com/lwvmobile/dsd-fme
wsl.exe git clone https://github.com/szechyjs/mbelib
wsl.exe cd mbelib; mkdir build; cd build; cmake .. ; make; sudo make install
wsl.exe cd dsd-fme; mkdir build; cd build; cmake .. ; make; sudo make install
cd %userprofile%
wsl mkdir IN; mkdir OUT; mkdir tmp
rem [END]

  1. Run Install.bat with a simple double click

[Suggestion] Support for DMR Color Code Filtering

I live in a dense metro area, another DMR system shares some channels with the system i'm interested in. Sometimes dsd-fme gets confused and follows the wrong control channel. It would be cool if we could whitelist a color code with a command line flag.

RAS date in DMR system

Hello,
I follow with great interest the advances made on DSD-FME in data collection, is there a possibility of knowing (key aliases) and (key value) of RAS?

Thanks

WIP: Capacity Plus Expansion and Tweaks;

I've recently come across an old Capacity Plus sample I had where the rest channel was 9 and 10, and talkgroup activity occurred on LSNs 1, and LSN 9 and 10; In the current code, I am only handling Capacity Plus up to 8 slots (4 RF channels), and any subsequent LSN activity would go undecoded. While it seems that much larger Capacity Plus sites (anything above 8 slots) are rare compared to the smaller sites (as small as one repeater), I am going to be working on the code to allow for up to 16 LSNs. Doing a little test and observation, along with some notes and help from others (wriathe) and the sample I have, I have been able to identify when to look for additional activity in the completed Cap+ Channel Status CSBK.

Usually, in the bit stream, we start at bit 24 and read 8 bits, one bit for each active LSN enumerated 1 through 8. If any of those bits are active (1) and not (0), then that corresponding slot has activity. We accumulate the active channels, and then subsequently, if any are active, we read the next 8 bits for that TG value. if 2 groups are active, we read the next 8 bits for the first group, then the next 8 bits for the next group.

On larger systems, after we have parsed all active groups on LSN 1-8, we then have to look at the NEXT 8 bits. Those bits correspond to LSNs 9-16. On smaller systems, this is always 0, but on larger systems, we again take those 8 bits, one for each LSN 9-16, and if any are (1), then we read the next 8 bits for that TG value same as before.

For private data and voice calls, then, after we look at all the above (which can be a bit confusing, especially to write code for, because the size of the PDU is always variable and data is appended only as needed), we look at the next available 8 bits for a flag. I've found that if there is a flag (0x80) then that signifies private voice or data calls, then we read the NEXT 8-bits for active LSNs again for LSNs 1-8, if any of those bits are active (1), then we read the next 16-bits in the series to get that private target values. In Capacity Plus, Source and Private Target values are 16-bit, while Group/TG values are 8-bit.

As you can guess, (this is only my assumption at this point, since I don't have any samples to show this) if you have private voice or data calls on LSNs 9-16, then you repeat the same as above going to the next available 8-bits and so on and so on.

I've been working on the code to expand Capacity Plus decoding in this regard, but it may be a little while before I'm ready to release it, I want to make sure it doesn't break anything on smaller systems, while still allowing decoding and trunking on larger systems, and also that the code can handle random mixing of group and private calls in all sorts of LSN positions, making sure we can always read in the correct tg/tgt values for those (it gets tricky when you have a group call on 1, private call on 3, and another group call on 4 or 5, making sure we are accumulating positions and always knowing where to look for the next bit value.)

Here is the aforementioned sample of a larger Cap+ system with some of the updated code to handle it properly. We can see Rest Channel is 10, VLC TGT is 102, and activity occurring in LSN 1, LSN 9;

18:14:29 Sync: +DMR  [slot1]  slot2  | Color Code=10 | VLC  
 SLOT 1 TGT=102 SRC=0 FLCO=0x04 FID=0x10 SVC=0x00 Cap+ Group Call  Cap+ R-Ch 10
 DMR PDU Payload [04][10][00][00][00][66][0A][00][00][70][35][97]

18:14:29 Sync: +DMR   slot1  [slot2] | Color Code=10 | CSBK
 Capacity Plus Channel Status - FL: 3 TS: 1 RS: 0 - Rest Channel 10 - Single Block
  LSN 01:   102;  LSN 02:  Idle;  LSN 03:  Idle;  LSN 04:  Idle;  
  LSN 05:  Idle;  LSN 06:  Idle;  LSN 07:  Idle;  LSN 08:  Idle;  
  LSN 09:   106;  LSN 10:  Rest;  LSN 11:  Idle;  LSN 12:  Idle;  
  LSN 13:  Idle;  LSN 14:  Idle;  LSN 15:  Idle;  LSN 16:  Idle;  
 DMR PDU Payload [BE][10][EA][80][66][80][6A][00][00][00][F2][13]

To verify I was doing this corretly, I've validated this activity against DSDPlus FL.

+DMR slot2 BS DATA DCC=10 CSBK Cap+ RestCh=10 ActiveCh:TG=1:102,9:106

Regardling Private Data or Voice Calls, I have samples of each. I should also point out, on data calls, much like I found in XPT, we need to handle Preamble CSBKs a bit differently. Preamble CSBKs also show the current rest channel, and Source value needs to be truncated to 16-bit as well. No special handling seems to needed on Data Headers (as far as I can tell) nor do they contain rest channels.

18:18:13 Sync: +DMR   slot1  [slot2] | Color Code=01 | CSBK
 Preamble CSBK - Individual Data - Source: 1 - Target: 653 - Rest Channel: 1 -RAS 4 
 DMR PDU Payload [BD][10][80][02][00][02][8D][01][00][01][E6][41]

18:18:13 Sync: +DMR  [slot1]  slot2  | Color Code=01 | CSBK
 Capacity Plus Channel Status - FL: 3 TS: 0 RS: 0 - Rest Channel 1 - Single Block
 F80 Private or Data Call -  LSN 02: TGT 653;
  LSN 01:  Rest;  LSN 02:   653;  LSN 03:  Idle;  LSN 04:  Idle;  
  LSN 05:  Idle;  LSN 06:  Idle;  LSN 07:  Idle;  LSN 08:  Idle;  
  
 DMR PDU Payload [BE][10][C1][00][00][80][40][02][8D][00][7A][95]
18:18:13 Sync: +DMR   slot1  [slot2] | Color Code=01 | DATA 
 Slot 2 Data Header - Indiv - Unconfirmed Delivery - Source: 1 Target: 653 
  SAP 09 [Prop PDU] - FMF 1 - BLOCKS 07 - PAD 09 - FSN 0 -RAS 4 

Private Voice:

18:20:33 Sync: +DMR  [slot1]  slot2  | Color Code=03 | VLC  
 SLOT 1 TGT=21001 SRC=21002 FLCO=0x07 FID=0x10 SVC=0x00 Cap+ Private Call  Cap+ R-Ch 4 
 DMR PDU Payload [07][10][00][00][52][09][04][52][0A][50][ED][7F]

18:20:33 Sync: +DMR   slot1  [slot2] | Color Code=03 | CSBK
 Capacity Plus Channel Status - FL: 3 TS: 1 RS: 0 - Rest Channel 4 - Single Block
 F80 Private or Data Call -  LSN 03: TGT 21001;
  LSN 01:  Idle;  LSN 02:  Idle;  LSN 03: 21001;  LSN 04:  Rest;  
  LSN 05:  Idle;  LSN 06:  Idle;  LSN 07:  Idle;  LSN 08:  Idle;  
 DMR PDU Payload [BE][10][E4][00][00][80][20][52][09][00][99][03]

The most difficult part is having both private calls (voice and data) and group calls all mixed together and having more than one block of CSBK to append together, and then also parsing out the values into a presentable format. Once I think i have it down just right, I end up finding a combination of group and private in different LSN arrangements and the private tgt values be incorrect suddenly.

18:38:08 Sync: +DMR   slot1  [slot2] | Color Code=01 | CSBK
 Capacity Plus Channel Status - FL: 2 TS: 1 RS: 0 - Rest Channel 4 - Initial Block
 DMR PDU Payload [BE][10][A4][80][3C][00][80][60][00][01][29][9F]

18:38:08 Sync: +DMR  [slot1]  slot2  | Color Code=01 | CSBK
 Capacity Plus Channel Status - FL: 1 TS: 0 RS: 0 - Rest Channel 4 - Final Block
 F80 Private or Data Call -  LSN 02: TGT 1; LSN 03: TGT 477;
  LSN 01:    60;  LSN 02:     1;  LSN 03:   477;  LSN 04:  Rest;  
  LSN 05:  Idle;  LSN 06:  Idle;  LSN 07:  Idle;  LSN 08:  Idle;  
 
 CAP+ Multi Block PDU 
  [BE][10][A4][80][3C][00][80][60][00][01][01][DD][00][00][00][00][00]
 DMR PDU Payload [BE][10][44][01][DD][00][00][00][00][00][D2][D4]
18:44:32 Sync: +DMR   slot1  [slot2] | Color Code=01 | CSBK
 Capacity Plus Channel Status - FL: 2 TS: 1 RS: 0 - Rest Channel 6 - Initial Block
 DMR PDU Payload [BE][10][A6][88][09][17][00][80][40][01][4A][52]

18:44:32 Sync: +DMR  [SLOT1]  slot2  | Color Code=01 | VC3 

18:44:32 Sync: +DMR   slot1  [slot2] | Color Code=01 | CSBK
 Capacity Plus Channel Status - FL: 1 TS: 1 RS: 0 - Rest Channel 6 - Final Block
 F80 Private or Data Call -  LSN 02: TGT 477;
  LSN 01:     9;  LSN 02:   477;  LSN 03:  Idle;  LSN 04:  Idle;  
  LSN 05:    23;  LSN 06:  Rest;  LSN 07:  Idle;  LSN 08:  Idle; 

NXDN96 ISSUE

Hi
I think there is an issue with NXDN96. I tried to decode many tracks without success, the output is confused. I don't think the tracks are encrypted because I can listen voices, but they are distorted (too fast maybe?)

ERROR opening socket on WSL2 or linux in VM box

I'm trying to use latest dsd-fme with SDR++ network sink, but when I'm launching
dsd-fme -N 2>test_run.log -i tcp

I'm getting:

Enabling NCurses Terminal.
TCP Direct Link: localhost:7355
ERROR opening socket
TCP Connection Failure - Using Pulse Audio Input.

I've tried in on Kali linux in a Virtual Box and on wsl2, but the error is the same.
I've checked SDR++ network sink with VLC audio player, and it looks like it works fine
I've tried different port settings with no luck
I've tried to use nc (nc -4 -l 7355 and nc -4 -v localhost 7355) - that works fine, meaning port is not used.

Can you please help me?

DSP structured output

Hi, thank you for this project, could you please comment on my feature proposal below?

Goal: Run option for dsd-fme so it dumps Normal (Standard), RC and CACH bursts in timeslot+burst-bytes format

Basically i'd want to process the on-air data via different application/project, and currently only parsed output and symbols dump (symbols file) are available.
So lets say "dsd-fme --raw-bursts -i 1R.wav" would either on-stdout or into-file dumped each DMR burst that went into processing by dmr handler methods, eg. like this

# general form:
# timeslot(ascii 1 or 2) [single whitespace] burst-type(ascii 1-9) [single whitespace] burst-bytes-hex-encoded [EOL]
# example: timeslot(1) burst-type(1 normal traffic burst)  on-air-payload (33 bytes, incl. sync-or-embedded burst centre)
1 1 aabbccddeeff........
# example: timeslot(2) burst-type(2 RC burst) on-air-payload(12 bytes)
2 2 00112233445566....

Eventually burst-type field could be [2-chars-ascii] if the feature was gradually rolled-in for more radio networks

Cygwin compile issue after upgrading Cygwin packages

Hello lwmobile

Thanks for the nice job you made on DSD-FME.

I would like to inform you that this morning I updated many of my Cygwin packages (in 64 bits version), and I was not able to compile any DSD program after the upgrade (same issue on your DSD and on mine).

I got an error #include <stdlib.h> - No such file or directory on all files.

The issue seems to come from the CMake files, so I reorganized my CMakeLists.txt file and now the build is OK.

By using DSD-FME I was able to compile the code only by modifying the CMakeLists.txt and the FindLibSndFile.cmake files.

I don’t know if I’m alone in this case but if someone else encounters the same problem as me the following 2 files can be used to build DSD-FME:

FindLibSndFile.cmake.txt
CMakeLists.txt

Rename the FindLibSndFile.cmake.txt file into FindLibSndFile.cmake

Note : I tried to copy/paste the content of both files here but the content preview gives me something unreadable.

Is anyone else having the same problem as me with the latest Cygwin packages?

Not able to compile new version of dsd-fme

I have been trying to compile new version of dsd-fme using following steps:-
git clone https://github.com/lwvmobile/dsd-fme
cd dsd-fme
sudo cp tone8.wav /usr/share/
sudo cp tone24.wav /usr/share/
sudo cp tone48.wav /usr/share/
sudo chmod 777 /usr/share/tone8.wav
sudo chmod 777 /usr/share/tone24.wav
sudo chmod 777 /usr/share/tone48.wav
mkdir build
cd build
cmake ..
make -j nproc
sudo make install
sudo ldconfig

I am getting following error while running make -j nproc command:-

help2man: can't get --help' info from /home/star/Documents/dsd-fme/build/dsd-fme Try --no-discard-stderr' if option outputs to stderr
CMakeFiles/dsd-fme.dir/build.make:1842: recipe for target 'dsd-fme' failed
make[2]: *** [dsd-fme] Error 2
make[2]: *** Deleting file 'dsd-fme'
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/dsd-fme.dir/all' failed
make[1]: *** [CMakeFiles/dsd-fme.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

audio problem

for 2 days now I am trying to run this software.
it compiled very easy with the install command
i am able to run gqrx with no problem on my vmware ubuntu.
but when trying to run:
dsd -i rtl -o /dev/dsp -c 434.3m -G26 -Y 12
CTRL + C twice to exit
██████╗ ██████╗██████╗    ███████╗███╗ ███╗███████╗
██╔══██╗██╔════╝██╔══██╗   ██╔════╝████╗ ████║██╔════╝
██║ ██║╚█████╗ ██║ ██║   █████╗ ██╔████╔██║█████╗
██║ ██║ ╚═══██╗██║ ██║   ██╔══╝ ██║╚██╔╝██║██╔══╝
██████╔╝██████╔╝██████╔╝   ██║ ██║ ╚═╝ ██║███████╗
╚═════╝ ╚═════╝ ╚═════╝    ╚═╝ ╚═╝ ╚═╝╚══════╝
Digital Speech Decoder: Florida Man Edition
Github Build Version: v1.6.0-168-g171c71d
mbelib version 1.3.0
Tuning to frequency: 434300000 Hz
Error, couldn't open /dev/dsp

it is always reporting problem with /dev/dsp

what is the problem?

Cmake 3.26 New Warning/Nag Message

project(dsd-fme)

Cmake 3.26.1 (on Arch) now presents new nag message to users:

CMake Warning (dev) at CMakeLists.txt:1 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

This will be fixed in a future commit after some VM testing in different environments to ensure no breakage. The project line should follow the minimun requirements line now.

set(CMAKE_LEGACY_CYGWIN_WIN32 0) #annoying warning in cygwin
#Ubuntu 18.04 uses 3.10.2 currently -- almost EOL
#Ubuntu 20.04 uses 3.16.3
#Ubuntu 22.04 uses 3.22.1
#Arch currently on 3.26.1 -- new nag warning starts on this one, see below
#cmake_minimum_required() should be called prior to this top-level project()
#Cygwin currently using 3.23.2 (or newer)
cmake_minimum_required(VERSION 3.10.2)
project(dsd-fme)

RTL Input Method Has Multiple Issues -- Partially Busted

Well, I never tend to use this input method, but its always worked 'fine' for me when the signal is good. I went back and reviewed a lot of the code for the implementation, and realized that its busted in multiple ways. This was probably one of the first things I ever worked on on this project, and it shows. The code is a mess. The issues I've found so far include:

  1. The Gain level is not being set properly. If you set the gain manually, it will tell you the gain is being set, and the value its being set to. Its lying. Its not setting those values. I have found that using the value of 0 for auto gain works correctly still, and to be honest, if you are going to use this method, you probably better use the automatic gain (which is against even my own normal sane recommendation) but since the manual gain is busted, its just arbitrarily assigning a value (seemingly a low value, or none at all) I'm not even sure what it 'defaults to' in the rtl, but willing to guess its very low.

  2. When squelch is enabled, everything hangs on a safe wait condition until enough samples arrive to allow it to push the samples to dsd-fme. This would be okay with single frequency, but completely breaks trunking. I've been investigating ways to work around this, but in the process discovered all the other problems mentioned here.

  3. There is a problem with the 'bandwidth' setting as well, its not initialized and a lot of settings are being based off of a non-initialized setting, so who knows what values are being set there.

  4. Lots of garbage code I wrote. I don't know a better way to put it. Code and variables doing nothing.

So, anyways, with all the broken implementation, I'm going to review this whole using the rtl input again, and figure out the best way to move forward with it. Either I can just copy and paste the original code szechyjs branch and start over, and put the things that work back in, and fix the few additions (tuning, bandwitdh) or I can get the up-to-date real rtl_sdr_fm.c file from the rtl-sdr project and try to work with that. Using the szechyjs code would be the easy option, the medium option would be to reimplement it with the up-to-date c file (not the cpp file, assuming they used CPP because...pthreads?). The hard option would be to write an external program that can do all of this and just pipe the audio from it.

TL;DR: RTL input is partially busted, don't use gain settings. Will attempt to fix, but no ETA on anything (if anything at all).

In Level 0%

No matter how I run this and pipe inputs I can't get the "In Level" above 0%.
I've tried:

  1. Routing pulse audio in via the virtual sink from SDR++.
  2. SDR++ TCP network routing. Then running dsd-fme -i tcp.
  3. Directly reading from the dongle via: dsd-fme -i rtl:1:$freq:26:-2:8:0:7355

But no matter what I can't get the in level off the floor. I'm thinking this could be a build problem or the like. Any help appreciated.

DSD-FME version
MBElib 1.3.2
version: v2.0.0-100-gae58fab

OS version
Debian GNU/Linux 10 (buster)

Segmentation fault with file without extension

If I enter a file name without an extension, like this "dsd-fme -i file", a "segmentation fault" error will appear.
This happens in the "openAudioInDevice" function, in the "dsd_audio.c" file, line 601, because the extension is NULL.

Question about tcp input (maybe just sdrpp)

Just rebuilt your main branch and pulled down a DMR iq file from SDRPlay’s site. I used sdrpp radio out over network with TCP setting, this time around DSD-fme decoded and played the audio perfectly. What I’m having happen though is that when I have sdrpp started and showing listening, the moment DSD-fme starts and starts decoding from the network stream the sdrpp waterfall and fft are basically frozen, it’ll occasionally show a fast movement but for the most part it’s locked solid till I stop DSD-fme.

Just to be clear. Sdrpp isn’t locked up, it’s just the waterfall and fft. Does that happen to anyone else? I haven’t used the network sync in awhile and don’t recall it happening before.

Gr-dsdfme

Can you please add a gnuradio wrapper and make a project like gr-dsd for your version of dsd?

Thanks.

LRRP issue

Hey i saw your video on youtube and i was trying to get lat-long of the source. But as i was following the procedure as shown on video after running command on terminal "dsd-fme -N 2> test.log". I am getting following error

a

How can i define phase 2 missing parameters and what are these parameters?

Thanks.

WIP - Hytera XPT: Ongoing Work

This Issue Thread will be a general synopsis of ongoing work for Hytera XPT System decoding and trunking. Currently, I have remote access to a few small Hytera XPT systems, none of which are very busy at all so changes and testing is a game of make a small change/tweak, and wait for a while to see if it behaves properly, so progress is slow. I also have a few small IQ samples of multiple super busy XPT systems, which makes things a bit more diffucult as its hard to figure out the seperation between systems, but has a lot of things going on so its easy to test some changes, but not trunking related changes.

Also, note, most of the decoding is from observation and attempts to reverse engineer what is believed to be happening on these systems, there is no published spec on this, and the patent doesn't really seem to directly line up with any information observed on the CSBK/LC/etc. There are also some user manuals that give information, but not on how to decode these systems, just their capabilities, so those are used to infer bit lengths, etc and try to finding matching bits of information in the data, and making regions of link control, csbk, and data header src and tgt values match up.

Current work in progress includes refining the Hytera XPT Site Status CSBK to fix some minor code issues (index plus 1 issues) that may have prevented it from tuning to the correct LSN channel. I have also changed the 'Ch:' nomenclature to 'LSN:' to mean the logical slot number the activity is occurring on to differentiate it from an LCN 'RF' Channel numbering that is found in Hytera XPT Full Link Control. For example, LCN 1 would contain LSN 1 and LSN 2; LCN 2 would contain LSN 3 and LSN 4, and so on.

15:57:18 Sync: +DMR   slot1  [slot2] | Color Code=10 | CSBK
 Hytera XPT Site Status - Free RPT: 2 SN: 0 
 LSN 01: ST-0 Idle LSN 02: ST-0 Idle LSN 03: ST-0 Idle 
 LSN 04: ST-2 181 LSN 05: ST-2 187  LSN 06: ST-0 Idle 
 DMR PDU Payload [0A][68][20][28][00][00][00][B5][BB][00][4E][8A]

15:57:18 Sync: +DMR   slot1  [slot2] | Color Code=10 | CSBK
 Hytera XPT Site Status - Free RPT: 2 SN: 1 
 LSN 07: ST-3 Null LSN 08: ST-3 Null LSN 09: ST-3 Null 
 LSN 10: ST-3 Null LSN 11: ST-3 Null LSN 12: ST-3 Null 
DMR PDU Payload [4A][68][2F][FF][00][00][00][00][00][00][6A][80]

Furthermore, I have also been working on refining the main Link Control method used by XPT systems to be 'more correct' or more in line with what is found in the Site Status CSBK, along with more observation that I believe may include the LCN the call is taking place on. Note: LCN, not LSN:

15:57:18 Sync: +DMR  [slot1]  slot2  | Color Code=10 | TLC  <-- Hytera XPT uses the TLC to set up call like grants, more akin to a P25 TDULC
 SLOT 1 FLCO=0x09 FID=0x68 TGT=10002 SRC=9851 Hytera XPT Private Call Alert 
  TGT Hash=187; HSK=0; Handshake - Ordinary; Call on LCN 3; Free LCN 2;
 DMR PDU Payload [09][68][30][20][27][12][00][26][7B][BD][1A][2C]

Above, we can see Hash 187 (a CRC8 hash of the 16-bit TGT value to make it fit within an 8-bit value), and this call occurring on LCN 3, which is LSN 5 or LSN 6. The Site Status CSBK above shows it as on LSN 5. I've done some extensive testing on this one, and this seems to always line up, so i feel pretty confident in this addition. The 'Handshake' is purely per the patent, and it always is zero on the samples and systems I have access to, so can't say for certain this is accurate, but it is included for now. Free LCN refers to the current designation of the 'free repeater channel', or which RF frequency is next in line for a call to occur on.

Another thing to mention, I've discovered that along with LC, that other elements that use the SRC/TGT values, such as the Preamble CSBK, and Data Headers, also use a 16-bit version of both SRC and TGT, and that those values need to be truncated to 16-bit as well in order to properly line up with the link control, and in the case of private/individual data, a CRC8 Hash is also required for all elements to correlate to its proper placement in the Site Status CSBK. I've made changes to the code in relevant areas to truncate and hash as required so all elements of TG/TGT and SRC line up in TLC Call set ups, Preamble CSBK, Data Headers, and the Site Status CSBK.

Some elements below were trimmed out to avoid repetitiveness and highlight each part.

15:57:18 Sync: +DMR  [slot1]  slot2  | Color Code=10 | TLC  
 SLOT 1 FLCO=0x09 FID=0x68 TGT=10002 SRC=9851 Hytera XPT Private Call Alert 
  TGT Hash=187; HSK=0; Handshake - Ordinary; Call on LCN 3; Free LCN 2;  
 DMR PDU Payload [09][68][30][20][27][12][00][26][7B][BD][1A][2C]

15:57:18 Sync: +DMR   slot1  [slot2] | Color Code=10 | CSBK
 Hytera XPT Site Status - Free RPT: 2 SN: 0 
 LSN 01: ST-0 Idle LSN 02: ST-0 Idle LSN 03: ST-0 Idle 
 LSN 04: ST-2 181  LSN 05: ST-2 187  LSN 06: ST-0 Idle 
 DMR PDU Payload [0A][68][20][28][00][00][00][B5][BB][00][4E][8A]

15:57:18 Sync: +DMR  [slot1]  slot2  | Color Code=10 | CSBK
 Preamble CSBK - Individual Data - Target [10002] - Target Hash [187] - Source [9851] 
 DMR PDU Payload [BD][68][80][06][20][27][12][00][26][7B][D9][AB]

 SLCO Hytera XPT - Free RPT 2 
 SLCO Completed Block [86][82][00][08][A0]

15:57:18 Sync: +DMR  [slot1]  slot2  | Color Code=10 | CSBK
 Preamble CSBK - Individual Data - Target [10002] - Target Hash [187] - Source [9851] 
 DMR PDU Payload [BD][68][80][05][20][27][12][00][26][7B][01][29]

15:57:18 Sync: +DMR   slot1  [slot2] | CACH/Burst FEC ERR

15:57:18 Sync: +DMR  [slot1]  slot2  | Color Code=10 | DATA 
 Slot 1 Data Header - INDIV - Short Data: Defined - Source: 9851 Target: 10002 Target Hash: 187
  SD:D [DD_HEAD] - SAP 09 [Prop PDU] - BLOCKS 04 - DD 00 - PADb 40 - FMT 00 [Binary]
 DMR PDU Payload [0D][94][5D][27][12][08][26][7B][01][28][1C][85]

15:57:18 Sync: +DMR  [slot1]  slot2  | Color Code=10 | TLC  
 SLOT 1 Data Terminator (TD_LC) 
 DMR PDU Payload [30][68][20][26][7B][00][27][12][60][A9][03][E8]

I have yet to find a way to differentiate a 'data' call from a 'voice' call in the TLC Call Setup, if it exists at all in there. There are a few small groups of bits left over, and some of those could designate different 'call' types.

I'll slowly be chipping away at XPT, and will push some updates to it from time to time, and attempt to document any finding and updates here, but until I'm feeling confident about these updates, I most likely will not issue any precompiled releases soley for them.

macos build

I've already installed both the original dsd master and its rtl branch on my Macbook Air M1 with Monterey, but it would be nice to try for the new bandwidth options introduced with dsd-fme. Trying with the usual build instructions I fail with a

Could NOT find Curses (missing: CURSES_INCLUDE_PATH)

error message. I know Curses is available on MacOS via Homebrew/ncurses, would installing it be a direct solution to my problem or I'd rather modify the INCLUDE path in Cmakelists.txt? Or completely make without Curses?

Thanks!

PipeWire Support?

I am running Fedora 36, with the default backend of PipeWire. cmake fails with message -- Could NOT find PulseAudio (missing: PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_SIMPLE_LIBRARY PULSEAUDIO_INCLUDE_DIR)

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.