1580 Commits
v1.3 ... aw_dev

Author SHA1 Message Date
lwvmobile
34753963b8 DMR: Add Keyloading for Hytera PDU Decryption based on Data Header Key ID first, then manually set key. #372 2026-11-07 20:22:23 -05:00
lwvmobile
544d576551 DMR: Fix Hytera OTA Encryption VLC Pseudo Call Information TGT Value on Slot 2. Verbage Tweaks; #373
DMR: Fix Kirisun "Ultra" Cipher Name in Code (Ultra, not Ultimate). Remove Unvalidated Code Bits regarding Kirisun; #319
2026-11-07 19:35:47 -05:00
lwvmobile
72f8c1aff7 Merge branch 'kirisun3' into aw_dev 2026-11-06 22:14:02 -05:00
lwvmobile
bfa4891965 DMR: Hytera Over the Air Encryption (Signalling Encryption) Support; #373
DMR: Fix Hytera PDU Decryption to operate at Block Level; (Fixes confirmed data); #372

DMR: Hytera Enhanced RC4 allows variable len output for OTA, PDU or Voice;

DMR: Fix Segfault in RS12,9 encoder function where freeing static memory caused a crash;

Misc Code tweaks to accomodate new features;
2026-11-06 21:22:38 -05:00
lwvmobile
daa47069bf DMR: Add More Kirisun Encryption Support; #319
Added Ultimate Cipher;
2026-10-30 10:42:34 -04:00
lwvmobile
587181f4de DMR: Add Hytera PDU Encryption Support; #372
DMR: UDP Comp Data Calls use Data header SRC and TGT values for Event History; Fixes Text Messages not populating Event History; Simplify Event String;
2026-10-21 11:48:59 -04:00
lwvmobile
eb8048f1d9 Merge branch 'cygwin_bat_fix' into aw_dev 2026-10-20 19:31:41 -04:00
lwvmobile
d8f9bd190b Merge pull request #371 from ryandrake08/rtltcp-input
Fix divide-by-zero and buffer overruns in getFrameSync()
2026-10-19 16:25:31 -04:00
Ryan Drake
6880087afe Fix buffer underruns in getFrameSync() 2026-10-19 12:52:19 -07:00
Ryan Drake
6106a608e3 Fix divide-by-zero when result_len is zero 2026-10-19 12:52:19 -07:00
lwvmobile
1aae6d34c9 CYGWIN: Fix default bat file date and time string to work independent of locale settings (uses robocopy); #370 2026-10-19 10:45:03 -04:00
lwvmobile
be57b5149b RTL_TCP: Add Ncurses Input Print; #368
Add Usage to docs;
2026-10-18 12:07:41 -04:00
lwvmobile
3e221f29f5 Merge pull request #369 from ryandrake08/rtltcp-input
rtl_tcp input support
2026-10-17 16:42:02 -04:00
Ryan Drake
4754f6a59b Include sys/socket.h for the UDP tuning socket 2026-10-17 11:08:40 -07:00
Ryan Drake
7027b145b8 Add interruptible timeouts for stalled rtl_tcp servers 2026-10-17 10:19:43 -07:00
Ryan Drake
f38b5976f3 Add rtl_tcp input: -i rtltcp:host:port:freq:gain:ppm:bw:sq:vol 2026-10-17 09:55:27 -07:00
lwvmobile
5244c85774 DMR: Fix Kirisun Keystream Creation Per Slot; #319
Use Full Name of Each Kirisun Cipher in Code;
2026-10-17 09:21:46 -04:00
lwvmobile
4005c9b313 DMR: Add More Kirisun Encryption Support; #319
Ciphers added include "Enhanced" "Reinforced" and "Strengthened"; Placeholders for remaining ciphers;
2026-10-16 11:04:42 -04:00
lwvmobile
72b3e5efe4 Fix Typo 2026-10-13 20:10:08 -04:00
lwvmobile
a3a6fb999a DMR: Tait Talker Alias Single Block Embedded LC; #367 2026-10-13 19:58:53 -04:00
lwvmobile
37855b817b DMR: Fix MassReg reg_address value and tweaks; #366 2026-10-09 19:42:45 -04:00
lwvmobile
4fe32db7f5 Merge pull request #364 from eremeevdev/docs/macos-install-notes
Add macOS Homebrew Build Notes to Install Notes;
2026-09-26 16:47:03 -04:00
Aleksey Eremeev
6819f9010e Add macOS Homebrew Build Notes to Install Notes; 2026-09-26 22:25:45 +03:00
lwvmobile
719d9709e6 Merge pull request #363 from xdab/perf/use-symbol-top2
use_symbol: replace per-symbol full sort with single-pass top-2 selection
2026-09-22 17:58:43 -04:00
xdab
26e4a619f6 use_symbol: replace per-symbol full sort with single-pass top-2 selection 2026-09-22 22:41:21 +02:00
lwvmobile
0838a7f7ba DMR: Fix Copy and Paste Bug with Caltta BP Unmute and Doc Typos; #360 2026-09-21 22:18:24 -04:00
lwvmobile
a6ea60b345 Merge pull request #362 from xdab/perf/sync-hunt-topn
Frame Sync: Replace per-symbol full sort with single-pass top-5 selection
2026-09-21 18:30:55 -04:00
xdab
9232d66fcb Frame Sync: Replace per-symbol full sort with single-pass top-5 selection
The frame sync hunt loop sorted the entire symbol amplitude window
(lbuf2, t_max entries) with qsort on every iteration only to read
three ranked values off each end. Replace the copy + qsort with a
single O(n) pass maintaining the five smallest and five largest
values in two fixed 5-slot arrays, reading the exact same ranks.

Rank equivalence: lmn[] ascending = sorted[0..], lmx[] descending =
sorted[..t_max-1], so both the short (t_max < 13) and long rank
formulas map 1:1. The now-unused lbuf2 scratch buffer is removed.

Decode output verified byte-identical (timestamps stripped) against
DMR, dPMR, D-Star and YSF sample captures, including runs with a
10 second no-carrier lead-in.
2026-09-21 20:48:33 +02:00
lwvmobile
15515158b5 DMR: Add Support for Callta BP 10/32/64; #360
DMR: Add optional discard value to -S straight_xor keystream application;
2026-09-20 04:31:06 -04:00
lwvmobile
fa4a332582 DMR: Add Special Use Cases for RAS Passwords that use a # or a $ in the help and complete usage doc; #359 2026-09-10 16:32:24 -04:00
lwvmobile
4139b19bfe DMR: RAS MD5 Hash Fringe Case Correction; #359 2026-09-07 15:19:30 -04:00
lwvmobile
cd5f0f4a8e DMR: Remove Condition where VLC and TLC without FID 0x10 did not calculate RAS MAC attachments; Misc Tweaks to dburst RAS Indicator; #359
DMR: Tweak FLCO to remove 0x23 as a Cap+ Private Call when it is only a RAS indicator on a normal Private Call; Clarify Comments;

DMR: Tweak RAS MD5 loading to allow for a correction against a flat value (if needed in future based on observation);

DMR: Misc Tweaks to Vertex Standard Key Loading; #316
2026-09-06 17:57:42 -04:00
lwvmobile
fb3dc75c47 RAS MD5 Tweaks; #359
Disable Fist Byte Correction on MD5 password hash following observations based on real world system;

Improve BPTC127x77 Decoder Logic;

Tweak Debug code to show checksum diff if there is no actual diff;
2026-09-04 21:36:45 -04:00
lwvmobile
f2254f413a Vertex Standard 10 Char and 64 Char Encryption Support; #316
Special mode of 0:0 to apply the inversion to the interlevaed frame if present without application of a keystream for analysis;

Misc Tweaks to VTX STD ENC Header and VTX TMS message;

TG Value loading of VTX 10 char keys available only by #define VERTEX_KEY40_BY_TG which will override the Moto BP loadout;
2026-09-04 15:47:56 -04:00
lwvmobile
c97400a704 RTL: Retry Tuning if Error; #358
This is just a simple spam of the rtlsdr_set_center_freq function if that function returns a negative value indicating failure. Similar retries are present for gain and ppm set as well.

This is primarily to address issues that have been noted to arise on USB 2.0 ports on some AM4 motherboard / chipset configurations, prevalently, Ryzen CPUs with the 3XX, 4XX, and 5XX motherboards. This may also address other misc issues due to bad USB cables (within reason) as long as a retry will suffice to allow proper tuning;

Upstream rtl-sdr repo was updated to 2.0.3 previously as well to allow for the V4L version dongles to work correctly when compiled in Cygwin. Linux users will need to update their own rtl-sdr versions;
2026-09-01 14:38:11 -04:00
lwvmobile
cc6711fe4d DMR: RAS Implementation; #369
RAS Implementation includes converting RAS 6-24 character passwords into 56-bit RAS Effective Key Values and Performing RAS Permutations on RAS Enabled Burst Types to Calculate the Correct MAC attachment to validate messages;

Better Handling for RAS indicators found in BPTC 196,96 Reserved Bits and handling for RAS indicator bits found in embedded link control opcode byte;

Users may either enter the RAS password with the -$ option, or the 56-bit effective key value with the -y option.

Users will no longer need to use the -F option to bypass CRC errors on RAS enabled payloads when FEC does not explicitely fail.

Removed the old float audio -y option.
2026-09-01 13:29:55 -04:00
lwvmobile
198f0eacb5 DMR: Auctus / GoComm Encryption Support w/ Forced Application; #346
Use -, Secure04 to use this mode;
2026-08-14 03:05:21 -04:00
lwvmobile
5e5c3c4555 MBE: Tweaks to DMRA Late Entry IV (change run order to align w/ superframe) for SDRTrunk .mbe files; #298
MBE: Fixes for non forced DMRA supported decryption modes (with supplied IV + expansion in mbe file, etc);

MBE: Support for DMRA DES Mode (rare and untested for .mbe files);
2026-07-20 23:02:17 -04:00
lwvmobile
272f17bfa3 MBE: Add DMRA Late Entry IV and Forced AES Alg Decryption support (w/ known key) for SDRTrunk .mbe files; #298 2026-07-20 11:31:31 -04:00
lwvmobile
69d31151dd MBE: Add NXDN AES Decryption support (untested) for SDRTrunk .mbe files; #298 2026-07-10 16:39:16 -04:00
lwvmobile
6fd7176659 MBE: Fixes and Tweaks on SDRTrunk .mbe files for NXDN Scrambler Key Loading; #298 2026-06-29 16:18:31 -04:00
lwvmobile
c960f9932c DMR: Fix Response Packet Nack Response Reasons; #354 2026-06-25 13:36:25 -04:00
lwvmobile
e877e7b9de WAV: Fix Typo on per-call custom tags and print to console log; #352 2026-06-17 15:53:17 -04:00
lwvmobile
43d63b20dc WAV: Add custom tag option for per-call wav files; #352 2026-06-13 16:08:29 -04:00
lwvmobile
e6d2dd7934 P25: Create a Tait LCW Format Decode; 2026-06-11 18:23:56 -04:00
lwvmobile
8c3ae61b1a MBE: Support for SDRTrunk NXDN MBE files (WIP); #298
DMR: Clarify and Decode FSN Value on Data Headers; #350

NXDN: Fix errors on KS creation on AES discard bytes on voice application;

GCC: Fix Misc unused-but-set-variable warnings (GCC Version GNU 16.1.1);
2026-06-11 17:52:12 -04:00
lwvmobile
f443063d3b Import Fixes: #348
Make adjustments to groupinfo struct; Misc tweaks to code using groupinfo items;

Move group_array from stack to heap; Calloc adequate memory for it;

Switch to strncpy to fix potential issues with large strings copying OOB and crashing;
2026-05-20 05:25:38 -04:00
lwvmobile
ed1d1d630c NXDN: Add Event History entries for the GPS report, undecoded, and still encrypted Data Calls;
P25p1: Add / Fix Several TSBKs including Station ID and Extended Function Command; Add UDP Port Decode for EFJ Atlas Data Registration Server;
2026-03-28 11:54:16 -04:00
lwvmobile
56f6f6d78e NXDN: Tweak to Frame Sync, restore other sync patterns based on polarity; Fixes random frame skips on NXDN96 trunking;
NXDN: Initial GPS Report Commit;

NXDN: Don't assign GI, TG/RID in VCALL_ASSGN; Leads to duplicate entries in Event History, particularly when private call;

NMEA: Sentence Checker with start, end, checksum, and supplimentary string checks P25p1 Tier 1 Location Service and Also observed on old Type-D system;

LRRP: Fix LRRP.exe style reports to use date/time strings with colons and slashes;

NXDN: Tweak to DCALL to check for a selective retry when blk_num is not equal to pf_num and invalidate, we don't have the memory of the last PDU attempt (and may have successfully received it anyways, even if the radio did not);
2026-03-20 11:10:15 -04:00
lwvmobile
a6bdfa913f NXDN: DCALL Finish up data decryption methods;
NXDN: Fix Block Assembly on "idas" types, they do have the same blocking structure;

NXDN: Fix CRC32 and "total_bytes" when padding bytes are present;

NXDN: Add placeholder GPS function and reverse byte load for GPS location data found in certain DCALL messages;

DMR: Init AES keyloader arrays for PDU;

Misc cleanup and tweaks;
2026-03-13 23:43:43 -04:00
lwvmobile
ad77f266c4 NXDN: Add DCALL / SDCALL Header and Data Block Assembly; SDCALL_IV Function;
NXDN: Disable LICH "dividing" offbits check on sync detection, causes too many blips on still okay signal, particularly trunking;
2026-03-13 14:43:14 -04:00
lwvmobile
f72eb31b30 Merge pull request #342 from hardt0x1c/fix/dmr-payload-pointer-reset
fix: correct dmr_payload_p buffer pointer assignment #340
2026-03-12 13:14:25 -04:00
Constantin
441ba31d1b fix: correct dmr_payload_p buffer pointer assignment 2026-03-08 23:22:49 +03:00
lwvmobile
7d94abd76a DMR: Only Apply Hytera BP Key if defacto static silence frame is not present; 2026-03-01 10:28:05 -05:00
lwvmobile
7b89174bb1 P25: Fix MFIDA4 Location on PTT; 2026-03-01 08:36:58 -05:00
lwvmobile
f6f5f80361 DMR: Fix forced refresh items; #339
P25: Tweak Tait Talker Alias 7-bit to check for ASCII values >= 0x20;

RTL: Tweaks to RMS;
2026-02-27 14:44:40 -05:00
lwvmobile
b7cd501cc1 RTL: Add input gain adjustments during ncurses session using g/G and update example usage (credit: ki4hyf);
Group trunking shortcut key changed from g to T;
2026-02-19 21:07:44 -05:00
lwvmobile
9f03ad123d NXDN: New Frame Sync Fine Tuning;
Tweak lmix, lmax, qsort indexing values based on sync pattern length;
2026-02-13 14:55:00 -05:00
lwvmobile
d3303aea28 P25p1: 1/2 Trellis Viterbi Improvements;
P25p1 and DMR: 3/4 Trellis Viterbi Improvements;
2026-02-10 23:36:18 -05:00
lwvmobile
615f67536f NXDN: Add some debug polarity dumps; 2026-02-05 17:46:01 -05:00
lwvmobile
12012a9eee NXDN: Add Cmake option (-DNOS=ON) to switch back to old NXDN sync with pos and inv polarity;
There is bound to be at least one person who will complain, or listens to the harmonic and not the signal, or has a mixed bag of things and doesn't want to specify polarity;
2026-02-05 16:53:44 -05:00
lwvmobile
53a256bee8 NXDN: Rework code for the FACCH1 duplicate message check post NXDN Viterbi overhaul;
Use static array to hold facch1 message after recovery and compare when LICH type calls for 2 individual FACCH1 messages in an NXDN frame;

Zero out facch1_storage on SACCH or SCCH decode (happens first) and after potential comparison time in FACCH1 decode;
2026-02-03 02:57:02 -05:00
lwvmobile
d7ce5e4cae NXDN: Add conditions to invalidate Superframe SACCH sequences;
Invalidate entire SACCH superframe in storage if CRC error on individual SACCH or if next SR value (part of frame) is not the expected value;

Set initial nxdn_part_of_frame value to 3 - Ideal sequence is 1/1 NSF to 1/4 SF SACCH; also set to 3 on misc frame types (CAC, FACCH2, etc)
2026-02-03 01:43:12 -05:00
lwvmobile
5af38d3563 NXDN: Revert Dibit Collection;
NXDN: Minor Tweak to STD-T102 Message Types;
2026-02-01 20:58:41 -05:00
lwvmobile
034855069a NXDN: Fix NXDN_LICH_OFFBITS and LICH_ERR_THRESHOLD to work as expected post NXDN Viterbi overhaul; Revert back to 1 bit error on lich "dividing";
NXDN: Skip Dibits prior to exit on bad sync in nxdn_frame;

NXDN: Reimplement the CAC fail demodulator and dibit buffer soft reset;
2026-02-01 20:19:33 -05:00
lwvmobile
3ee5acef0a Minor Viterbi Tweaks;
Seperate Viterbi Code into new .c file;
2026-01-31 15:40:35 -05:00
lwvmobile
b5bd9a7238 Compiler Warning Fix (llx); 2026-01-30 18:14:42 -05:00
lwvmobile
56b491ed3e NXDN: Soft Decision Viterbi;
NXDN: Tweak to LICH Dibit "Dividing" Error Threshold (1 to 2);

NXDN: Change MessageType to 8-bit and Decoding to Include the F1 and F2 Flag; Make Tweaks for DCR/ARIB Messages to compensate;

NXDN: Frame Sync Tweaks to help reduce false sync patterns; Make Inverted NXDN user option; cmake enabled defines for Type-C, Type-D, and DCR decoding (all enabled by default);

NXDN: Decode DST_ID_INFO Message;

NXDN: Rework Code on Standard Caller Alias and add a 16bit alias variants for ASCII, SJIS, BIG5, or UTF16 alias decoding (configure via cmake, default is ASCII);

NXDN: Seperate PROP_FORM 0x3F from Alias via checkdown;

YSF: Soft Decision Viterbi;

YSF: Fix BUMBLEBEETUNA text string on partial decode;

P25p2: Fix Harris GPS MAC message to fixed len, or do not decode (observed bugfix);

P25p2: Add MFID90 Unknown 0x8F and 0xBF MAC Message;

DOCS: Update complete_usage_options; Remove M17 Encoding Section;
2026-01-30 17:52:07 -05:00
lwvmobile
a26a680fd6 Merge pull request #336 from wormuz/fix-mbe-playback-arg-order
Fix -r option argument order dependency
2026-01-30 08:51:07 -05:00
lwvmobile
4ec2387140 Merge pull request #335 from wormuz/fix-mbe-static-wav-write
Fix -w option not writing wav in MBE playback mode
2026-01-30 08:48:32 -05:00
Konstantin Cheremisov
385a9a1747 Fix -r option argument order dependency
Move state.optind assignment from inside case 'r' to after the
getopt loop completes. This ensures optind points to the first
positional argument regardless of option order.

Before: -r file.amb -w output.wav would fail with "could not open -w"
After: argument order no longer matters for -r with other options
2026-01-29 14:46:15 +02:00
Konstantin Cheremisov
2267f5d007 Fix -w option not writing wav in MBE playback mode
The -w option sets static_wav_file=1 and dmr_stereo_wav=0, but
playMbeFiles() only checked dmr_stereo_wav==1 condition, causing
wav files to be empty (only 44-byte header) when using -r with -w.

Added static_wav_file check to both IMBE and AMBE playback branches.
2026-01-29 14:32:57 +02:00
lwvmobile
99f422898a Update and Push Tag; 2026-01-06 21:18:13 -05:00
lwvmobile
4924bd249a Remove Remnants of ITPP; #331
Tweaks to Decrypted MBE Playback; #298 #329
2026-01-05 12:56:07 -05:00
lwvmobile
a5e000a14c Remove ITPP Dependencies; #331
Rework P25p1 NID code from KA1RBI's OP25 code;

Remove ITPP Cmake, build config scripts, docs, etc.
2026-01-04 20:31:30 -05:00
lwvmobile
53eaccc892 .mbe file playback DMRA Forced ALG, KEY, Late Entry IV for DMR; #298 #329
Working RC4;

WIP on Moto BP Forced;
2026-01-02 01:41:18 -05:00
lwvmobile
e95cd4dd3a Fix AES-OFB and Misc Issues on .mbe file playback; #329 WIP 2026-01-01 23:00:41 -05:00
lwvmobile
48b0c4025b Add defined(__CYGWIN__) Fix for #330 2025-12-31 18:29:36 -05:00
lwvmobile
2171df515d Merge pull request #330 from Coriou/fix/macos-oss-build
macOS: disable OSS backend cleanly and fix build/link errors
2025-12-31 17:47:50 -05:00
Benjamin Coriou
83d7460a0b macOS: disable OSS backend cleanly and fix build/link errors
macOS has no OSS (/dev/dsp) support, but dsd-fme currently compiles and links OSS code unconditionally, leading to build and link failures.

This PR:

* disables OSS backend cleanly on macOS

* provides a no-op openOSSOutput() stub to satisfy callers

* guards OSS-specific headers and ioctl usage

* preserves existing behavior on Linux/OSS platforms

This allows dsd-fme to build and run correctly on macOS using PulseAudio/CoreAudio paths.
2025-12-31 15:03:37 +01:00
lwvmobile
38ad11dbef Fix AES-OFB type on .mbe file playback; #329 2025-12-29 22:36:47 -05:00
lwvmobile
eddd6cb8b1 Add DES(56) and AES(128/256) OFB Decryption to P25 .mbe file playback; #329
This does not include DES-XL due to needing to know HDU or LDU2 and complications of SDRtrunk P1 ESS handling, and also unknown Phase 2 method for XL.

Nor TDEA (never observed on P25 despite in spec);
2025-12-29 22:25:23 -05:00
lwvmobile
abf28593b1 Fix some Cygwin64 Build Script Issues and Instructions; #324
Use sed to replace line in ITPP CmakeLists.txt file to update the cmake_minimum_required to an acceptible version for newer cmake;

Include SIMD Math Libraries libopenblas, liblapack-devel, libfftw3-devel for Cygwin64;

If perceived performance issues arise, may consider removing the Math Libraries above from Cygwin64 install script
2025-12-14 19:51:34 -05:00
lwvmobile
bc4aeff164 Misc Fixes; #324
Fix cyg_portable.sh for newest version of Cygwin64;

Fix p25_frequency process_channel_to_freq to allow a channel value of (0000);

Fix Event Format Nit and add EOT Delay on CC for EDACS/PV;
2025-12-12 21:51:37 -05:00
lwvmobile
632041a44a M17: Add Packet Identifier 0x07 for TLE; 2025-11-16 14:30:52 -05:00
lwvmobile
f1cd83e924 DCR: Add SB0 Lich Code 0x08 and decode CSM as Alias, if present; #323
NXDN: Fix Type-C SCCH CRC Check (Pass 2);

NXDN: Fix CRC12 Issues;
2025-11-10 20:52:35 -05:00
lwvmobile
50bf004427 DMR: Kirisun LFSR Fix; #319 2025-11-10 20:32:05 -05:00
lwvmobile
85a6372c2e M17: Put ECD Back In; #322
Don't decode signature frames as voice;

Check 1600 Arbitrary Data to see if it has text in it before attempting to decode it;
2025-11-08 12:48:25 -05:00
lwvmobile
eb76ea2039 DMR: Add -M option to allow forcing any algid value;
Remove Setting from DMR_LE and place in MBE section instead;

Change state->M to state->forced_alg_id to make it easier to find later;
2025-10-31 09:41:10 -04:00
lwvmobile
14edf325bc Tweak zeroes_threshold AMBE KS application; 2025-10-31 08:24:53 -04:00
lwvmobile
e11ed353b8 Change custom NXDN PN95 -* argument to -_ ; #318
Using -* exhibits unusual behavior and may read contents of directory and set any value based on what is in there;

Don't use for future CLI arguments;

Update Usage;
2025-10-31 08:13:03 -04:00
lwvmobile
f8521fda99 Don't Apply Keystream when Silence or Zero DMR AMBE Frames; #319
This is primarily a fix for those CCR Radios that use the static silence frame and doesn't encrypt it either at the start of, or end of TX;

The Zeroes Fix (000D2C00000000) is for Anytone or TXI who has a load of zeroes starting, or ending a TX, or during the TXI window on certain VC-F frames;
2025-10-31 08:06:39 -04:00
lwvmobile
fa47d0321b Update and Strip Down M17 Features; #322 2025-10-31 05:58:45 -04:00
lwvmobile
095d982b62 Kirisun Advanced and Universal Encryption Support; #319
Above Commit is by Anonymous Submission;

Add Example Usage of -S for Baofeng DM32 Custom / Basic Encryption Mode;
2025-10-30 02:32:30 -04:00
lwvmobile
0060378321 DMR: Connect Systems Extended Encryption Support; #321 2025-10-16 12:28:16 -04:00
lwvmobile
8ea6415424 DMR: Baofeng Advanced (PC5) Encryption Support; #320
Above Commit is by Anonymous Submission;
2025-10-15 17:57:15 -04:00
lwvmobile
eb24239c51 DMR: LFSR Function for Kirisun Encryption Methods; #319
Add LFSR to DMR Alg Refresh;

Full Link Control and SBLE Tweaks Regarding Kirisun Enc;
2025-10-11 21:02:59 -04:00
lwvmobile
ac1c658870 DMR: Initial Support for Kirisun "Advanced" and "Universal" Encryption Identifiers and Link Control; #319 2025-10-10 05:53:36 -04:00
lwvmobile
cf032ab955 NXDN: Add SHIFT-JIS support and UTF-8 Conversion and decode Talker Alias for MT 0x27 ALIAS_ARIB; #318
NXDN: Redo NXDN VCALL_ARIB based on observed values and ARIB STD-B54;

Add UTF16 to UTF8 encoding for DMR Talker Alias when its UTF16;

Encoding Unicode / UTF16 to UTF8 Allows for display into Ncurses Terminal, Event History, etc when its CJK and not normal ISO7/ ASCII or UTF8 encoded as UTF16;

Might be beneficial to convert and run all encoded text through UTF8 encode in the future.
2025-10-08 19:54:35 -04:00
lwvmobile
2d04878506 NXDN: Add Placeholders with Partial Decode or Assembly for MT 0x21, 0x27, and 0x28; #318 2025-10-08 05:43:38 -04:00
lwvmobile
748bb5b191 Rewrite NXDN Dibit PN95 Code and allow custom seed value; #318 2025-10-07 06:13:19 -04:00
lwvmobile
f3b89f1c51 DMR: Initial Support for Vertex Standard Encrypted PDU Header; #316 2025-09-21 14:09:52 -04:00
lwvmobile
b2d388a210 DMR: Initial Support for Vertex Standard Text PDU on Port 5007; #316 2025-09-21 00:29:04 -04:00
lwvmobile
c883e2bf0b DMR: Tytera AP (PC4) Encryption Support Update to Allow 128-bit or 256-bit keys; 2025-09-20 23:49:33 -04:00
lwvmobile
f8ca0a8e08 DMR: Retevis AP (RC2) Encryption Support Update to Allow 128-bit or 256-bit keys; 2025-09-19 22:44:50 -04:00
lwvmobile
99b1fd2fe2 DMR: Tweaks to PDU Decryption;
Allow Manually Loaded Key Value AES on DMR PDU;

Add support for CCR AES-ECB PDU Decryption;
2025-09-18 12:13:54 -04:00
lwvmobile
b0a46a541d P25: Clear Stale Keys when using the Keyloader and a CC Return is initiated via LCW or Logic on END_PTT; 2025-09-11 23:19:16 -04:00
lwvmobile
3aabd85604 DMR: Retevis / Anytone AP (RC2) Encryption Support; 2025-09-11 22:49:22 -04:00
lwvmobile
9acd8c981e Merge pull request #307 from arancormonk/fix/nxdn-cac-temp-buffer-overflow
Fix NXDN CAC decoder temp buffer overflow in nxdn_deperm_cac causing segfaults under -O2/-O3
2025-09-02 22:10:42 -04:00
lwvmobile
9353c489aa Merge pull request #306 from arancormonk/fix/p25p2-tdma-voice-vector-oob
Fix OOB writes in ez.cpp HB/HBS vectors causing P25p2 TDMA voice segfault
2025-09-02 21:22:54 -04:00
arancormonk
bc95dc1a1d Fix NXDN CAC decoder temp buffer overflow in nxdn_deperm_cac causing segfaults under -O2/-O3. 2025-09-02 15:53:26 -04:00
arancormonk
1ecd32e017 Fix OOB writes in ez.cpp HB/HBS vectors causing P25p2 TDMA voice segfault 2025-09-02 15:07:51 -04:00
lwvmobile
6ef823347b Fix Bug with -F switch requiring an argument;
Bug was introduced in commitc 888dfc1d6569c42aa45ca86aad00ed630410ddd ;
2025-08-30 04:31:21 -04:00
lwvmobile
bd75c1ab83 MBE: Prepare for changes to P25p1 ESS in SDRTrunk .mbe files (version, ks application); #298
MBE: Make tweaks to audio and wav file handling, allow writing to static wav files even if audio out device is NULL (writeSynthesizedVoiceMS);

DSTAR: Fix Issue with DSTAR where double writes would occur in single static .wav files;
2025-08-23 20:31:32 -04:00
lwvmobile
b3b943d330 Update Docs; 2025-08-22 14:27:13 -04:00
lwvmobile
a5151686ec Add Generic Static AMBE Keystream Support; #303
Adding a new method to allow a user to enter a generic keystream len and static keystream via a string that is loaded into a bit array to xor against ambe frames;

This method is intended to be used to allow
2025-08-22 14:02:09 -04:00
lwvmobile
24c1dd97df DMR: Add 16-bit Anytone BP Support; #303
Reset static_ks_counter as various places in code;

Remove the static_ks_counter reset from KWD SCR link control and tweak SO bits;

Fix Forced KS application to work in both slots;

Allow Static Wav File or Per Call Wav File in SDRTrunk MBE format playback; #298

Same as above for .amb, .dmb, and .imb format playback;

Update Usage and Docs;
2025-08-20 23:12:57 -04:00
lwvmobile
6f171620dc DMR: Reorganize TYT and KEN encrytion modes, putting them into the proper files; #302 #303 2025-08-19 19:18:01 -04:00
lwvmobile
7428a87d80 WAV: Fix Issues with Per Call;
Fix Per Call Issue introduced with commit re-enabling single static wav file where single channel audio decode types would not write to per call temp wav files and be deleted after event history cycled them;

Fix Issue with YSF where double writes would occur in .wav files;

Fix Issue with M17 where incorrect rate audio would write to static .wav file by converting to stereo output;

Seperate Per Call and Create Method to Allow EDACS Analog Calls to be written to static wav file by downsampling and stereo interleaving audio to proper spec;

Issues were introduced in commit # c7b25c60af
2025-08-19 02:35:17 -04:00
lwvmobile
79084f26c6 DMR: Fix Kenwood Scrambler SVC OPT muting call when key is forced; #303 2025-08-17 21:17:14 -04:00
lwvmobile
d5cd4b4273 DMR: Fix Kenwood Scrambler Flag in FLC #303; 2025-08-17 21:11:34 -04:00
lwvmobile
bafd74b225 DMR: Fix Wformat Warning; #303 2025-08-17 20:06:34 -04:00
lwvmobile
8df8ce85f2 DMR: Add 15-bit scrambler method for Kenwood Radios; #303 2025-08-17 18:57:32 -04:00
lwvmobile
a5b9984d78 TYT EP: Fix User Key to Input Register; #302
Bytes used as input register for TYT EP are loaded by byte reverse order, was undetected on some key patterns like all F's or all A's, but found out on 1234... patterns;
2025-08-17 15:24:22 -04:00
lwvmobile
4dd68f2221 Update Help / Usage; 2025-08-16 10:25:43 -04:00
lwvmobile
21c02acd8c WAV: Re-enable -w option for single file .wav for all decoded speech; 2025-08-16 10:22:31 -04:00
lwvmobile
c7b25c60af DMR TYT BP (16-bit) Encryption Mode; #302
Above Commit is by Anonymous Submission;
2025-08-16 10:18:10 -04:00
lwvmobile
41865f3af7 DMR TYT EP (AES128) Encryption Mode; #302
Above Commit is by Anonymous Submission;
2025-08-15 20:29:34 -04:00
lwvmobile
8f092e293f DMR TYT BP16 Encryption Mode WIP; #302
Code is not working as-is, committed for anonymous submitter to have access to certain items in code;
2025-08-15 12:21:27 -04:00
lwvmobile
c888dfc1d6 DMR TYT AP (PC4) Encryption Mode Support; #302
Above Commit is by Anonymous Submission;
2025-08-15 11:14:46 -04:00
lwvmobile
6ebe3eff58 NXDN: Fix Wformat Warnings 32; #299 2025-07-27 14:17:03 -04:00
lwvmobile
2ca3f0a356 NXDN: Fix Wformat Warnings; #299 2025-07-23 19:16:27 -04:00
lwvmobile
698a991262 NXDN: Misc #299
Fix Perpetual Sync Bug unless Squelch Break;

Add DCR MFID 30 F.C.R Data Preamble and Precoded Message PDU;

Misc Payload Tweaks;
2025-07-14 22:42:35 -04:00
lwvmobile
352bb98bc6 DMR: Fix UTF16 Talker Alias locale to allow Chinese or similar Non-Roman Charsets;
Note: This will only work to the console output, since ncurses wide chars are different. The alias string will replace extended utf16 chars with an * for now.
2025-07-14 06:15:55 -04:00
lwvmobile
8c34313720 NXDN: #299
Additional check for LICH "offbits" that should all be 1's as sync condition;

Add 7-bit Parity Check for known DCR Lich ("RICH") Codes;

Make Tweaks to Help Incorporate Lich Parity and Offbits into NXDN Sync Determination;
2025-07-13 11:32:15 -04:00
lwvmobile
ce805a7860 NXDN: Add DCR TCH / PICH Lich 0x48 Payload Only; #299
Misc Tweaks to Payload Format;
2025-07-13 10:25:40 -04:00
lwvmobile
86b8900b3d NXDN: Fix and Decode Some DCR Elements; #299
Elements include scrambler bits, UC bits, and other misc items;

Tweaks to payload output;
2025-07-08 00:59:41 -04:00
lwvmobile
eb1bcee301 NXDN: Disable Attempted Decoding of SACCH frames on Icom DCR; #299 2025-07-04 17:24:01 -04:00
lwvmobile
fd3b4b6a66 NXDN: DCR Payload Tweaks 2; #299 2025-07-02 15:33:06 -04:00
lwvmobile
b09de5f112 NXDN: DCR Payload Tweaks; #299 2025-07-01 17:00:02 -04:00
lwvmobile
8d1c92c490 NXDN: Add Lich Code 0x46 for Icom DCR Voice and SACCH Payload; #299 2025-06-30 20:25:47 -04:00
lwvmobile
bd98e3befb Re-enable the custom wav file directory option -7 for per-call wav files;
When playing back .amb or .imb files, print AMBE or IMBE when dumping payload on them;
2025-06-29 15:56:52 -04:00
lwvmobile
1aa71811b0 SDRTrunk .mbe File Replay: #298
Mute Audio if enc and no key provided;

Tweak Verbose Payload vs No Verbose Payload Output to console;

Misc Tweaks;
2025-06-24 13:34:45 -04:00
lwvmobile
4e1b1ac98e SDRTrunk .mbe File Replay:
Tweak RC4 Keystream Creation to only create second keystream when P25p1, and only make as much keystream as needed; #298
2025-06-23 02:37:45 -04:00
lwvmobile
ccbaef8541 SDRTrunk .mbe File Replay:
Fix P25p1 RC4 Decryption via keystream juggle and reverse LSFR for IV; #298
2025-06-23 02:27:03 -04:00
lwvmobile
8a30115398 SDRTrunk .mbe File Replay Initial Commit; #298 2025-06-22 15:16:19 -04:00
lwvmobile
3a1d393a0f Fix Playback Speed in Cygwin for .imb/.amb files; #297 2025-06-20 16:05:30 -04:00
lwvmobile
66844b1d4c P25: Provide a temporary fix to the issue of .imb files not writing when a key is presented during an encrypted voice session; #297 2025-06-19 17:03:07 -04:00
lwvmobile
722d7b77fb DMR: Yet Even More RC_TESTING Tweaks; #292 2025-05-29 20:27:15 -04:00
lwvmobile
5a2575c9a0 DMR: Even More RC_TESTING Tweaks; #292 2025-05-29 20:09:55 -04:00
lwvmobile
daad012466 DMR: More RC_TESTING Tweaks; #292 2025-05-29 19:47:25 -04:00
lwvmobile
f2cc686189 DMR: Fix CallTimers CSBK; #293 2025-05-29 15:55:27 -04:00
lwvmobile
175ccff7e9 DMR: Fix BParm Issues Mentioned in #293
Make some tweaks to DMR BS RC_TESTING; #292

Fix Talker Alias Block Num Enumeration (+1) on Valid Blocks;

Misc Typo and Format Fixes;

Tweak for NXDN Keyloading on VCALL;
2025-05-29 14:44:37 -04:00
lwvmobile
4a1e6f1540 Revert Previous Change Regarding DMR Talker Alias; #290 2025-05-22 22:52:39 -04:00
lwvmobile
d285865de5 DMR: Don't append spaces to talker alias string if encoded character is 0; #290
(usually indicates the full talker alias has yet to arrive and only doing a partial in progress decode);
2025-05-22 06:17:19 -04:00
lwvmobile
4bcc9f8aec Fix Coding Error for Compiler Warning / Error for ncursesClose; 2025-05-21 22:23:32 -04:00
lwvmobile
c6b2320cbd Ncurses:
Don't display the lines for Pulse Digital Output if it isn't opened (when using analog only -fA);
2025-05-17 15:00:09 -04:00
lwvmobile
87be5aa72e DMR:
Add FLCO 0x29 FID 0x10 to Unknown Moto Link Control Value to prevent it from setting incorrect tgt, src, svc values;
2025-05-17 01:59:41 -04:00
lwvmobile
3f0f675fd5 Pulse Audio:
Don't Open Audio Stream for Synthesized Digital Voice when using the -fA Analog Only Output Option;
2025-05-16 23:16:32 -04:00
lwvmobile
7c56fb836b Fix Wformat-overflow Issues Regarding Previous Commit; 2025-05-15 16:49:53 -04:00
lwvmobile
2891d7314b Dibit/Symbol Capture File:
When initiated from the ncurses 'R' key, it now rotates every hour;

Above is logged to event history when it occurs;
2025-05-15 16:42:21 -04:00
lwvmobile
ed13bb34d8 YSF: Fix Event History Placing Blank Entries between calls; Fix No Entries when sourced signal is inverted; 2025-05-14 23:03:26 -04:00
lwvmobile
b9097d9462 Event History Setup: #287;
P25p1: Set currentslot to 0 when decoding phase 1 specific duids (HDU, TDU, TDULC, LDU, TSBK, MPDU) so that we don't have a potential stale phase 2 slot value present when writing to event history, etc.

Update Glamor Shot to include the Event History Update;
2025-05-12 21:41:20 -04:00
lwvmobile
59fcfdae81 Event History Setup: #287
Allow Event History to be cycled from short string on, long string on, or of with the 'h' shortcut keyf;
2025-05-12 17:12:10 -04:00
lwvmobile
f85304471f Event History Setup: #287
P25p2: Misc Tweaks for Harris Things; Misc Event History P2 Tweaks;
2025-05-11 12:08:39 -04:00
lwvmobile
3fc67a5694 Event History Setup: #287;
Add customizable event history line (in ncurses) for various items, but left colors as the default cyan. (Remus Request);
2025-05-11 01:16:31 -04:00
lwvmobile
2314900829 Event History Setup: #287
Update Glamor Shots to Show new Event History; Update Misc Items and Examples;
2025-05-10 17:17:48 -04:00
lwvmobile
680b792b19 Event History Setup: #287
Fix Some GPS formats not writing to the event history gps_s string due to mismatching src values (UDT NMEA and LIP);

Fix bug in ComputeCrcCCITT16d where the len value cannot exceed 255 by recasting len as uint32_t instead of uint8_t; #288

Clarify when UDT Data Blocks (R12) is Confirmed or Unconfirmed Data;
2025-05-10 02:09:56 -04:00
lwvmobile
0d734b753f Event History Setup: #287
Fix Flicker Bug in Ncurses Printer by casting lls as static int;

Further Tweak to NcursesPrinter for responsiveness;
2025-05-09 21:11:23 -04:00
lwvmobile
fae33ca0a1 Event History Setup: #287;
Seperate dsd_ncurses.c into dsd_ncurses_printer.c , dsd_ncurses_menu.c , and dsd_ncurses_handler.c files;

Make adjustments as needed to accomodate above;

Work on Handling Special Escape Characters with Ncurses Input Handling to prevent rogue things from happening with scrool wheel, etc;
2025-05-09 18:36:22 -04:00
lwvmobile
dc7ff1136e Event History Setup: #287
Prepare to Seperate Ncurses Code and Event History Code into seperate .c files; Move common items to a .h file;

Move event history code to dsd_events.c; Move AFS code to edacs-fme.c; Move beeper code to dsd_audio2.c
2025-05-09 17:12:31 -04:00
lwvmobile
67ab05da63 Event History Setup: #287;
Trial Fix for ncurses randomly lagging when sync condition with printer vs no sync condition with printer and key input;
2025-05-09 16:18:05 -04:00
lwvmobile
54ba3b6513 Event History Setup: #287
Run ncursesPrinter more frequently during nosync condition to make ncurses user input a lot more responsive during quiet times.
2025-05-09 16:02:56 -04:00
lwvmobile
13739b18aa Event History Setup: #287
Expand Event History for EDACS to Include More Call Information; Misc Tweaks regarding;

Add watchdog and wav file closure to EOT_CC when returning from EDACS Analog or Digital Calls;

Fix local event_string size in watchdog_event_current;

Add watchdog to cleanupAndExit to catch any calls in progress when closing and push them out to event_history log;
2025-05-09 02:20:09 -04:00
lwvmobile
7a198e62f9 Fix UDT Mixed String Format Issue when assigned to event_history text_message; #288 2025-05-09 01:04:13 -04:00
lwvmobile
e37955448e Tweak Event History String Regarding Mixed Address and UTF Text Data; #288 2025-05-08 15:18:00 -04:00
lwvmobile
2dc9db17ab Fix UDT Data Misc Items found by mastodon987; #288 2025-05-08 14:35:22 -04:00
lwvmobile
a3eb6dd552 Event History Setup #287;
Clear some values on Trunking when nocarrier that weren't previously cleared right away;

Write User Lockout of TG to event history; Run noCarrier when Trunking and User Locks Out, prompting return to CC;
2025-05-07 18:19:06 -04:00
lwvmobile
35b782a10f Event History Setup: #287
Tweaks to P25p1 TDU and TDU/LC don't clear out items before they get into event log (bugfix for no crypt info logging);
2025-05-07 13:57:59 -04:00
lwvmobile
8c4dc6ed36 Hytera Enhanced Encrypt: Refresh When bad CACH or TACT forces resync(Run LFSR); 2025-05-06 23:50:00 -04:00
lwvmobile
1532fdcc8e Event History Setup: #287
Include a simple sh file to startup dsd-fme with opts line, and open log files for multi linux terminal support;

Fix bug with P25p1 MPDU Trunking Blocks setting address values to trigger event history watchdog;

Add an internal string into event history to log internal events of note (ENC LO, errors, etc);

Add a watchdog during any ENC LO event so the event_history will log the call with ENC LO;

Disable AHOY and RSP PDU's from Event History (clogs up the event history with extra info);

Fix DMR p_clear trigger to zero out src and tg values when tuning away;

Fix Hytera Enhanced RC4 (verified working); Misc Tweaks Regarding;
2025-05-06 21:19:11 -04:00
lwvmobile
68d959cb7a Event History Setup: #287;
Fix P25p1 LCW Unit to Unit to Private Call in Call History; Misc Tweaks in TDU and LCW;

Add DMR AHOY Info from CSBK and UDT from Data Bursts to Event History;

Send UDT Text Messages to textmessage string in event history and not to the event string; Fix UDT Text Len values;

Fix Misc Issues noted in #288 (IP6, Mixed Add/Text, NMEA ss3 * 10);
2025-05-06 15:06:19 -04:00
lwvmobile
c364117fc0 Event History Setup; #287
Fix NXDN site_code and sys_code order in event_history; Reset correct call type string on TX_REL,  TX_REL_EXT, and DISC messages when stale;

Have P25p1 PDUs write to event_history, regardless of decoded state; Include Enc info if available and not decrypted or decoded; Event History and Log RSP Packets;

Tweak and Add DMR RSP Packets to Event History and Log

Fix Event History Log File Display on Startup;

Add UDP Port 4069 for TRBOnet SCADA; (no decode of data);
2025-05-04 14:53:13 -04:00
lwvmobile
d376fcc227 Event History Setup: #287;
Misc Tweaks Regarding How Trunking Elements May Indirectly Interact with Event History;

DMR Alias Tweak: Allow Extra UTF8 characters (grave, diacritical leters, etc); Allow any UTF16 character that isn't an ASCII special char;

Add GI String (GROUP or PRIVATE) to wav file names, if set and known at close;

Add Encrypted PDU ALG/KID values if not decrypted/decoded;

Allow Manual RTL Input PPM Error Adjustment with { and } keys;

LRRP: Simple Request Handling; Report Handling Tweaks; Simple Handling for Unknown Formats;

Don't reset DMR Color Code on NoCarrier;
2025-05-03 15:59:45 -04:00
lwvmobile
93b297c2d5 Event History Setup: #287;
Don't write Short Data UTF8 to event log or event history in ncurses(garbage text);

Add unknown IP port and protocol lines for event_history;

Add GI from the ILLEGALLY_PARKED CSBK on standard DMR T3 trunking to make sure we get one set;
2025-05-02 17:01:57 -04:00
lwvmobile
d158db618d Fix Misc Minor Bugs and Clang Compiler Warnings; 2025-05-01 22:12:19 -04:00
lwvmobile
934b95cde8 Event History Setup: #287
Make Tweaks / Fixes to DMR Talker Alias;

Setup for Hytera Enhanced RC4 Cipher (LFSR Works, Cipher Untested / Unknown Working State);
2025-05-01 20:40:35 -04:00
lwvmobile
3563399126 Event History Setup Misc; #287
Change the -~ switch to debug mode and -J to the event history file;

Pass slot and swrite value to write_event_to_log_file; Add Slot value to written event log file when swrite is 1 (DMR BS and P25p2);

Misc Consistency Nits;
2025-04-30 19:47:06 -04:00
lwvmobile
6364009e45 Event History Setup; #287
Fix -Wformat-overflow warning regarding writing imported names into a char array;
2025-04-29 14:07:32 -04:00
lwvmobile
1739017303 Event History Setup; #287
Scrub call_matrix items form ncurses, rename for edacs use only;

Scrub a lot of unused local variables out of the ncurses printer;

Add NXDN Talker Aliases to Event History;

Add Remus' suggestion for Tone ID and AD values on the call alert beeper;
2025-04-29 13:58:20 -04:00
lwvmobile
27d416f38b Event History Setup; #287
Add groupName csv import items into the Event History;
2025-04-28 23:12:26 -04:00
lwvmobile
f9dac1c226 Double Duration of beeper function calls so that it actually will play reliably when using OSS audio output (Cygwin); #287 2025-04-28 15:40:56 -04:00
lwvmobile
d1334038df Migrate Call Alert Beeper to New Event Function; Ring different tones on voice start, end, and data calls; #287
Fix and Tweak Calloc Size to the size_t of Event_History * 600 total events (little extra overhead) ;
2025-04-28 15:01:33 -04:00
lwvmobile
4ebc6ab6c9 Event History, Add New .bat file for cygwin portable that will also open and tail an event_log file; #287
Add an initial system event for users to see when started;
2025-04-27 23:13:15 -04:00
lwvmobile
76905b095b Event History Bug Fix; #287
Initialize src_str and tgt_str properly each pass of watchdog_event_current so that wav files do not have a blank string instead of the correct numerical number for src and tgt when applicable; Fix tgt and src string to correct position;

Add dPMR string value to src and tgt for wav files + bugfix; Add Enc if applicable to event history for it;

Misc Nits;
2025-04-27 21:42:09 -04:00
lwvmobile
daf014df6a New Event History Setup and Logging to a Log File, part 3; #287
M17, YSF, DSTAR to save wav files with src and dst as call sign string value and not a numerical value;

Add P25p1 Tier 1 Location and DMR Short Data LOCN Report to Event History; Add MNIS sourced LRRP to Event History;

Don't append truncated TEXT strings to Event String since its full display is directly below it in the Event History;

Add new items to Event History to accomodate above feature;

Tweak misc items regarding above;
2025-04-27 20:30:50 -04:00
lwvmobile
ff4dd03379 Fix Misc Size and Format Warnings Regarding Last Push; #287 2025-04-26 23:39:01 -04:00
lwvmobile
114e305e25 New Event History Setup and Logging to a Log File, part 3; #287
Add Extra Call Information to Event History and Display to Ncurses and Write to Event Log;

Add P25 Known Talker Alias Formats to Event History and Display to Ncurses and Write to Event Log;

Remake the DMR Talker Alias Decoder for 7, 8, and 16 bit chars and go to Event History and Display and to Ncurses and Write to Event Log;

Add Some Embeddded and Misc (Non Data Call) GPS Formats to Event History and Display to Ncurses and Write to Event Log;

Add DMR UDT Data Calls to Event History;

Make Misc Tweaks to Event Item Strings;
2025-04-26 23:34:15 -04:00
lwvmobile
4e04d99780 New Event History Setup and Logging to a Log File, part 2; #287
Rework all Per Call Wav files to tie into Event History; Auto Delete Empty Wav files created; Wav Files in progress have no extension and have no hard set name until closing;

Delete all OLD patch files that are resolved directly or indirectly by new Event History, or have previously been incorporated into code.
2025-04-25 13:33:17 -04:00
lwvmobile
a9a88c5b13 Event History Better Scrolling in Ncurses; #287 2025-04-24 00:14:52 -04:00
lwvmobile
71d4d30f3a Event History: Move event_history_s from the stack to the heap; Calloc Plenty of Memory for it; #287 2025-04-23 16:27:25 -04:00
lwvmobile
8cbfb96141 TMS: Fix Termination / Overflow Issue; #287 2025-04-23 14:40:26 -04:00
lwvmobile
919100daad Fix Current Warnings Regarding, try 2. #287; 2025-04-23 00:05:48 -04:00
lwvmobile
d2f4c1ddd9 Fix Current Warnings Regarding #287; 2025-04-23 00:03:58 -04:00
lwvmobile
cb89fb69c1 New Event History Setup and Logging to a Log File, part 1; #186 2025-04-22 23:50:07 -04:00
lwvmobile
51727b815d P25: Initialize sap_string and rsp_string; 2025-04-17 16:15:04 -04:00
lwvmobile
8bfdeeebd0 P25: Fix printFrameInfo state->nac compiler warning on fprintf; 2025-04-07 22:42:18 -04:00
lwvmobile
b963b08469 P25: Redo printFrameInfo to make it consistent across Phase 1 and Phase 2; 2025-04-07 22:40:18 -04:00
lwvmobile
177551e081 DMR: Display Alg Type on Late Entry Single Burst; 2025-04-06 21:01:37 -04:00
lwvmobile
7ab5ec8b40 DMR: Fix More Lingering DMRA PI lfsr128 Mismatch Issues due to int to ulli conversion errors; 2025-04-06 21:00:57 -04:00
lwvmobile
8fd9c64c0c DMR: Change PDU MI to ulli to match and prevent possible issues related to int to ulli change in mi storage;
PI Header Display Nit;
2025-04-06 18:53:16 -04:00
lwvmobile
a9af3b9380 DMR: Fix Lingering DMRA PI and lfsr32 Mismatch Issues due to int to ulli conversion errors;
(0xFFFFFFFF12345678 vs 0x12345678) issue in display and late entry mismatch;
2025-04-06 18:50:14 -04:00
lwvmobile
fc21063652 Fix Variable Types for print;
Remove Unused Code;
2025-04-06 16:57:58 -04:00
lwvmobile
19864225f6 DMR: Fix Hytera Enhanced Not Muting Properly (OR SVC OPT enc bit); 2025-04-05 07:18:03 -04:00
lwvmobile
3312e14422 DMR: Fix DES Alg (0x22) Set;
Fix Late Entry Mismatch Bug due to variable type change (int to ulli);

More Fixes Tweaks for Hytera Enhanced Encryption Setup;
2025-04-04 17:35:48 -04:00
lwvmobile
425d477168 DMR: Fix common slot counter (csc) variable found in slow link control sys_parms; #285 2025-04-01 20:36:37 -04:00
lwvmobile
b351b6a20d P25p1: Fix Relationship of PDU Extended Addressing Header and ESS Header; 2025-03-31 05:03:14 -04:00
lwvmobile
4b75211ad0 DMR: Reconfigure dmr_le;
Reconfigure dmr_le so that it can be completely disabled for Hytera Enhanced, or Late Entry MI only for DMRA, or Late Entry MI and Key/Alg for DMRA;

Misc Hytera Enhanced Setup Tweaks;
2025-03-26 00:54:08 -04:00
lwvmobile
88c76c4a6c DMR: Enhanced Encryption PI / FLC Setup;
Fix some PI Elements for Consistency and List Known Alg Types;
2025-03-25 18:14:33 -04:00
lwvmobile
cfbd859d9e DMR: Fix PDU AlgID for AES; 2025-03-25 13:55:36 -04:00
lwvmobile
5851abbce8 Fix AES Key Segment (ULLI) Array Size; 2025-03-21 15:45:16 -04:00
lwvmobile
d35bed4348 Move MBP to header file; 2025-03-20 18:34:20 -04:00
lwvmobile
4e77bb05b9 CODE: Remove Whitespace (ezpwd); 2025-03-17 17:22:22 -04:00
lwvmobile
fdbc2ef0e2 CODE: Remove Whitespace; 2025-03-17 16:38:04 -04:00
lwvmobile
237cb3ffa5 P25p1: Fix Moto APX GPS LCW; 2025-03-17 13:57:12 -04:00
lwvmobile
7ed1a79b5b Misc; 2025-03-17 13:53:38 -04:00
lwvmobile
e36672f54c Fix Some Tab Alignment Issues;
NXDN: Make seperate AES IV expansion function;
2025-03-15 20:26:25 -04:00
lwvmobile
eac360571e YOLO:
Congratulations for clicking this link, you are now reading this description;

Add DES-OFB Decryption Support for P25, NXDN, DMR (Tested);

Add DES-XL Decryption Support for P25p1 (Tested);

Add AES-OFB Decryption Support for P25, DMR (Tested); NXDN(untested);

Add P25p1 PDU Decryption Support; (Untested)(Known Modes);

Add Remaining (AES, DES) DMR PDU Decryption Support (Known DMRA Modes)(Untested);

Decrypt Tytera 16-bit BP (works depending on model);

Add AES Keys example csv file for import;

Probably a few bugs that'll need to be massaged out now with all the code additions for several years of stashed code;
2025-03-14 23:54:58 -04:00
lwvmobile
9f59729fb1 Disable Debug Catch All UTF8 Decode on unknown PDU types; 2025-03-13 14:55:08 -04:00
lwvmobile
9f063cb4da Fix Some UTF8 String Overflow Issues; 2025-03-13 14:45:02 -04:00
lwvmobile
f593453328 PDU: Misc Catch All UTF8 Decodes on Unknown Format Types; 2025-03-13 13:58:09 -04:00
lwvmobile
871bdf5a82 TMS: Better Parsing (WIP); 2025-03-13 13:45:07 -04:00
lwvmobile
fbf40335aa DMR: Fix TDMA Direct Mode voice handling; 2025-03-13 12:43:03 -04:00
lwvmobile
0c8a11c607 P25p1: More Misc PDU Tweaks; 2025-03-12 12:16:31 -04:00
lwvmobile
c13ffbc9b2 P25p1: Misc PDU Tweaks; (WIP);
DMR: Fix TMS Message String for Ncurses & Tweaks;

Make the IP PDU more generic;

Make Cellocator and ARS decoder placeholder functions;

Add port for P25 Tier 2 Location Services (LRRP);
2025-03-11 11:59:55 -04:00
lwvmobile
31f9edefa5 P25p1: Reorganize Multiblock PDU Handling; 2025-03-10 10:11:13 -04:00
lwvmobile
fe0195ad10 DMR: Ncurses Display For Unknown IP / UDP Based Calls (port or protocol); 2025-03-05 14:57:39 -05:00
lwvmobile
e3e2fff6e5 DMR: Fix Rate 1 Encoded Packet Data Assembly; Fix Rate 1 Confirmed Data CRC9 Check; 2025-03-05 14:39:19 -05:00
lwvmobile
3b67ff52d5 DMR: Add Data Call Type to Ncurses; TMS to truncated ASCII range string for ncurses; UTF8 and UTF16 tweaks; 2025-03-05 10:47:02 -05:00
lwvmobile
17789f03f9 DMR: Bypass CRC Error on MNIS Data; Reset SAP and Format Storage After Use; #283 2025-03-05 05:13:34 -05:00
lwvmobile
6fb464f57d DMR: Add Support for the MNIS Header; #283 2025-03-05 02:35:42 -05:00
lwvmobile
6c277da869 DMR: Fix Corrected KS Offset Application on Chained P_Head for BP; 2025-03-04 07:03:50 -05:00
lwvmobile
4d5af32ce7 DMR: Add Handling for IPv4 UDP / ICMP / UNK Protocol PDUs; 2025-03-04 06:56:42 -05:00
lwvmobile
16a84b8d3e DMR: Fix Incorrect SRC and TGT on DPF 15 for ncurses display; 2025-03-04 04:09:03 -05:00
lwvmobile
eebb251d2f DMR: Tidy Up PDU Enc Code; 2025-03-03 23:09:02 -05:00
lwvmobile
4255a2f9ba DMR: Correct KS Offset Application on Chained P_Head; 2025-03-03 22:58:52 -05:00
lwvmobile
5fcfb141a6 DMR: Fix PDU MI variable type; 2025-03-03 21:53:52 -05:00
lwvmobile
304baca7c5 DMR: Fix Bug on PDU Info Display; 2025-03-03 09:09:38 -05:00
lwvmobile
fb2de46d88 Cygwin:
Add Linebreak to copy and paste installer prompts in Install_Notes.md;
2025-03-03 06:56:54 -05:00
lwvmobile
f551952bf6 Cygwin:
Remove the portable release builder code from download-and-install-cygwin.sh script, call cyg_portable.sh from said script instead (simplify);

Remove old .bat files or rename pulseaudio ones in case of need for referencing them;

Include a simple example_options.txt file so users can get an idea of options to pass to dsd-fme as opposed to having a bunch of bat files;
2025-03-03 06:17:52 -05:00
lwvmobile
ec8d74fabd Cygwin:
Cmake -DNOCOLORSLOGS=OFF for Cygwin Builds (or user option)

Tweak cygwin scripts to include touch.exe in portable release builder.

Rework original 1aa bat file to be a simplified / unified .bat file (old bat files still available in examples folder);
2025-03-03 05:17:04 -05:00
lwvmobile
f732ad9639 Add Float Symbol Input File Support (.raw or .sym); 2025-03-02 23:44:19 -05:00
lwvmobile
31bfd6a235 DMR: Misc Code Cleanup; 2025-03-02 08:14:43 -05:00
lwvmobile
a44c81a6bb Fix Compiler Warning; 2025-03-01 13:20:44 -05:00
lwvmobile
df56d421f8 DMR: Setup a KS start (offset) value to apply specifically for chained p_head where the second p_head is only partially encrypted; 2025-03-01 12:57:25 -05:00
lwvmobile
f5fad8d5e0 DMR: Misc PDU Tweaks/Fixes/Cleanup; 2025-03-01 03:32:16 -05:00
lwvmobile
f92c64c4d3 DMR: Fix Data Assembly on Moto Ext Header;
Make appropriate adjustments based on above;

Additional Tweaks for some LRRP Tokens;
2025-02-28 11:33:23 -05:00
lwvmobile
2ca15d8b53 DMR: Decode Additional IP Header Elements;
Adjustments to Moto EXT Header and its LRRP Variant;

Make additional adjustments to LRRP PDUs based on above;
2025-02-28 07:39:14 -05:00
lwvmobile
bc18db2bc2 DMR: Fix NMEA / LOCN:
Use DD.MMmmmm format;

Dump to File;

Disable Reponse Data Header (dpf == 1) to ncurses string;
2025-02-26 01:45:25 -05:00
lwvmobile
a006074459 DMR: Only Print LRRP Data to file if lat/lon is present; 2025-02-25 22:54:15 -05:00
lwvmobile
141eac9bc3 Remove pavucontrol from installer scripts; Add note under virtual sinks; #280 2025-02-25 15:01:23 -05:00
lwvmobile
69dd1d167b DMR: Fix LRRP Report to File Format; #281 2025-02-25 11:11:28 -05:00
lwvmobile
f6aba4a5a4 DMR: Fix Potential Overflo/Underflow in UTF8 Text; 2025-02-23 23:52:28 -05:00
lwvmobile
f0b5f2737f DMR: Disable break statement on UTF8 text; 2025-02-23 21:03:05 -05:00
lwvmobile
5c177d671c DMR: Disable LOCN unless SD PDU first octet is 0x01; 2025-02-23 20:34:30 -05:00
lwvmobile
1d112a21cc Merge pull request #278 from thesamesam/cmake
CMakeLists.txt: fix build w/ split tinfo
2025-02-23 18:10:44 -05:00
Sam James
13bbf08e6c CMakeLists.txt: further future-proofing of FindCurses use
`CURSES_INCLUDE_DIR` -> `CURSES_INCLUDE_DIRS` as `_DIR` is deprecated
per the `FindCurses` docs. It shouldn't matter like the `_LIBRARY` issue
though as it seems to gracefully populate both with the same value.
2025-02-23 23:08:24 +00:00
Sam James
7c180113cd CMakeLists.txt: fix build w/ split tinfo
Gentoo ships "split tinfo" (with `tinfo` in `libtinfo`). This is fine
if pkg-config or similar is used, but FindCurses unfortunately misbehaves
(see https://gitlab.kitware.com/cmake/cmake/-/issues/23236).

dsd-fme applies the workaround needed for that already since c917c61b85
but `CURSES_LIBRARY` was used instead of `CURSES_LIBRARIES`. Despite the
CMake docs only indicating that it's a deprecated alias, `_LIBRARY` indeed
only contains some of the needed libraries instead of all.

Fix that by using `CURSES_LIBRARIES` instead.

Closes: https://github.com/lwvmobile/dsd-fme/issues/276
2025-02-23 22:58:14 +00:00
lwvmobile
2ba4641796 DMR: Reset some elements on TD_LC; 2025-02-23 16:40:03 -05:00
lwvmobile
d11de2cbac DMR: PDU Misc Tweaks and Fixes; 2025-02-23 16:14:19 -05:00
lwvmobile
1725e45793 DMR: PDU RC4 and BP Decryption; 2025-02-23 02:58:45 -05:00
lwvmobile
035df461e1 Cygwin: Remove 'mode con: cols=90 lines=50' from bat files since its broken in PowerShell; 2025-02-22 23:02:34 -05:00
lwvmobile
f6f5380df4 DMR: Rework PDU Assembly; 2025-02-22 22:50:53 -05:00
lwvmobile
d8df5ceab5 DMR: PDU / LRRP Misc Fixes, Tweaks, and Cleanup; 2025-02-22 14:28:09 -05:00
lwvmobile
dfe744ef13 DMR: Rework PDUs; 2025-02-22 09:04:07 -05:00
lwvmobile
2fbdf46fd6 Fix .bat file permissions and home folder location for cygwin portable build; 2025-02-14 23:54:53 -05:00
lwvmobile
2c100dd121 Update Cygwin Scripts for:
Make a portable cygwin release as a user option in the shell script;

Add the bat files from the precompiled releases to the examples folder;

Add rebuild_cygwin.bat so cygwin users can easily update their versions;

Standalone cygwin_portable.sh version creator;
2025-02-14 23:13:43 -05:00
lwvmobile
42cb14b9d9 Cygwin SH Tweaks for multithread; 2025-02-12 19:35:56 -05:00
lwvmobile
c5cded87b1 Update Cygwin Instructions; 2025-02-12 12:22:27 -05:00
lwvmobile
b2ee4e1df0 Fix Cygwin Instructions; 2025-02-11 22:33:58 -05:00
lwvmobile
db73166da7 Cygwin SH File Tweaks; 2025-02-11 22:15:34 -05:00
lwvmobile
8d21574a93 Fixes For Cygwin Builds:
Remove AERO Build Define; Replace with __CYGWIN__;

Fix extern optarg,optind on __CYGWIN__;

Fix GIT_TAG versioning for __CYGWIN__;

Add Experimental Install sh script;
2025-02-11 19:17:30 -05:00
lwvmobile
35bd5ccc55 Code Arrangement and Additions:
Migrate Harris Alias for vPDU;

Setup Harris Alias for LCW;

Working Harris GPS for LCW;

Harris GRG Bitmap(speculative);

Migrate Tait Alias for LCW;

Misc Tweaks;
2025-02-10 23:45:56 -05:00
lwvmobile
6dd1410faf Moto Alias Dump Function;
Misc Tweaks for displaying and writing various P25 Aliases to File and Ncurses for display;

Misc String Safety Tweaks on Aliases and writing to csv files / display;
2025-02-07 17:33:08 -05:00
lwvmobile
0cbf42e4e6 P25 Moto Alias vPDU Working; Tweaks and Fixes; 2025-02-06 21:36:01 -05:00
lwvmobile
f0657ee5a8 Change P25 Moto Alias Block bn to num_bits value to make it work with multiple bit per block values; Misc Cleanup and Tweaks; 2025-02-06 00:11:46 -05:00
lwvmobile
29ee3a5f3a Moto Alias for MAC vPDU Setup;
Seperate P25 Moto Alias Block Function from Alias Decode Function;

Move Code to dsd_alias.c;
2025-02-05 23:39:25 -05:00
lwvmobile
8cfaced4b4 P25 Moto Talker Alias LCW WIP; 2025-02-05 09:52:30 -05:00
lwvmobile
61673222db Merge branch 'p25_moto_alias_setup' into aw_dev 2025-02-05 07:13:18 -05:00
lwvmobile
f59f0cbb7f P25 Moto Talker Alias LCW Setup and Test; 2025-02-05 07:12:41 -05:00
lwvmobile
20af28597d Fix Variable Print Format; 2025-02-04 17:26:00 -05:00
lwvmobile
942d83f54d Merge pull request #275 from pizzolante/fix/locale-independent-package-check
FIX: Locale indipendent libitpp-dev package check
2025-02-03 23:41:08 -05:00
lwvmobile
0c6f132520 Merge pull request #272 from VasylSamoilov/patch-1
Fix example file group.csv syntax
2025-02-03 23:40:13 -05:00
Leo Pizzolante
6319508937 FIX: Locale indipendent libitpp-dev package check 2025-02-03 23:56:42 +01:00
lwvmobile
ae6525e986 P25 Tait Talker Alias LCW; 2025-02-02 00:49:23 -05:00
lwvmobile
51d1690edc Fix Misc vPDU Manufacturer Len Values; 2025-02-01 16:32:54 -05:00
lwvmobile
14d00f9228 New Tag; 2025-01-26 13:34:40 -05:00
lwvmobile
5ad9f4107c P25: Add Tait (mfid: D8) Slot Count vPDU (op: B5); 2025-01-26 13:31:54 -05:00
VasylSamoilov
6afa4ed327 Fix example file group.csv syntax 2024-12-25 16:18:24 +02:00
lwvmobile
bc140ec081 Add ES Aux Header to r12 MPDU; Fix Format Security Warning on Debug UTF16 Prints; 2024-12-13 23:39:21 -05:00
lwvmobile
d904289060 Fix Several P25p1 LCW regardless of MFID presence; 2024-12-13 23:21:34 -05:00
lwvmobile
e13bd4f323 More P25p1 MPDU Payload Fixes; 2024-12-13 15:40:48 -05:00
lwvmobile
5752f1b84a Fix P25p1 Confirmed Data Payload Output; 2024-12-13 15:31:24 -05:00
lwvmobile
5e516ed6d1 Fix P25p1 ADJSS BCST LCW; 2024-12-13 12:35:54 -05:00
lwvmobile
2ceeeb82af Add Text Debug PDU Code for P25 and DMR PDUs; 2024-12-12 05:18:33 -05:00
lwvmobile
2883e44a9d Fix P25p1 SCC BCST LCW; 2024-12-10 14:06:12 -05:00
lwvmobile
20747db2cc Fix DSP output for DMR SB/RC;
Fix DSP output order on BS voice loop;
RC PDU Format Line Break;
Debug RC data testing on BS VC-F;
2024-12-08 16:55:33 -05:00
lwvmobile
c2f22ac399 Add Some More P25p1 PDU SAPs;
Add P25p1 PDU Aux ES Info;

Fix Misc Formatting and Cleanup on P25p1 PDU Blocks;
2024-12-07 14:40:45 -05:00
lwvmobile
b8beede921 Remove Unused Bits of Code for DMR/RS Sync Pattern (Fixes Bug if RES Sync is detected and flag tripped); #270 2024-11-17 08:43:11 -05:00
lwvmobile
cd32158a73 Fix len on unpack_ambe function; 2024-11-13 15:11:51 -05:00
lwvmobile
a8ec6dbe37 Add Frame Number to dPMR with Payload Verbosity; 2024-11-11 14:45:18 -05:00
lwvmobile
f22af7c5fc Fix Mono to Stereo Interleave Audio Gain on YSF/DMR MS; 2024-10-24 00:24:34 -04:00
lwvmobile
a4b53f88a1 Disable PV Debug Output; 2024-10-23 23:31:17 -04:00
lwvmobile
4567e2f4a4 DMR: Con+ Call/Slot Termination; 2024-10-23 23:21:00 -04:00
lwvmobile
8a3fd87784 PV: Remove Spacer Bits; Misc Cleanup; 2024-10-23 22:41:33 -04:00
lwvmobile
c428ce32b2 Merge branch 'pv_diag' into aw_dev_merge 2024-10-23 22:34:24 -04:00
lwvmobile
2ae9c50d47 Merge pull request #269 from volo-zyko/fix-compiler-warnings
Fix some compiler warnings and add corresponding compiler flags
2024-08-30 11:12:23 -04:00
Volo Zyko
dfcc8d513d Fix some compiler warnings and add corresponding compiler flags 2024-08-29 15:05:52 +03:00
lwvmobile
7c9d032c99 PVDebug Testing; 2024-07-21 10:08:39 -04:00
lwvmobile
f6fc91a051 Include pack_ambe and unpack_ambe functions and use during certain keystream applications; 2024-07-20 16:41:35 -04:00
lwvmobile
8b76daa35f Fix/Simplify AMBE and IMBE Print Code; Include Bit/Byte Utility Functions; 2024-07-20 16:41:07 -04:00
lwvmobile
8b883f556f M17: Packet Decode Fix Sanity Check So It Doesn't Break CRC; 2024-06-15 01:18:47 -04:00
lwvmobile
beefaae0fa M17: Disable Debug Print on PKT Assembly; 2024-06-15 00:56:31 -04:00
lwvmobile
13e778b123 M17: Fix Potential Core Dump (overflow) on Packet Assembly on Bad Packet Decode; 2024-06-15 00:47:16 -04:00
lwvmobile
7f7c13a72a M17: Don't Attempt To Decode Encrypted Packet Data; Disable Annoying Nonce TS Warning; 2024-06-15 00:21:20 -04:00
lwvmobile
f2312e63eb M17: Disable Duplicate (Debug) LSF and Change Default DST Value;
M17: Fix Examples in Usage;

M17: Disable Nonce/IV Warning;

M17: Add Support For OTAKD Recognition (skip decode);
2024-06-13 16:21:25 -04:00
lwvmobile
d6adaa87c7 M17: Fix Meta Text Decoding to skip control byte on string, but display len/seg number; LSF Payload CRC Line Break Nit; 2024-06-13 15:36:14 -04:00
lwvmobile
20e35a00ba M17: Adjustments to PKT Data CRC; 2024-06-10 04:36:55 -04:00
lwvmobile
8610ee8956 M17: Fix Bugs With SRC/DST Values in Meta Extended CSD; 2024-06-09 05:47:04 -04:00
lwvmobile
92fbdabbe5 M17: Tweaks to Meta Decode Conditions; 2024-06-08 13:45:18 -04:00
lwvmobile
25659ba920 M17: Tweak Output on GNSS Position Data; 2024-06-08 03:07:35 -04:00
lwvmobile
b2ce60b843 Update Install Notes to Mention Debian 12; 2024-06-07 22:22:42 -04:00
lwvmobile
c87ad08371 M17: Fix META Decode when not IV and Decode META Text as UTF-8 and Not RAW; 2024-06-07 22:20:36 -04:00
lwvmobile
94688fddd4 Change Download For Ubuntu 24.04 Script from aw_dev to audio_work branch; 2024-06-06 15:17:57 -04:00
lwvmobile
e29eba9943 Fix Error in Manual Install Packages For Ubuntu; 2024-06-06 15:15:10 -04:00
lwvmobile
920dce96fe Add Auto Installer Script For Ubuntu 24.04 LTS; #262 2024-06-05 04:23:27 -04:00
lwvmobile
e2747525a6 Patch: Remove Outdated G Patch (Again); 2024-05-31 03:44:27 -04:00
lwvmobile
a5989486ae Patch: Fix g_dmr patch to work properly with new call string and append .wav properly in Linux; 2024-05-31 01:58:38 -04:00
lwvmobile
9c58273832 DMR: Fix Per Call String on DMR Tier 3 When Trunking; 2024-05-31 01:04:39 -04:00
lwvmobile
9a9fa0c182 Patch: Delete Older Version of G Patch; Add Cretu DMR no idle print patch; 2024-05-27 20:12:28 -04:00
lwvmobile
319d0b9866 OSS: Quick Bugfix for hpf_d when TDMA slot 1/2 volume issues; Updated g_dmr patch; 2024-05-27 20:02:48 -04:00
lwvmobile
5dbccaadf6 Add Per Call String For NXDN Conventional / Type-D; 2024-05-21 09:42:46 -04:00
lwvmobile
28a6777d83 DMR: Tweak to Call String Options for Display and Per Call; #258 2024-05-21 09:06:22 -04:00
lwvmobile
21afa4ba97 Add Call String To Per Call Files (group/private/emergency/enc); WIP; #258 2024-05-21 01:49:23 -04:00
lwvmobile
d60dfa7ff3 Update Usage to reflect changes to the -7 directory option; 2024-05-19 18:03:37 -04:00
lwvmobile
5d3b2ec56f Fix Some Absolute Directory Path Issues(WIP); #261 2024-05-19 16:32:27 -04:00
lwvmobile
2c55a9caab Ncurses: Device Display Spacing Nit; 2024-05-19 15:32:32 -04:00
lwvmobile
6daedf198f Update Docs: Add Audio Plumbing Information; 2024-05-19 06:26:09 -04:00
lwvmobile
8d52ce2ac9 Add Pulse Input / Output Sink / Source Name to Ncurses Terminal; 2024-05-19 05:59:10 -04:00
lwvmobile
63e484cc91 Optional User Input Argument for Pulse Audio Sink / Source Use; 2024-05-19 05:34:56 -04:00
lwvmobile
e3ecace5db Pulse Audio Sink and Source Enumeration WIP; 2024-05-19 04:59:26 -04:00
lwvmobile
f9add0b997 M17: Misc Fixes and Tweaks; 2024-05-10 12:33:39 -04:00
lwvmobile
d3c942d475 Phase 1 Non-standard IMBE Log Tweaking and Notes; 2024-05-10 12:32:42 -04:00
lwvmobile
3d1e28fb3a Fix Error Handling and Error String on Pulse Input and Output Opening #259 2024-05-10 12:08:38 -04:00
lwvmobile
c07fa3a0bc Cast &err into pa_simple_new on ALL calls to the function (missed a few in haste); 2024-05-08 09:33:38 -04:00
lwvmobile
ef94b311fa Add Error Handling and Error String on Pulse Input and Output Opening #259 ; Change Input 'Name' on M17 Voice Input so it doesn't default to same source as RF Signal Input; 2024-05-06 21:46:29 -04:00
lwvmobile
79d5b795e3 Merge pull request #257 from ilyacodes/aw-dev/standard-test
EDACS: Correctly identify test calls on standard
2024-04-27 11:08:13 -04:00
ilyacodes
d0c20be7f3 EDACS: Correctly identify test calls on standard 2024-04-27 09:54:59 -04:00
lwvmobile
6833275960 Merge pull request #256 from lwvmobile/aw_dev_timefix
Consolidate and Fix Time and Date Functions #255
2024-04-26 21:47:47 -04:00
lwvmobile
601a1ad2d1 TIME: Fix printFrameSync Oopsie; NULL PTR on Debug symbolfile; 2024-04-25 21:23:20 -04:00
lwvmobile
db036f4dfc TIME: Set Allocated Pointers to NULL after free()'d; 2024-04-25 18:22:28 -04:00
lwvmobile
7bcd29abec NCURSES: Move timestr/datestr around; 2024-04-25 16:15:44 -04:00
lwvmobile
c5b36af672 Add .bin loop 'debug mode' on -J; 2024-04-25 16:14:59 -04:00
lwvmobile
9da8544408 TIME: malloc and HHmmss Nits; Remove Unneeded time/date strings from Ncurses; 2024-04-25 11:27:26 -04:00
lwvmobile
ab9a9ddab3 TIME: NULL Check Before free(timestr); 2024-04-25 11:06:13 -04:00
lwvmobile
ceb695af01 NCURSES: Remove Extra Fence Post on EDACS Call History; 2024-04-25 09:24:01 -04:00
lwvmobile
1ffddf823f Fix and Consolidate Date and Time Functions (WIP); #255 2024-04-24 16:42:25 -04:00
lwvmobile
499134bc2d DMR: Reset Color Code If Not Trunking and NoCarrier; 2024-04-24 13:01:45 -04:00
lwvmobile
7a9763c6c7 DMR: Init Payload Buffer; Fix MS Data Collection; 2024-04-24 13:00:13 -04:00
lwvmobile
db7bc75739 DMR: Fix EMB_PDU CC Assignment; 2024-04-24 12:33:04 -04:00
lwvmobile
bd1dcd2a7f DMR: Set CC on MS Voice; QR Correction Limit; 2024-04-21 18:18:14 -04:00
lwvmobile
bc205cfe00 DMR: Fix Color Code Assignment, Display, and Logging; 2024-04-21 17:49:46 -04:00
lwvmobile
0f3dcf47ea Merge pull request #254 from ilyacodes/aw_dev-colour
EDACS: Fix colour for test channel updates
2024-04-21 12:43:13 -04:00
ilyacodes
3f165571d2 EDACS: Fix colour for test channel updates 2024-04-21 09:52:09 -04:00
lwvmobile
b2450b1924 Merge pull request #253 from ilyacodes/trbo-bp
DMR: Fix incorrect MotoTRBO Basic Privacy mask
2024-04-19 22:58:15 -04:00
ilyacodes
061703db7b DMR: Fix incorrect MotoTRBO Basic Privacy mask
Tested with an R7.

Basic Privacy key: `73_dec`
Encrypted silent voice: `860DD7D3F2AC80`
Mask: `7E0C7E4C7E4C00`
2024-04-19 21:01:55 -04:00
lwvmobile
50f4327306 PA: Adjust Input Fragsize / Latency;
M17: Misc Notes About UDP Audio;
2024-04-18 11:15:42 -04:00
lwvmobile
90206eac92 Patch: Add the AFD "April Fools Day" Ghost Box Gag Update as a patch to bring back around Halloween; 2024-04-16 22:43:22 -04:00
lwvmobile
f1a5d6f870 Patch: Make the Moto Type II Starter Pack a Patch so I can delete the branch for it and prevent having to do a bunch of rebase / merge conflict resolutions on between those branches later; #247 2024-04-16 22:40:00 -04:00
lwvmobile
ca506672a8 Merge pull request #251 from ilyacodes/testcall
EDACS: Test Call improvements
2024-04-16 09:00:24 -04:00
lwvmobile
3041713eb3 M17: Fix Compiler Error if librtlsdr not found / installed; 2024-04-16 06:03:05 -04:00
lwvmobile
dbc645e7b0 EDACS: Fix Unk4 Value EA Dynamic Regrouping; #252 2024-04-15 09:40:53 -04:00
lwvmobile
5d205800aa EDACS: Fix Bit Shift on EA Patch Info; Misc; #252 2024-04-15 09:30:22 -04:00
lwvmobile
e5d11c81f3 EDACS: More WIP/Tests on EA Dynamic Regrouping2; #252 2024-04-15 07:47:15 -04:00
lwvmobile
d86c520509 EDACS: More WIP/Tests on EA Dynamic Regrouping; #252 2024-04-15 07:17:07 -04:00
ilyacodes
854b421235 EDACS: fix group patch shift size 2024-04-14 11:03:50 -04:00
ilyacodes
8206a5f3f4 EDACS: print agency/fleet calls in logs 2024-04-14 10:05:09 -04:00
ilyacodes
0568475d59 EDACS: custom format for custom AFS patterns 2024-04-14 10:04:52 -04:00
ilyacodes
b5a43031f9 EDACS: rename functions to lowerCamelCase style
It's, like, mildly more consistent... and is subtly shorter, which is handy for some cases.

Though yeah we have functions with both styles in the same file.
2024-04-14 09:52:22 -04:00
ilyacodes
ba41ba57f6 EDACS: fix vc_call_type for EDACS_IS_TEST_CALL 2024-04-14 09:42:43 -04:00
ilyacodes
d84136dc92 EDACS: show agency/fleet call on channel updates too 2024-04-14 09:40:03 -04:00
ilyacodes
ad78373b43 EDACS: fix width of source for non-EA data calls 2024-04-14 09:12:26 -04:00
ilyacodes
8980207fd6 EDACS: fix wrong comment 2024-04-14 09:12:01 -04:00
ilyacodes
33d8ee70d9 EDACS: compute AFS masks using math, not copy/paste 2024-04-13 17:15:44 -04:00
ilyacodes
b86cd1bc3c EDACS: agency call and fleet call are mutually-exclusive 2024-04-13 16:52:16 -04:00
ilyacodes
57c22b484d EDACS: ugh have to pass state too 2024-04-13 16:31:27 -04:00
ilyacodes
834bd57ea6 EDACS: logging nit 2024-04-13 16:23:32 -04:00
ilyacodes
7e26b7b902 EDACS: Show agency and fleet calls based on AFS 2024-04-13 16:22:52 -04:00
lwvmobile
4eb2e770c8 EDACS: Redo Parts of EA Patch / Regroup Based on Newer Observations and Remove Overlapping Bit Range; 2024-04-13 16:19:52 -04:00
ilyacodes
0208f6240c EDACS: Fix copypasta typo in new AFS logic 2024-04-13 15:38:31 -04:00
ilyacodes
db88bfff8d EDACS: missing space 2024-04-13 14:48:32 -04:00
ilyacodes
a78b88cb90 EDACS EA: tiny log string change 2024-04-13 14:19:10 -04:00
ilyacodes
a42dd9db83 EDACS: update line telling user to specify EDACS type 2024-04-13 10:58:49 -04:00
ilyacodes
a7d7cf1c2e EDACS EA: Dynamic Regroup log consistency 2024-04-13 10:56:51 -04:00
ilyacodes
1ec8bb5c8b ncurses: trim trailing whitespace 2024-04-13 10:51:04 -04:00
ilyacodes
d8e672f796 EDACS EA: make System Dynamic Regroup KWHT so it doesn't conflict with test calls 2024-04-13 10:48:07 -04:00
ilyacodes
b577397d22 EDACS ncurses: remove extra printf argument 2024-04-13 10:44:37 -04:00
ilyacodes
832afa6c5a EDACS EA: comment 2024-04-13 10:42:26 -04:00
ilyacodes
b667d25f2a EDACS EA: cosmetic updates to I-Call/Test Call logging 2024-04-13 10:41:56 -04:00
ilyacodes
e237b5541b EDACS: Test calls should be KMAG(enta) 2024-04-13 10:40:32 -04:00
ilyacodes
bf62106953 EDACS: Differentiate test call update from individual call update on standard 2024-04-13 10:36:40 -04:00
ilyacodes
09b181449f EDACS: Differentiate test call from individual call on standard 2024-04-13 10:27:37 -04:00
ilyacodes
c073bc49c1 EDACS: Consistency for CC LCN message logging 2024-04-13 10:25:38 -04:00
ilyacodes
7b2a2031a2 EDACS: Consistency for Initiate Test Call message logging 2024-04-13 10:25:22 -04:00
ilyacodes
a90a2dadd4 EDACS: Prettier test call display 2024-04-13 10:24:10 -04:00
ilyacodes
c21aa98034 EDACS: Fix incorrect indexer for test call 2024-04-13 10:20:53 -04:00
ilyacodes
c967e1500c EDACS: Rename EDACS_IS_TESTCALL flag 2024-04-13 10:19:36 -04:00
lwvmobile
99212cc139 EDACS: Differentiate EA Test Call Assignment and Update; 2024-04-13 03:50:07 -04:00
lwvmobile
caab348a39 EDACS: Fix EA Test Call in Call History; 2024-04-13 03:21:59 -04:00
lwvmobile
f799374183 EDACS: EA Test Call Continuation (I-CALL zero); Ncurses Display of Test Call; Test Call Type; Notes; 2024-04-13 02:55:38 -04:00
lwvmobile
1f8a129137 M17: Fix Misc Cosmetic Output on IP Frame; 2024-04-13 01:39:55 -04:00
lwvmobile
ba11725087 EDACS: EA Adjacent Site Index Values and Definitions; 2024-04-12 18:01:04 -04:00
lwvmobile
79f8503c09 EDACS: Tweak EA Patch / Regroup Message; Add Comments; 2024-04-12 17:37:59 -04:00
lwvmobile
5c7f285b9d EDACS: Tweak Regroup Message Verbosity; Tweak Patch Verbosity; 2024-04-12 16:05:18 -04:00
lwvmobile
b7415e1855 EDACS: Better EA Patch Message Decoding(WIP); 2024-04-12 15:04:06 -04:00
lwvmobile
3def1f59e5 M17: Misc Output Tweaks; 2024-04-12 11:54:08 -04:00
lwvmobile
7b8a79b8ea Merge pull request #250 from ilyacodes/voting
EDACS: implement voting error-correction algorithm, add new EA commands, refactor message parsing
2024-04-12 11:52:10 -04:00
ilyacodes
9695438fcd EDACS EA: system info and site info parsing 2024-04-11 07:57:55 -04:00
ilyacodes
49cd974dcb EDACS EA: log formatting 2024-04-10 22:32:43 -04:00
ilyacodes
739d373204 Merge branch 'voting' of https://github.com/ilyacodes/dsd-fme into voting 2024-04-10 22:09:36 -04:00
ilyacodes
896cb83eb2 EDACS EA: log and file formatting 2024-04-10 22:09:35 -04:00
ilyacodes
22f1261efa EDACS EA: log and file formatting 2024-04-10 22:07:45 -04:00
ilyacodes
4648b9c8eb EDACS EA: correct log output format 2024-04-10 22:04:00 -04:00
ilyacodes
e77770f608 EDACS: trim trailing whitespace 2024-04-10 19:59:08 -04:00
ilyacodes
bfa2ae8bc4 EDACS EA: Add System Dynamic Regroup Plan Bitmap command 2024-04-10 19:58:54 -04:00
ilyacodes
9c13d21f69 EDACS EA: add Unit Disable/Enable command ("kick") 2024-04-10 19:58:42 -04:00
ilyacodes
16ce501582 EDACS EA: remove dead "kick" command code 2024-04-10 19:58:27 -04:00
ilyacodes
61617db239 EDACS: remove BCH from messages prior to parsing them 2024-04-10 19:58:11 -04:00
ilyacodes
ac74a9c80e EDACS: start using new voting (for real) 2024-04-10 19:32:31 -04:00
ilyacodes
c8812db585 EDACS: remove comparison to pre-voting BCH check logic 2024-04-10 19:22:49 -04:00
ilyacodes
95aaa8fc2e EDACS: implement voting algorithm for FR BCH checks 2024-04-10 19:22:04 -04:00
lwvmobile
deb9dbed61 M17: Fix SRC Values in IP Frame Headers and Decode them; 2024-04-10 18:47:58 -04:00
lwvmobile
0feb8dc73c M17: MPKT Decode LSF Info; Misc Output Tweaks; 2024-04-10 09:36:16 -04:00
lwvmobile
6bfbdbd9df M17: MPKT Buffer Size Fix; CRC Fix; 2024-04-10 09:17:44 -04:00
lwvmobile
2160b369bb M17: Send / Receive PKTs with IP Frame WIP; 2024-04-10 08:15:36 -04:00
lwvmobile
de91defc20 DMR Con+ Output Tweaks; Complier Warning Fix; 2024-04-09 21:39:13 -04:00
lwvmobile
3fbff95b2b Initialize RRC Input Filter Memory; Misc Work; Change input/output CLI for M17 UDP IP Frames to prevent accidental triggers on input files that are named with m17; 2024-04-09 18:45:53 -04:00
lwvmobile
6facababd7 EDACS: Move TG Hold Display; Fix TG Hold Override when I-Call; 2024-04-09 13:38:07 -04:00
lwvmobile
dc3dc80d8f M17: Tweak Ncurses Display on Encoder; 2024-04-09 12:07:23 -04:00
lwvmobile
202fbf3dbc M17: Make IP Frame UDP Input/Output Configurable via CLI -i and -o; 2024-04-09 11:43:41 -04:00
lwvmobile
f6283f4807 M17: Enable Ncurses Terminal for IP Frame; Misc; 2024-04-09 10:04:39 -04:00
lwvmobile
1f7ddbecdf M17: UDP Socket Receiver and IP Frame Tweaks; 2024-04-09 01:20:22 -04:00
lwvmobile
129af0ba9e M17: Misc Handling / Display Tweaks; 2024-04-08 18:04:39 -04:00
lwvmobile
eed267ed3f EDACS: Fix TG Hold Value Display if AFS; 2024-04-08 17:34:40 -04:00
lwvmobile
e195770181 M17: Cleanup / Decode IP Frame CONN and DISC; 2024-04-08 16:31:46 -04:00
lwvmobile
cbddea701a M17: Clean Misc Comments / Code / Typos; 2024-04-08 03:50:32 -04:00
lwvmobile
3eefa3365f M17: IP Frame Encoder / Decoder Fixes; 2024-04-08 02:45:47 -04:00
lwvmobile
d22f9ddfe3 M17: UDP IP Frame Decoder over STDIN; 2024-04-07 14:14:44 -04:00
lwvmobile
5c9416313a M17: Decode Extended CSD in Meta; 2024-04-07 04:31:20 -04:00
lwvmobile
4b063aaf97 M17: Decode META Field; 2024-04-07 03:29:37 -04:00
lwvmobile
bbfd4967cf M17: Misc Tweaks with Stream 1600; Misc Other; 2024-04-07 02:22:11 -04:00
lwvmobile
c5742350d1 M17: Use 3200 or 1600 Voice in STR Encoder; 1600 Arbitrary Data Encoder / Decoder; 2024-04-06 22:45:13 -04:00
lwvmobile
753286cdf6 EDACS: Add AFS Configuration Display to Ncurses; 2024-04-06 22:16:47 -04:00
lwvmobile
22028b37ed Variable AFS bit values and shift / mask calculations using -fh344 or -fH434; 2024-04-06 21:26:26 -04:00
lwvmobile
3483c736ba Merge pull request #248 from ilyacodes/afs
EDACS: fix AFS 4:4:3 display
2024-04-06 19:52:36 -04:00
ilyacodes
20989c31c8 EDACS: fix AFS 4:4:3 display 2024-04-06 12:47:46 -04:00
lwvmobile
cee797017b M17 - Misc Code / Comment Cleanup; 2024-04-04 09:20:08 -04:00
lwvmobile
bceac916fe M17 - Tweaks to LSF Frame Decoding; 2024-04-04 08:39:13 -04:00
lwvmobile
7d8a081e3f Convolutional Decoder Init / Tweaks; 2024-04-04 08:38:37 -04:00
lwvmobile
4bd36ece9a M17 - Change -Q / DSP output format to match expected float input to m17-packet-decode; 2024-04-03 00:18:19 -04:00
lwvmobile
b95644d5e5 Re-Enable Analog PBF as default; 2024-04-02 13:56:29 -04:00
lwvmobile
791cc17b27 socat note in example usage 2024-04-02 12:37:00 -04:00
lwvmobile
40b1b67b29 Ncurses Misc Cosmetic Fixes on Analog; 2024-04-02 11:39:35 -04:00
lwvmobile
b8cb4ad521 Add Analog Displays to UDP and OSS Output; 2024-04-02 11:33:28 -04:00
lwvmobile
6b50ca034b Add Note About netcat; 2024-04-02 11:21:33 -04:00
lwvmobile
43df9c3ff5 Set RTL Sample Multiplier Default to 2X; 2024-04-02 10:04:02 -04:00
lwvmobile
dff48692ca Disable Analog PBF as default; 2024-04-01 13:51:24 -04:00
lwvmobile
44a8085463 Seperate CLI switch for Analog Audio Out Gain; 2024-04-01 13:29:10 -04:00
lwvmobile
934eb8264e Fix Audio Smoothing Variable Type; 2024-04-01 13:15:08 -04:00
lwvmobile
dc1bb6a55e CLI Options for Audio Filtering; 2024-04-01 13:11:23 -04:00
lwvmobile
fe9b5b51e8 Reconfigure RTL Volume Multiplier to be more dynamic; 2024-04-01 11:20:25 -04:00
lwvmobile
f35aa046c1 Tweak Ncurses Display Alignment for HPF; Document Keyboard Shortcuts for Filters; 2024-04-01 10:58:26 -04:00
lwvmobile
a708fa5f6e P25: Fix Warnings on MPDU UU_V Ext Grant; 2024-03-30 17:29:08 -04:00
lwvmobile
bb78b1bf27 P25: Fix Extended Channel Grants/Updates/Full SUID Values; 2024-03-30 17:21:10 -04:00
lwvmobile
931fae62c6 NCURSES: '3' Key Slot Preference Cycle; 2024-03-29 18:46:49 -04:00
lwvmobile
c1e657a5e3 DMR: Simplify CON+ Tune Away Logic; 2024-03-29 17:52:31 -04:00
lwvmobile
1e2d42ce23 EDACS: Fix No Color Build Compile Error; 2024-03-28 14:18:12 -04:00
lwvmobile
5d367a5c27 Upload Correct Updated Patches; 2024-03-28 14:17:16 -04:00
lwvmobile
1d03f7efbf Delete Broken / Incomplete Patches Uploaded Last Night; 2024-03-28 14:17:05 -04:00
lwvmobile
5125fd4d6c Delete Outdated Patches; 2024-03-28 14:16:56 -04:00
lwvmobile
d079035adf Update Patches For Easy Application; 2024-03-28 14:16:46 -04:00
lwvmobile
06bfcdacc2 Remove Integrated Patches; 2024-03-28 14:16:30 -04:00
lwvmobile
ab844202bc Squashed commit of the following:
commit 833e0173f24b12a12ff80f9a35fb43107d355cc3
Author: lwvmobile <lwvmobile@gmail.com>
Date:   Tue Mar 26 22:51:02 2024 -0400

    Fix Slot Preference Depending on Build;

commit 716577ab09c0cee68bca3bcdcbaaa7cfa3be4f97
Author: lwvmobile <lwvmobile@gmail.com>
Date:   Tue Mar 26 22:27:24 2024 -0400

    M17 - Voice Playback Only If Enabled; Misc;

commit c0f9818cf38ce7f127370f19ec4afa2457cef19a
Author: lwvmobile <lwvmobile@gmail.com>
Date:   Tue Mar 26 17:39:34 2024 -0400

    Add DMR/P25p2 Stereo Channel Patch;

commit 1a0baf0a17ccf8cc0eb0a01a809269354480d1d1
Author: lwvmobile <lwvmobile@gmail.com>
Date:   Tue Mar 26 17:37:46 2024 -0400

    Add DMR Cap+ Faster Rest Patch;

commit 9f5b52aa8f20bfe3eab5413f2c3fa41003d53b3c
Author: lwvmobile <lwvmobile@gmail.com>
Date:   Tue Mar 26 17:36:24 2024 -0400

    Disable EDACS Analog Debug;

commit 7dd0de67b602f0acd111200f838fbb1a0541a8bf
Author: lwvmobile <lwvmobile@gmail.com>
Date:   Tue Mar 26 17:36:04 2024 -0400

    Squashed commit of the following:

    commit 95d46fb35d6cb6fb0a9825084f4c2accf8edad4a
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Mon Mar 25 17:48:57 2024 -0400

        Enable HPF_D by default; Increase manual analog gain to 50;

    commit 1f37837664e16760b5cbf5653fc4d829ee6cce83
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Mon Mar 25 08:43:17 2024 -0400

        Enable HPF_D on M17 Voice;

    commit 9bbe4de7fd
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Sun Mar 24 16:08:16 2024 -0400

        EDACS: Digitize Analog For Analysis of 'Data Burst' Like Behavior;

    commit 9249b7a943
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Sun Mar 24 12:28:26 2024 -0400

        Simply Mono Short Playback;

    commit 89ad0f17e3
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Sat Mar 23 21:12:44 2024 -0400

        Add HPF to SS4, SS3, and SS Audio Methods;

    commit e8184c7fbd
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Sat Mar 23 17:13:44 2024 -0400

        RTL - Add The Sample / Volume Multiplier as a user configurable option;

    commit ee04d11116
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 23:15:04 2024 -0400

        Fix HPF_D so it actually works correctly;

    commit e549b21497
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 20:11:34 2024 -0400

        Make Analog Auto Gain Control Mostly Tolerable;

    commit 2f9e0525fe
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 18:20:38 2024 -0400

        User Toggle HPF on Digital;

    commit ff58d3a6fa
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 18:10:15 2024 -0400

        User Toggles and Displays for Filters;

    commit b6fc17c506
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 15:55:09 2024 -0400

        More Analog Manual Audio Gain Tweaks;

    commit 076b9fbf04
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 06:26:10 2024 -0400

        Add SQL Hit on EDACS if Colors Disabled;

    commit 59fe47ef05
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 02:23:08 2024 -0400

        Disable HPF Test on Digital Voice;

    commit 4a63068ce1
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Thu Mar 21 23:39:43 2024 -0400

        Misc Code Organizing; audio_gainA Tweaks;

    commit 3585e7e594
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Thu Mar 21 13:18:31 2024 -0400

        Test Tweak to RTL Sample Multiplier;

    commit fa5b25283f
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Thu Mar 21 13:18:07 2024 -0400

        Adjust Manual Mic Gain on M17 Encoder; Ncurses Display;

    commit c985fea035
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Thu Mar 21 12:34:01 2024 -0400

        Misc Notes on using raw_rms values during testing;

    commit b273e5b7be
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Thu Mar 21 12:31:33 2024 -0400

        Bugfix for EDACS Analog Segfault when using the digitize function for an extended period;

    commit eadf3fdf23
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Thu Mar 21 10:12:04 2024 -0400

        Analog Gain Has Own Variable; Ncurses Keys; Misc;

    commit 0debcc647e
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Thu Mar 21 08:49:51 2024 -0400

        Filtering Misc Cleanup;

    commit 98e10b2627
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Thu Mar 21 00:02:21 2024 -0400

        Automatic Gain On Analog WIP; Manual Gain Control;

    commit 89736ae543
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Wed Mar 20 10:22:20 2024 -0400

        Passband Filter Testing on Raw Analog / EDACS / M17 Encoder;

    commit 43f6218129
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Wed Mar 20 09:03:02 2024 -0400

        Passband and Notch Filter Setup; Debug Output;

    commit 35a1b53867
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Tue Mar 19 22:35:36 2024 -0400

        HPF: Only Use On RTL Input when M17 Encoder Uses It;

    commit b9949f0d80
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Tue Mar 19 17:31:59 2024 -0400

        Disable LFP on EDACS Analog Out;

    commit 3666740674
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Tue Mar 19 13:42:07 2024 -0400

        Test HPF On Digital Voice Out;

    commit ef13343925
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Tue Mar 19 12:46:27 2024 -0400

        RTL_FM Input for Analog/M17 Encoder;

    commit 2b7de90474
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Tue Mar 19 11:03:55 2024 -0400

        New Analog Audio Filters WIP;

commit 3b9f9f5a3befb295da284379262323fad7d69c7a
Author: lwvmobile <lwvmobile@gmail.com>
Date:   Tue Mar 26 17:33:34 2024 -0400

    Squashed commit of the following:

    commit a5c5be3b955a82cc72f1486ff87d7c1b4893295f
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Tue Mar 26 17:28:35 2024 -0400

        EDACS: Standard display rewrite, parsing/RE fixes, tune i-calls and all-calls (#246)

        * EDACS EA: Fix reversed TDMA/data calls

        * EDACS: deduplicate ncurses printing logic

        * EDACS: pass call state via new state struct field

        * EDACS: RE some differences from Standard spec

        * EDACS: show state for data calls

        * EDACS: tune individual calls on Standard

        * EDACS: tune all-calls on Standard

        * EDACS: properly identify emergency on channel updates

        * EDACS: fix build break

        * EDACS: fix conditions for refreshing the display source

        * EDACS EA: Identify calls as voice for display

        * EDACS: voice channel update emergency refactor

        * EDACS: Show interconnect calls in call log

        * EDACS EA: show unknown data channel assignments in log

        * EDACS: check LCN is not 0 before assigning it

        * EDACS: C operator precedence is dumb

        * Initialize edacs_vc_call_type

        * use j and not i in call_matrix for call history;

        ---------

        Co-authored-by: lwvmobile <lwvmobile@gmail.com>

    commit c8d00846b1
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sun Mar 24 17:48:46 2024 -0400

        EDACS: Display cached call source on Standard, tune group calls on assignment (#241)

        * Trim trailing whitespace

        * EDACS: Display cached call source on Standard

        The logic in `edacs-fme.c` didn't work, in retrospect, because it would have depended on getting back-to-back messages for the same call. In practice, that is unlikely even on an idle system as system state gets displayed.

        Instead, cache on the display end, for a "better" user experience.

        * EDACS: Pad channel freq to "000.000000 MHz"

        * EDACS: Process/tune group calls on assignment

    commit 8d432e8b3e
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sun Mar 24 12:29:22 2024 -0400

        EDACS: ESK fixes, RE of standard channel assignments, cleanups (#238)

        * EDACS: Make i-calls very obvious on standard

        * EDACS: abstract target for Interconnect Channel Assignment

        * EDACS: little shortcut example updates

        * EDACS: Apply ESK to both FR1 and FR4

        * EDACS: Group channel assignment by mode

        * EDACS: Merge MT-A 0/1 and 2/3 cases

    commit 0440dea1de
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Sun Mar 24 02:47:09 2024 -0400

        EDACS: Fix Call History For Standard Maybe;

    commit 208f188e55
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sat Mar 23 21:35:42 2024 -0400

        EDACS: Speculative RE of MT-A value 0, pretty colours (#231)

        * EDACS: fix log formatting

        * EDACS: Speculative RE of MT-A value 0

        * EDACS: CC message pretty colours

        * EDACS: little formatting

        * EDACS: eh make interconnect magenta

    commit 36f76a7e21
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sat Mar 23 17:35:45 2024 -0400

        EDACS: Fix copy/paste error (#230)

        I went through by hand and I'm confident this is the last of the `get_lcn_status_string()` errors.

    commit 4bc73d8c68
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sat Mar 23 17:24:32 2024 -0400

        EDACS: Rewrite Standard/Networked parsing per TIA/EIA TSB 69.3 (#229)

        * EDACS EA: refactor log messages for consistency

        * EDACS: Log LCN status values

        * EDACS EA: channel assignment vs update

        * EDACS: Implement TIA/EIA TSB 69.3

        * EDACS: clean up Site ID message

        * EDACS: Actually process call for Channel Update

        * EDACS: Update display for Standard calls

        * EDACS: Format of Voice Group Channel Assignment

        * EDACS Standard: Log LCN status values

        * EDACS: Rebase and fix some issues

        * EDACS: Fix copy/paste error

    commit 03507055a4
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sat Mar 23 16:05:09 2024 -0400

        EDACS: add EA messages / start mass Standard refactor (#226)

        * EDACS EA: refactor log messages for consistency

        * EDACS EA: channel assignment command (unknown data)

        * EDACS EA: status/message command

        * EDACS Standard: Refactor variable declarations

        * EDACS Standard: log raw payloads for debugging

        * EDACS: Fix typing

        * EDACS EA: update status/message CC command

        * EDACS: Log LCN status values

        * EDACS: String format

        * EDACS EA: channel assignment vs update

        * EDACS: fix syntax error

        * EDACS: change string for reserved LCN status

    commit fbe5fd2093
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Fri Mar 22 15:26:50 2024 -0400

        EDACS EA: emergency calls, MT1 fixes, logging improvements (#221)

        * EDACS EA: Fix i-call MT1 after ESK changes

        * EDACS EA: Fix all-call ncurses display

        * EDACS EA: Make detailed log slightly more readable

        * EDACS EA: Improve colours in logs

        * EDACS EA: Space in logs for consistency

        * EDACS EA: Fix MT1 for analog group voice after ESK change

        * EDACS EA: add parsing for emergency calls

    commit 413e5f76a2
    Merge: de9127c 388a57d
    Author: lwvmobile <59371473+lwvmobile@users.noreply.github.com>
    Date:   Fri Mar 22 06:59:31 2024 -0400

        Merge pull request #220 from lwvmobile/edacs_manual_modes

        Edacs manual modes

    commit 388a57d8fc
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 05:28:11 2024 -0400

        EDACS: Re-enable the -9 switch to maintain user compatability; Fix Missing Bracket on non color mode;

    commit 058099f1aa
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 03:24:57 2024 -0400

        EDACS: Tweak Mode Toggle Display; Add Frame Dump on No Mode Set;

    commit 68aa6b018e
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 02:19:38 2024 -0400

        EDACS: Update Docs to Reflect Changes;

    commit c404f3c48c
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 02:01:09 2024 -0400

        EDACS: Ncurses Display Working Mode Tweaks;

    commit b2d1608eb7
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 01:08:28 2024 -0400

        EDACS: Toggle Keys A and S for Mode Selection;

    commit a4553a0a0a
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Fri Mar 22 00:45:37 2024 -0400

        EDACS: Remove Auto Detect Code; Make CLI Switches;

    commit de9127cfb4
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Thu Mar 21 21:02:53 2024 -0400

        EDACS: support for EA system all-calls (#214)

        * Refactor debug printing a bit

        * Clean up group call logic

        * Minor changes to debug printing

        * EDACS EA: support for system all-calls

        * EDACS: split out MT1 for TDMA call since we can't decode it anyway

        * Refactor identifying call mode (digital/analog)

        * Maintain consistent indentation for all MT1

        * EDACS: Fix Compiler Error.

        Had an extra right bracket on line 383

        ---------

        Co-authored-by: lwvmobile <59371473+lwvmobile@users.noreply.github.com>

    commit c85dd60399
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Tue Mar 19 17:38:30 2024 -0400

        EDACS: NET/STD LCN > 0 Check;

    commit bed766a86e
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Tue Mar 19 09:34:10 2024 -0400

        EDACS: STD/NET Don't Tune Unless CC LCN Set;

    commit 69f532a022
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Mon Mar 18 11:41:58 2024 -0400

        EDACS: EA I-Call decoding improvements (#205)

        * EDACS: formatting nit

        * EDACS: add name to credits

        * EDACS: Handle initial grant vs grant update for i-call

        * EDACS: consistency for group vs i-call

        * EDACS: file naming for i-call recordings

        * EDACS: EA refactor when MT1 is 0x1F

        * EDACS: check we know CC LCN before leaving it

        * EDACS: fix breaking change for Standard

        Revert mistake in f68367c4f3

        * Fix patent number

        * EDACS: Fix Compiler Error 1;

        Fix Rogue Copy Paste

        * EDACS: Add MT1, MT2, and FR1 and FR4 Dumps on Payload;

        ---------

        Co-authored-by: lwvmobile <59371473+lwvmobile@users.noreply.github.com>

    commit a7de24c47b
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Mon Mar 18 07:47:34 2024 -0400

        EDACS: fixes and improvements to EA analog and i-call parsing (#204)

        * Fix MT1 math given esk_mask value is 0xA0

        * EDACS: Clean up formatting for I-Calls

        * EDACS: typo, fix the TGID for group calls

        Fix copy-pasta

        * EDACS: Fix MT2 for I-Calls

        Incorrectly copied decimal values as hex - obviously MT2 is only 4 bits so it cannot be greater than 15.

        * EDACS: check LCN is > 0 before trying to tune

        An EA CC sometimes includes commands that parse as LCN 0 - but otherwise valid - analog call voice grants for TG 1. Since LCN 0 is not valid, ensure that we don't try to tune to them while we try to figure out what they're about.

        * EDACS: Process "login" message on CC

        Log "login" messages sent on the CC. Verified behaviour against UniTrunker.

    commit 10eacd99cc
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sun Mar 17 18:56:41 2024 -0400

        EDACS: Clean up formatting for I-Calls (#203)

        * Fix MT1 math given esk_mask value is 0xA0

        * EDACS: Clean up formatting for I-Calls

    commit ebe6e8fc65
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sun Mar 17 18:02:12 2024 -0400

        Fix MT1 math given esk_mask value is 0xA0 (#202)

    commit 8619612b76
    Author: lwvmobile <lwvmobile@gmail.com>
    Date:   Sat Mar 16 22:42:44 2024 -0400

        EDACS: Setup Analog Calls and WAVs on EA and ICALL;

    commit 9ac1573f0b
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sat Mar 16 17:17:14 2024 -0400

        EDACS: Add MT1 value / logging for analog group calls (#198)

        * Add MT1 value / logging for analog group calls

        * Respect user preference for tuning to group calls

        * Revert "Respect user preference for tuning to group calls"

        This reverts commit 83ac8feab7.

    commit 0aa01a45ef
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sat Mar 16 17:16:52 2024 -0400

        EDACS: Respect user preference for tuning to group calls (#201)

    commit f68367c4f3
    Author: ilyacodes <33097525+ilyacodes@users.noreply.github.com>
    Date:   Sat Mar 16 17:16:20 2024 -0400

        EDACS: Add parsing for individual calls (#200)

        * EDACS: Add parsing for individual calls

        This change adds parsing for I-Calls on EA systems. Both analog and ProVoice modes are parsed and processed. See related issue for discussion.

        * Respect user preference for tuning to private calls

        * EDACS: Respect user preference for tuning to private calls

        * EDACS: Handle i-call target in ProVoice logging

        * EDACS: Show i-calls distinctly from group calls
2024-03-26 22:59:05 -04:00
ChronosXYZ
f05ddf8fcd Add Nix flake for the project (#232)
* Add Nix flake for the project

* Add `codec2` library for M17 encoding support
2024-03-23 22:13:12 -04:00
lwvmobile
f36df3ea09 NCURSES - Voice Error as Trunc Value to perserve display uniformity; 2024-03-19 18:05:36 -04:00
lwvmobile
df28ebe573 M17 - PKT CRC Immediately Following Terminator Byte and Fixes; 2024-03-17 19:28:53 -04:00
lwvmobile
3a44affc63 Fix/Simplify/Trash Legacy 48k Upsample Functions; 2024-03-15 22:22:06 -04:00
lwvmobile
19be1db46c M17 - IP Frame WIP2; 2024-03-15 19:16:44 -04:00
lwvmobile
7101c3588a M17 - Enable Vox Mode for Voice Stream (testing); 2024-03-15 17:43:53 -04:00
lwvmobile
5573244583 M17 - Transmuting Examples; Add Passive Analog Monitor Mode -fA; 2024-03-15 13:09:56 -04:00
lwvmobile
ad1db34c86 M17 - Make Input Rate Configurable via -M M17 User String. 2024-03-15 11:31:33 -04:00
lwvmobile
379cc25099 M17 - Update Example Page to Include Using M17 Encoder/Decoder; 2024-03-14 19:58:41 -04:00
lwvmobile
df6a6ce066 M17 - Persistent TCP Retry When M17 Decoding Enabled; 2024-03-14 19:32:07 -04:00
lwvmobile
27735ccc01 Merge pull request #197 from LZ2DMV/patch-1
Update Example_Usage.md
2024-03-14 17:48:14 -04:00
LZ2DMV
d614eb088e Update Example_Usage.md
Add example for recording 48k/1 audio with rtl_fm
2024-03-14 22:47:29 +02:00
lwvmobile
f1088e9471 M17 - Fix Symbol Stream to be compatible with m17-packet-encode.c from m17_implelemtations; 2024-03-14 07:10:43 -04:00
lwvmobile
f6b8cc71cc M17 - Fix Binary Output to Append; 2024-03-13 10:29:13 -04:00
lwvmobile
d35144e0e9 M17 - Fix PKT CRC +1 on len value; Output Binary Bitstream to file with -Q option; 2024-03-13 10:22:55 -04:00
lwvmobile
f7fe1e066c M17 - Fix Char Array Size Compiler Warnings; 2024-03-12 22:19:13 -04:00
lwvmobile
18366dd294 M17 - Fix PKT Decoder PBC to Internal Counter; 2024-03-12 22:05:17 -04:00
lwvmobile
106d717157 M17 - Implement RRC Filtering; 2024-03-12 21:22:29 -04:00
lwvmobile
296775d231 M17 - Do not include Data Type Byte in PKT CRC; 2024-03-12 17:48:58 -04:00
lwvmobile
114d8d7dfc M17 - Fix / Initialize User Input Strings and Fix CAN Value; 2024-03-12 17:48:38 -04:00
lwvmobile
2392f57d62 M17 - Check Caps and Special CSD Values; 2024-03-12 14:20:58 -04:00
lwvmobile
a0b199d208 M17 - Allow LSF Decode on CRC Err if AF Bypass Enabled; 2024-03-12 14:05:20 -04:00
lwvmobile
6c4584a00a M17 - User CAN/DST/SRC and SMS at CLI; 2024-03-12 13:46:55 -04:00
lwvmobile
5d565c55a7 M17 - Fix PKT CRC to only include significant bytes; 2024-03-12 09:16:15 -04:00
lwvmobile
fbc902d16e M17 - Misc Cleanup and Disable Debug Messages; 2024-03-11 09:23:53 -04:00
lwvmobile
051a65f0bb M17 - Fix Misc PKT/SMS Encoding/Decoding Issues; 2024-03-11 09:09:14 -04:00
lwvmobile
ffc311e0e9 M17 - Fix CSD Encode For Reserved Values; 2024-03-11 06:45:55 -04:00
lwvmobile
d738eee5d9 M17 - Fix Cygwin M17 FrameSync Woes; (Initialize Synctest); 2024-03-10 20:31:30 -04:00
lwvmobile
58a00106d3 M17 - Packet Encoder and Decoder Misc Fixes; 2024-03-10 04:51:08 -04:00
lwvmobile
d0617714ca M17 - Packet Decoder WIP3; SMS Decoder; Fix Encoder strlen value; 2024-03-10 04:00:25 -04:00
lwvmobile
6ae3316cd1 M17 - Packet Decoder WIP2; 2024-03-10 03:43:30 -04:00
lwvmobile
c1577905cd M17 - Packet Decoder WIP; 2024-03-10 01:39:42 -05:00
lwvmobile
d12f6a1191 M17 - Simple Packet Encoder; 2024-03-10 00:56:27 -05:00
lwvmobile
0f5612fdd4 M17 - Simple BRT Encoder; Setup for PKT Encoder; 2024-03-09 19:38:09 -05:00
lwvmobile
a77fa83c80 M17 - Add PKT/BRT FS on Encoder; Reorganize RF Type Numbers; 2024-03-09 17:27:08 -05:00
lwvmobile
75bc2b7b35 M17 - Tweak Dead Air; Disable Non-Zero Fill; 2024-03-08 16:34:22 -05:00
lwvmobile
ac6284819a M17 - Misc Tweaks; 2024-03-08 11:13:05 -05:00
lwvmobile
2e09e5fdfa M17 - Non Zero Fill on LSF Meta Field; 2024-03-08 10:37:29 -05:00
lwvmobile
5c09130782 M17 - Implement libM17 Viterbi Decoder for LSF; 2024-03-08 09:41:19 -05:00
lwvmobile
677b064e97 M17 - Include libM17 Viterbi Decoder and Misc Math; 2024-03-07 22:22:19 -05:00
lwvmobile
a30512f4e4 M17 - Debug LSF Frame; Pack/Repack CRC; 2024-03-07 21:21:06 -05:00
lwvmobile
e20229208f M17 - Update Ncurses Terminal manually if not using internal decoder; 2024-03-07 13:40:40 -05:00
lwvmobile
f67bb81de2 M17 - Tweak Encoder Output WAV during deadair; 2024-03-07 12:29:09 -05:00
lwvmobile
f98cdfeb0f M17 - Encoder Add Forgotten Lines; 2024-03-07 11:50:30 -05:00
lwvmobile
ba264c1557 M17 - Audio RF Modulation(WIP2); Disable Current M17 Filter; Misc; 2024-03-07 11:19:59 -05:00
lwvmobile
11a08298ff M17 - Audio RF Modulation(WIP); 2024-03-07 01:24:59 -05:00
lwvmobile
72ac2f628b M17 - Fix FSN Variable Type; 2024-03-06 20:18:10 -05:00
lwvmobile
dd87bf77f8 M17 - Tweak Nonce/IV Warning; 2024-03-06 14:45:26 -05:00
lwvmobile
d730ca2c25 M17 - Flush Stored Decoder Meta when not Encoding; 2024-03-06 13:21:27 -05:00
lwvmobile
0d09baee3c M17 - Repack LSF Frame Before New Encoding Session; 2024-03-06 13:14:07 -05:00
lwvmobile
7ea26b68e7 M17 - Send New LSF on new Encode; EOT Bit Fixes; Cleanup; 2024-03-06 12:59:54 -05:00
lwvmobile
e7334a6c4f M17 - Misc Cleanup and Reference Updates; 2024-03-06 11:52:53 -05:00
lwvmobile
404dc772d4 M17 - IP Frame EOT/FN Fix; EncodeRF Prototype; Misc; 2024-03-06 10:44:30 -05:00
lwvmobile
7754123e30 M17 - LSF Encode (WIP); Initial FSN Bug Fix; Misc; 2024-03-05 22:23:08 -05:00
lwvmobile
16b950d5a0 M17 - Fix Encoder Nonce Refresh; 2024-03-05 20:32:29 -05:00
lwvmobile
0ba3fee968 M17 - IP Frame and UDP Socket Connect/Blaster(WIP); 2024-03-05 16:00:35 -05:00
lwvmobile
a2113fcdcc M17 - AES IV Replay Warning; 2024-03-05 12:44:19 -05:00
lwvmobile
ec7fbeeb22 M17 - Add Nonce to Encoder; 2024-03-05 12:27:40 -05:00
lwvmobile
5f969bf4aa M17 - Cleanup; Audio Tweaks; Fix Conv; Misc; 2024-03-02 19:26:48 -05:00
lwvmobile
8a197aea45 M17 - M17 STR Encoder Nucrses Support; 2024-03-02 02:21:38 -05:00
lwvmobile
c6bc10f1ba M17 - M17 STR Encoder and Playback (WIP); 2024-03-01 23:55:09 -05:00
lwvmobile
5830dfa991 M17 - Fix UDP Audio Output Type; 2024-03-01 23:29:28 -05:00
lwvmobile
fc44edb0fc Remove Old/Obsoleted Patches; 2024-02-27 09:04:25 -05:00
lwvmobile
cb02c0328c P25 - Better Handling of Trunking ENC Call Lockout; Fix Duplicate Channel Listing in Multi Grant Updates; 2024-02-27 08:57:15 -05:00
lwvmobile
71d79ff45b Update Patch For Testing; Remove Old Patches; 2024-02-21 15:57:48 -05:00
lwvmobile
c4e2730ced P25p2 - Trunking Slot Enabled Tweak; 2024-02-21 15:28:07 -05:00
lwvmobile
65fdd7c5b4 UDP Analog Audio Output; 2024-02-21 10:29:06 -05:00
lwvmobile
42fee3bd3e Merge pull request #191 from axpe95/audio_work
In MBE calls set err2 to hold accumulated value of errors
2024-02-21 09:33:50 -05:00
axpe95
b4d45af268 MBE calls set err2 to hold accumulated value of errors 2024-02-20 17:45:54 -08:00
lwvmobile
7125f2fa5e DMR - Con+ Fix Setting CC Frequency Condition; 2024-02-20 07:34:52 -05:00
lwvmobile
4993ed00a2 DMR - Con+ Call Grant TS Value Fix; 2024-02-19 14:45:53 -05:00
lwvmobile
a2b622a343 DMR - Con+ Tune Timeout / Return to CC Tweaks; 2024-02-19 14:32:11 -05:00
lwvmobile
c401035209 NXDN - Rolling CAC CRC fix (reset demodulator state); Scrambler SEED Fix Each PF; 2024-02-14 18:03:07 -05:00
lwvmobile
4324afc593 Merge pull request #189 from axpe95/decrypt_fix
fix nxdn scramber roll on facch1 after superframe
2024-02-14 13:17:16 -05:00
lwvmobile
de5b99dbb9 EDACS and Analog Monitoring - Apply Filtering Stack (DE,DC,PE, CL); Misc; 2024-02-12 13:18:56 -05:00
lwvmobile
374999df1f EDACS - Implement TCP Connection Error Checking on Analog; Misc Cleanup; 2024-02-11 14:08:23 -05:00
lwvmobile
ba7455c99e EDACS - Analog Audio and EOT Tweaks; Fix Rigctl SetMod; 2024-02-11 08:42:32 -05:00
axpe95
ad592cdc59 fix nxdn scramber roll on facch1 after superframe 2024-02-09 16:19:42 +02:00
lwvmobile
78b2dac71c Upload Experimental Patches For Testing; 2024-02-09 09:13:53 -05:00
lwvmobile
5d5f224f66 Merge pull request #188 from axpe95/audio_out_fix
Fix output to stdout
2024-02-09 08:56:47 -05:00
axpe95
c70762fbee Fix output to stdout 2024-02-09 15:07:17 +02:00
lwvmobile
166bbbbc72 DMR - P_Clear wait by trunk hangtime; RC PDU tweak; 2024-02-05 23:24:59 -05:00
lwvmobile
8bdcaa047a DMR - P_Clear Wait One Second on Initial Tune; 2024-02-05 14:17:48 -05:00
lwvmobile
ee557cc552 DMR - P_Clear Reorder TG Hold Priority; 2024-02-05 13:14:03 -05:00
lwvmobile
d7b99be51f Update Screenshots; Remove Old Patches; 2024-02-05 12:18:31 -05:00
lwvmobile
ed85d508ed DMR rc crc7 fix and rc element decode #187; fix/revamp p_clear and p_protect trunking logic; MTL patch; g_dmr patch; Misc; 2024-02-05 11:11:56 -05:00
lwvmobile
ffa8b053d7 Fix minor memory leak on timestr; 2024-01-30 23:43:32 -05:00
lwvmobile
c39ddbc7a7 P25p1 MFID90 Channel User; TG Hold CLI; DMR BS Stablilization and LE Fix; Updated Patches; OSS Jank Fix; Ncurses Keyboard Shortcuts for Return to CC and Manual Channel Cycling; Misc; 2024-01-27 16:54:01 -05:00
lwvmobile
fa7fd116a7 Update/Fix Some Docs; 2023-12-28 17:38:18 -05:00
lwvmobile
199913ce53 Remove Colon (:) from mbe output files (hh:mm:ss); 2023-12-28 17:20:47 -05:00
lwvmobile
1ac2d84dc0 DMR - Fix TIII Adj/Vote Online Offline Indicators; 2023-12-28 03:22:08 -05:00
lwvmobile
c55128fc21 Patch - Restore Correct Wolf Patch; 2023-12-27 18:26:01 -05:00
lwvmobile
a6cb8b6989 Patch - Delete Broken Wolf Patch; 2023-12-27 18:24:50 -05:00
lwvmobile
676c5f0f09 Patch - Cleanup Old/Obsolete Patches; 2023-12-27 18:08:52 -05:00
lwvmobile
9acc014274 Patch - Even More TDMA (DMR/P2) Mono Stereo Tests; 2023-12-27 18:05:23 -05:00
lwvmobile
2237d16696 Patch - More TDMA (DMR/P2) Mono Stereo Tests; 2023-12-27 05:26:24 -05:00
lwvmobile
180fd1bfb0 DMR - More Compact Vendor/Site Info Ncurses; 2023-12-27 04:05:46 -05:00
lwvmobile
77bcff0dcc Patch - Fix g_dmr patch for current updates; 2023-12-26 21:08:56 -05:00
lwvmobile
b43e566f98 Patch - Test DMR Mono/Stereo Interleaving; #181 2023-12-26 20:55:59 -05:00
lwvmobile
f4e0412368 DMR - Rework C_ALOHA, SYSCODE and C_BCAST; #182 2023-12-26 15:54:18 -05:00
lwvmobile
18ec24f0e8 P25 -- TSBK Payloads on MFID90/A4 Known Opcodes; 2023-12-26 02:26:33 -05:00
lwvmobile
bf10289223 DMR - Con+ CSBK and Tuning Tweaks; Data Grant; 2023-12-24 20:55:11 -05:00
lwvmobile
e3c3d15dce DMR - Move CSBK Acknowledgements to Non MFID10; 2023-12-23 15:04:01 -05:00
lwvmobile
b726cc8faf DMR - Fix UDT Dialer Digit Values; 2023-12-23 13:45:27 -05:00
lwvmobile
133746d3a3 DMR - Acknowledgement CSBKs; 2023-12-23 12:34:23 -05:00
lwvmobile
56adbfe6fd DMR - Fix Line Break on SLC CRC ERR; 2023-12-23 06:28:59 -05:00
lwvmobile
c2e5b919d6 DMR - PROP_PDU Block Count Sanity Checks; 2023-12-23 05:47:12 -05:00
lwvmobile
b675a8fbcd DMR - Moto Data Channel CSBK; 2023-12-22 18:21:44 -05:00
lwvmobile
d5d84d598e DMR - Fix Data Header Padding Octet Count(try 2); 2023-12-22 18:05:33 -05:00
lwvmobile
aac17ca47d DMR - Fix Data Header Padding Octet Count; 2023-12-22 17:57:08 -05:00
lwvmobile
ead9bb77ec DMR - Only Apply LE MI if CRC4 is Good; 2023-12-22 14:09:40 -05:00
lwvmobile
91aac9b61a DMR - Clarify UDT Data Types; #177 2023-12-20 16:20:33 -05:00
lwvmobile
d0aa9e66ca DMR - Tweak T3 Tuning Conditions; 2023-12-20 12:42:17 -05:00
lwvmobile
b8f92e9661 DMR - Moto Data Announcement CSBK; 2023-12-19 18:28:42 -05:00
lwvmobile
78cb583a4d DMR - DPF 15 P_SAP 1 (prop pdu reserved) Tweaks; 2023-12-19 18:19:34 -05:00
lwvmobile
69f6710898 DMR - Enable LIP Protocol Decoder on UDT; 2023-12-18 20:37:35 -05:00
lwvmobile
ca3c648e3a Remove Some Duplicate FEC Functions (fec.h); 2023-12-18 20:37:31 -05:00
lwvmobile
cc581637c5 Fix Misc Format/Tab Issues on dsd_gps.c; 2023-12-18 18:42:47 -05:00
lwvmobile
5a05011992 DMR - Inplement LIP; Reorganize Various GPS Reports; 2023-12-18 18:35:53 -05:00
lwvmobile
daa200d655 Misc NMEA and Harris 'NMEA' GPS Fixes/Tweaks; 2023-12-17 22:58:59 -05:00
lwvmobile
34b0040b04 P25 - Harris GPS WIP3; 2023-12-17 18:52:13 -05:00
lwvmobile
24c08dfbbd Misc Cleaning; 2023-12-17 15:29:44 -05:00
lwvmobile
390c7939f9 DMR - Fix Inbound CSBK BS_DWN_ACT and Outbound TD_GRANT; 2023-12-17 15:05:11 -05:00
lwvmobile
fa6fe06068 DMR - Misc UDT / NMEA Cleanup; 2023-12-16 22:48:40 -05:00
lwvmobile
7193bca136 DMR - UDT Fixes and NMEA Support; #177 2023-12-16 20:06:10 -05:00
lwvmobile
67b7272b05 DMR - UDT Format Handling WIP2; #177 2023-12-16 08:49:05 -05:00
lwvmobile
88c9959e8e DMR - UDT Format Handling WIP; #177 2023-12-16 08:24:19 -05:00
lwvmobile
e4dcad7873 Patch -- DMR Per Call Ext Custom Dir Fix; #172 2023-12-15 09:11:32 -05:00
lwvmobile
bd1f6881ce DMR - Fix UDT Block Assembly; #177 2023-12-15 09:04:27 -05:00
lwvmobile
4b7b5d5a29 Fix Readme Links; 2023-12-13 12:20:15 -05:00
lwvmobile
42c5bd16cd Update Misc Docs/Scripts/Pics; 2023-12-13 12:17:50 -05:00
lwvmobile
501e7c762c P25 -- TSBK Status Dibit; Misc Cleanup; 2023-12-12 16:07:36 -05:00
lwvmobile
a01a01b533 P25 -- Fix MPDU Valid Dibit/Status Dibit Gathering; 2023-12-12 13:39:40 -05:00
lwvmobile
6d56db17f4 P25 - Harris GPS WIP2; SYNC_BCST Misc; 2023-12-11 11:15:15 -05:00
lwvmobile
d0040fd2a1 LRRP - Fix Speed Variable; Tweak Output; 2023-12-09 13:07:52 -05:00
lwvmobile
e5dd5eed5d P25p2 -- Harris GPS vPDU (WIP); 2023-12-04 07:39:57 -05:00
lwvmobile
dda84e74bc Fix Audio_Work Debian Installer Script; 2023-12-01 09:21:50 -05:00
lwvmobile
19712bf401 P25 - Fix SNDCP Ann vPDU + Misc LCW/TSBK/MPDU; 2023-11-27 11:42:18 -05:00
lwvmobile
76b6aa46bd DMR/P25 - 34 Point[0] fix; crc_valid array size; 2023-11-26 12:01:07 -05:00
lwvmobile
20ca710523 Symbol Sample Edge; YSF/DMR Edge Tweak; RTL Tweak; 2023-11-26 07:22:21 -05:00
lwvmobile
f98bad18b9 P25 - Phase 2 CC to Phase 1 SNDCP Channel Timing; 2023-11-24 16:18:56 -05:00
lwvmobile
0ecc9765dd P25 - R34 MPDU Format WIP2; 2023-11-24 15:52:54 -05:00
lwvmobile
5d26333676 P25 - R34 MPDU Format WIP; 2023-11-23 20:48:53 -05:00
lwvmobile
2d2af754c5 P25 - SNDCP Data Channel vPDU/TSBK WIP; 2023-11-23 02:51:30 -05:00
lwvmobile
3939a5b1cf Patch - DMR Voice and Data Call Presist Upd; #174 2023-11-22 16:13:53 -05:00
lwvmobile
fc99153c80 RTL LP Tweaks; 2023-11-22 12:42:37 -05:00
lwvmobile
076c7d669b DMR - Cap+/XPT Misc Tuning/Reset Tweaks; 2023-11-22 12:21:41 -05:00
lwvmobile
c8020c76ae Sample/Symbol Tweaks; 2023-11-22 07:50:53 -05:00
lwvmobile
696c9663dd Raw Signal Monitor Tweak; 2023-11-22 06:48:56 -05:00
lwvmobile
92144ee482 Patch - DMR Voice and Data Call Presistency; #174 2023-11-21 18:35:22 -05:00
lwvmobile
bd0b3f2856 P25 - MFID90 Moto Talker EOT ; Misc; 2023-11-20 21:49:58 -05:00
lwvmobile
529148ee18 Patch - Fix DMR TII Per Call for G; #172 2023-11-19 13:57:01 -05:00
lwvmobile
810aa04eb0 Fix Quiet WAV file on AERO/OSS when dual voices; 2023-11-19 03:27:39 -05:00
lwvmobile
20abfd4b8e NXDN -- Secondary 1/2 on F2, F3, and SCCH; Misc; 2023-11-18 22:26:26 -05:00
lwvmobile
bb76449560 NXDN -- Fill Out VoiceCallOption; Misc Tweaks; 2023-11-17 22:15:58 -05:00
lwvmobile
fc6b35c7f5 EDACS - Misc Tweaks; 2023-11-17 17:26:43 -05:00
lwvmobile
e6da485117 NXDN -- Implement Secondary 1/2 Decoder; Misc; 2023-11-15 16:21:25 -05:00
lwvmobile
d6160f7b7a NXDN - Zero TG/RID on TX_REL; Misc; 2023-11-15 12:30:01 -05:00
lwvmobile
2aedef7e77 NXDN - Rework Portions of Alias and Call History; 2023-11-14 21:20:55 -05:00
lwvmobile
11fd605d6b Misc Line Break Fixes; SB/RC FEC Output Fix; 2023-11-13 14:37:17 -05:00
lwvmobile
7b87ecca87 DMR - Decode ACT_UPDT SLC; 2023-11-12 08:45:31 -05:00
lwvmobile
ea996f6442 patch - add autodiag's dmr key by cc patch; 2023-11-10 18:53:42 -05:00
lwvmobile
e0182068b2 DMR -- initialize dmr_color_code variable; 2023-11-10 15:08:54 -05:00
lwvmobile
cd01902023 DMR and P25p1 - Tweak Output on Embedded GPS; 2023-11-07 13:10:33 -05:00
lwvmobile
5e386e90e0 Ncurses - Fix DMR MS Display 'Uniformity'; 2023-11-07 12:41:20 -05:00
lwvmobile
e28121f5b3 P25p2 -- Dual Voice Slots when Trunking patch; 2023-11-03 16:17:37 -04:00
lwvmobile
7a25e5d998 EDACS -- Fix/Tweak Analog Calls and Ncurses; 2023-11-03 16:13:04 -04:00
lwvmobile
c6488a4a26 EDACS - Fix Wav File Names, Display AFS as Dec; 2023-11-03 09:10:41 -04:00
lwvmobile
f32d18a5a3 P25p1 -- Fix Bad Copy/Paste Job in LDU1/LDU2; 2023-11-02 12:02:11 -04:00
lwvmobile
3297bd1e9e Patch Folder; NXDN Alias to gN; Patch Docs; 2023-10-31 23:35:27 -04:00
lwvmobile
6f9ce1f7ad NXDN -- Fix Tune Blocking on SRC ID; 2023-10-30 20:44:49 -04:00
lwvmobile
a21d0ac05e P25p1 -- Disable SoftID to gN if Trunking; #166 2023-10-30 15:57:51 -04:00
lwvmobile
584ca9e17a NXDN -- Fix ENC LO; Tweaks/Misc; #121 2023-10-30 10:58:52 -04:00
lwvmobile
fb1abfbd26 P25p1 -- Tweak APX(Moto) LCW GPS Output; 2023-10-28 17:30:09 -04:00
lwvmobile
e6dd71f338 Fix Potential Compiler Error on isch_map; 2023-10-28 17:11:43 -04:00
lwvmobile
46bf41fe15 P25/DMR -- Fix P1 APX GPS; Revert DMR GPS; 2023-10-28 17:11:06 -04:00
lwvmobile
01b6eccf4c NXDN - Misc Tweaks (Ncurses, DISC) and 96Filter; 2023-10-28 01:10:32 -04:00
lwvmobile
e1924db1ff DSTAR - More Eternal Darkness on APRS; #164 2023-10-25 15:22:25 -04:00
lwvmobile
76309399b0 DSTAR - Fix some SD Format Issues; Lose My Mind; 2023-10-25 10:49:36 -04:00
lwvmobile
9cbb4ec36b DMR/P25 - Fix EGPS Lat; Dump to LRRP file; #163 2023-10-24 18:27:36 -04:00
lwvmobile
973af860cf P25p1 -- Soft ID to groupName ifdef; #166 2023-10-24 17:50:35 -04:00
lwvmobile
bc90ade337 Aero -- Fix Date/Time on Per Call Wav Files; #168 2023-10-24 14:36:23 -04:00
lwvmobile
ab54b2f6f8 P25 MFID90 Misc TSBK/LCW and Tweaks; #164 2023-10-24 13:18:05 -04:00
lwvmobile
72626546c5 P25 - Fix MPDU TELE_INT_CH_GRANT elseif condition; 2023-10-21 14:40:49 -04:00
lwvmobile
c08dcb064c P25p1 - Zero LSD if Enc Voice; #166 2023-10-21 13:38:28 -04:00
lwvmobile
7525735df1 P25 - TELE_INT_CH_GRANT; Add/Tweak Misc vPDUs; 2023-10-21 10:37:19 -04:00
lwvmobile
f28559ae6b P25 -- Harris GRG TSBK and vPDU P/S Fix; 2023-10-19 18:43:15 -04:00
lwvmobile
e8957aa90f Multi -- Indicate Mute Code On TG Hold; #132 2023-10-19 12:42:24 -04:00
lwvmobile
4fdc302809 NXDN48 Filter to dPMR Filter; 2023-10-18 17:01:36 -04:00
lwvmobile
c32b2bd7aa WIP: Mute Audio from Blocked TG; 2023-10-17 17:29:58 -04:00
lwvmobile
a121f33be8 Tweak some Verbage regarding the 'Scan' Function; 2023-10-14 09:28:53 -04:00
lwvmobile
f65e65fb47 P25 -- Harris TA to groupName/group.csv; Tweaks; 2023-10-14 08:59:20 -04:00
lwvmobile
a4ddcd4220 P25 -- Tweak to Synchronization Broadcast PDU; 2023-10-13 16:27:20 -04:00
lwvmobile
481dd0adb5 Misc Audio2/Frame Tweaks; 2023-10-12 23:34:40 -04:00
lwvmobile
001d28aaf8 P25p2 -- Disable Slot Synthesis when MAC_SIGNAL; 2023-10-10 09:12:28 -04:00
lwvmobile
86e0a3ad77 Version Update; Compiler Warning Fix; 2023-10-09 17:48:30 -04:00
lwvmobile
a6a300e7c5 P25p1 -- LSD Parity Check; #166 2023-10-09 17:35:11 -04:00
lwvmobile
55a1d5a9f3 P25p2 -- Harris Talker Alias; Misc Frame Tweaks; 2023-10-09 07:46:28 -04:00
lwvmobile
81f9cd6ee6 P25p1 -- WIP: Dump LSD and Soft ID; #166 2023-10-09 07:43:08 -04:00
lwvmobile
459151b4bf P25p2 -- Revert Frame Tweak (SACCH vs Voice); 2023-10-07 01:45:40 -04:00
lwvmobile
fcad1789dc TG Hold: Fix EDACS/NXDN Display and Set; #132 2023-10-06 12:01:36 -04:00
lwvmobile
1c3204e5d7 P25p1 -- Re-Enable Slots on Call Termination; 2023-10-06 10:52:49 -04:00
lwvmobile
84df9bbca7 P25p2 -- Slot ON/OFF During Realtime Tuning; 2023-10-06 10:43:13 -04:00
lwvmobile
d073e7cae8 P25p2 -- Misc Frame Tweaks; 2023-10-06 09:09:31 -04:00
lwvmobile
3c2ce0bb18 P25 -- Disable UU_V Grants when TG Hold; 2023-10-06 08:54:00 -04:00
lwvmobile
9aee34a501 P25p1 -- Disable Heuristics (again) 2023-10-06 07:00:55 -04:00
lwvmobile
cc5248e958 P25p2 -- MAC_END_PTT go to CC conditions; 2023-10-05 15:34:05 -04:00
lwvmobile
d880d05ea5 EDACS/PV -- Dotting Sequence Tweaks; 2023-10-05 13:22:55 -04:00
lwvmobile
d882962b9c NXDN Type-C -- LO Trunked Enc Calls WIP; #121 2023-10-05 10:35:25 -04:00
lwvmobile
241cc05f80 P25 -- TG Hold Support; #132 2023-10-05 10:13:39 -04:00
lwvmobile
cdcdc106ef EDACS -- TG Hold Support; #132 2023-10-05 08:35:04 -04:00
lwvmobile
a6bb5ed28d NXDN -- TG Hold Support for Type-D; #132 2023-10-05 08:29:51 -04:00
lwvmobile
e1348b838b NXDN -- TG Hold Support for Type-C; #132 2023-10-05 08:28:24 -04:00
lwvmobile
677ad50f79 DMR -- LO Trunked Enc Calls WIP; #121 2023-10-04 14:06:52 -04:00
lwvmobile
6903d230fa DMR -- Data Call String Tweak; 2023-10-04 10:31:29 -04:00
lwvmobile
b2cc2d4c11 DMR -- Tweak P_CLEAR Return to CC Conditions; 2023-10-02 12:23:04 -04:00
lwvmobile
763d28981c P25 -- Remove old 1/2 Block Code; Misc; 2023-10-02 09:55:52 -04:00
lwvmobile
f274f74f44 P25 -- Cleanup 1/2 Rate Decoding; 2023-10-02 08:58:03 -04:00
lwvmobile
9dfbcc886f DMR -- Implement Best/Surviving Path on 3/4 Rate; 2023-10-02 08:32:34 -04:00
lwvmobile
5e0f64a7c2 Update Install Scripts with ki4hyf tweaks; 2023-10-01 17:02:13 -04:00
lwvmobile
18f24215e5 Convolutional Decoder Tweaks/Tests; 2023-09-28 11:27:18 -04:00
lwvmobile
23e1c23789 P25 -- Fix SSB vPDU/TSBK; 2023-09-26 19:21:32 -04:00
lwvmobile
a46523ee84 P25 -- Attempt to Fix vpdu.c Tab Alignment; 2023-09-26 18:20:21 -04:00
lwvmobile
dc9aa270e5 P25 -- Misc Tweaks to MFIDA4/90 MAC PDUs; 2023-09-26 18:10:34 -04:00
lwvmobile
ae528f844f P25 -- Tweak MFID A4 MAC GRG Exp Enc; 2023-09-26 17:39:52 -04:00
lwvmobile
d52c2b6426 P25 -- Add MFID90 GRG Call Grant TSBK/MPDU; 2023-09-26 16:54:17 -04:00
lwvmobile
29cd61fdcd P25 -- Fix Alignment; Fix Compiler Warning; 2023-09-26 08:54:08 -04:00
lwvmobile
daecac1612 P25 -- Check MFID 90/A4 Opcode/Payload; Tweaks; 2023-09-26 08:44:57 -04:00
lwvmobile
abbf153785 P25 -- Fix Minor Annoyance, Take 2; 2023-09-25 16:48:44 -04:00
lwvmobile
1667019662 P25 -- NAC/CC Minor Annoyance Fix; 2023-09-25 16:40:52 -04:00
lwvmobile
e2fbece993 P25p1 -- Tweak to 1/2 Rate Decoder; 2023-09-25 15:12:08 -04:00
lwvmobile
d157dee956 DMR - Tweak/Fix T3 Active Data Ch String CSBK_O; 2023-09-20 18:49:04 -04:00
lwvmobile
9506bd5f77 Fix Compiler Errors if librtlsdr not found; 2023-09-20 03:39:03 -04:00
lwvmobile
2222d86e02 P25 - SITE/RFSS Values Decimal in Console/Log; 2023-09-18 11:21:59 -04:00
lwvmobile
2161c3d762 RTL RMS Tests to Reduce CPU Usage; 2023-09-18 10:51:22 -04:00
lwvmobile
eb5de342ba DMR - Cap+/XPT Set TG on Tune for Hold Handling; 2023-09-17 02:40:42 -04:00
lwvmobile
2ca9117783 DMR - Tweak to P_CLEAR Return to CC; Tuner Status; 2023-09-17 02:17:15 -04:00
lwvmobile
b1809e9403 DMR - Add TG Hold Handling To XPT SLC; 2023-09-17 02:09:30 -04:00
lwvmobile
d1b11bc53c DMR - Add TG Hold Handling To Cap+ SLC; 2023-09-17 02:08:37 -04:00
lwvmobile
c61d2dd35d Revert DMR 34 Rate FEC Tests; 2023-09-16 22:34:59 -04:00
lwvmobile
d8958662d9 Disable Debug Output on DMR 34 Rate FEC Tests; 2023-09-16 05:33:33 -04:00
lwvmobile
801cdead80 Test FEC on P25 12 Rate Data; 2023-09-16 05:30:07 -04:00
lwvmobile
5098cdb445 Test FEC on DME 34 Rate Data; 2023-09-16 05:28:09 -04:00
lwvmobile
f229f0d648 Testing Simpler P25 1/2 Decoder and Heuristics; 2023-09-15 10:30:49 -04:00
lwvmobile
cbaed9337b Fix Compiler Error on RTL Dev Enum; 2023-09-13 13:19:05 -04:00
lwvmobile
66ff2551e9 Add RTL Device Enum and SN support to Ncurses; 2023-09-13 11:09:01 -04:00
lwvmobile
0a7e86a8fa Add RTL Device Enum and SN support to CLI; 2023-09-13 11:05:28 -04:00
lwvmobile
e3c96f2d5d Fix OSS 48k1 Slot On/Off Toggle; 2023-09-12 18:36:00 -04:00
lwvmobile
24741ed420 Update Version Number for PC Aero AW Build; 2023-09-12 18:28:17 -04:00
lwvmobile
1f6f8f194b DMR - Tweak to CSBK (BTV_GRANT) and FLC (BTV); 2023-09-12 17:14:43 -04:00
lwvmobile
102966482b DMR - Add T3 Multi Item Data Call Grants; Tweaks; 2023-09-12 16:38:36 -04:00
lwvmobile
eb7929e758 DMR T3 -- Add P_MAINT Decode; 2023-09-12 15:59:05 -04:00
lwvmobile
8bbfdf2671 Tweaks to DMR LE for mismatching key/alg; 2023-09-12 00:23:41 -04:00
lwvmobile
958400eaf6 DMR C_AHOY and Special Address Identifiers; 2023-09-11 23:28:31 -04:00
lwvmobile
20e862a6a0 Fix Line Break Issue on DMR SLC Err; 2023-09-11 09:13:39 -04:00
lwvmobile
8cbb30b036 DMR T3 Tweak to TG and SRC Values when Tuning; 2023-09-10 21:15:56 -04:00
lwvmobile
9696042156 Fix Keyring Loader to allow KeyID of 0 (P25); 2023-09-10 21:01:16 -04:00
lwvmobile
56b27dd055 Fix NXDN Ncurses Call TG:0 History Bug; 2023-09-09 20:47:48 -04:00
lwvmobile
a388e9ad85 Enable TG Hold Tests on DMR Cap+, Con+, XPT; #132 2023-09-09 20:12:40 -04:00
lwvmobile
2e93cca73a Test Trunk P_CLEAR return to CC on DMR T3; #132 2023-09-09 19:50:07 -04:00
lwvmobile
6a694444c5 Test TG Trunking Hold on DMR T3 Systems; #132; 2023-09-09 19:48:25 -04:00
lwvmobile
8227b49b59 Tweak DMR T3 Channel Numbering Information; 2023-09-08 19:41:32 -04:00
lwvmobile
dd483c3300 Init Group Mode Str; Tweak Group List Conditions; 2023-09-07 12:02:32 -04:00
lwvmobile
f217f17c52 Fix EDACS AFS Reporting on PV Console Output; 2023-09-06 19:03:44 -04:00
lwvmobile
be3f69a2d0 Raw Signal Wav File Saving; #163 2023-09-04 22:17:46 -04:00
lwvmobile
bf96b96fdf Fix Indent; 2023-09-04 19:28:33 -04:00
lwvmobile
c7537cca96 EDACS Analog Call Dotting Sequence Detection; 2023-09-04 17:20:42 -04:00
lwvmobile
14a87465ce Fix/Tweak EDACS Dotting Sequence; 2023-09-04 15:42:28 -04:00
lwvmobile
8c8df5b1b4 EDACS Dotting Sequence FS Detection and CC Jump; 2023-09-04 01:47:22 -04:00
lwvmobile
a56c736c06 ENC Audio Mute Checkdowns; Misc; 2023-08-28 09:21:28 -04:00
lwvmobile
7ff3e3e79b Disable Test Alert on Ncurses Startup for OSS; 2023-08-27 16:29:07 -04:00
lwvmobile
c5713c52da AW Version Update; 2023-08-27 14:59:26 -04:00
lwvmobile
5bea494193 Disable DMR MS/Simplex When Trunking Enabled; 2023-08-26 21:21:28 -04:00
lwvmobile
e48b715f4f DMR SB TXI Tweaks; Add CRC4 Check to LE MI; 2023-08-26 17:19:53 -04:00
lwvmobile
12ac9460b9 DMR LE Minor Code Fix; Print Tweaks; 2023-08-26 09:30:53 -04:00
lwvmobile
c8c72eadab Fix M17 IV; 2023-08-25 09:15:47 -04:00
lwvmobile
cd476bb463 Fix M17 Enc Type Values; 2023-08-25 09:11:18 -04:00
lwvmobile
53617bd366 Fix EDACS Analog Call Preemption Conditions; 2023-08-22 09:16:28 -04:00
lwvmobile
99f2606d4d UDP Audio Output -- Fix Typo; 2023-08-22 09:07:56 -04:00
lwvmobile
2aebdf79f3 UDP Audio Output -- Socket Code, Example Tweaks; 2023-08-22 09:04:47 -04:00
lwvmobile
c840544d25 UDP Audio Output -- Clarify and Add Example; 2023-08-21 17:40:28 -04:00
lwvmobile
927df66e9a Fix Warning; 2023-08-21 16:12:16 -04:00
lwvmobile
7f4443c77f UDP Audio Output -- Old Audio Handler Fix; 2023-08-21 15:54:03 -04:00
lwvmobile
1600e6c0d4 UDP Audio Output -- Audio Implementation; 2023-08-21 15:23:03 -04:00
lwvmobile
0c86ba29fc UDP Audio Output -- Initial Setup; 2023-08-21 15:20:53 -04:00
lwvmobile
b2f6b158e3 Disable RTL RMS Function on ARM Devices (RPi); 2023-08-19 20:48:34 -04:00
lwvmobile
6ab2f69111 Temp Fix for EDACS Standard/Networked; 2023-08-19 12:47:01 -04:00
lwvmobile
0097942732 DMR increase BF and block storage; R1 Pad Bit Fix; 2023-08-19 10:04:09 -04:00
lwvmobile
3686e7fdd2 DMR 3/4 Simple Error Correction; 2023-08-19 07:21:25 -04:00
lwvmobile
0e8f3362b9 P25p2 I-ISCH/DUID Error Correction; 2023-08-17 13:42:35 -04:00
lwvmobile
078142bd3f Misc; 2023-08-17 05:14:07 -04:00
lwvmobile
304817b68e Create Some Temp Files For Code Organization; 2023-08-17 04:53:35 -04:00
lwvmobile
e48c05a0ab AGF Tests/Tweaks; 2023-08-13 11:34:08 -04:00
lwvmobile
4cdcefb980 Analog Monitor Hold on SQL Break; Misc; 2023-08-13 11:30:21 -04:00
lwvmobile
dcc818e9c3 More NCurses Cosmetic Tweaks/Type Fix; 2023-08-11 20:17:40 -04:00
lwvmobile
0037064958 Ncurses Cosmetic Tweaks; 2023-08-11 20:08:08 -04:00
lwvmobile
c0ccbf73d0 More Cygwin M17 Related Bandaids; 2023-08-11 15:18:37 -04:00
lwvmobile
500d0387fd Prevent Possible Overflow in lbuf and lbuf2; 2023-08-11 15:15:47 -04:00
lwvmobile
0f077832cf Update Install Notes and Include Arch Installer; 2023-08-11 12:58:22 -04:00
lwvmobile
449468f566 Fix Some NXDN Array Sizes and Chainbacks; 2023-08-11 12:13:16 -04:00
lwvmobile
fd2444f2cd M17 Misc Cleanup; 2023-08-11 10:56:26 -04:00
lwvmobile
d6968dffdd Misc Code Cleanup; 2023-08-10 13:57:50 -04:00
lwvmobile
b50119e0bc Simplify DMR Trellis Decoder; 2023-08-10 03:43:37 -04:00
lwvmobile
58e90298eb Add M17 CAN Value to Ncurses; Misc; 2023-08-09 20:55:29 -04:00
lwvmobile
224dc1e68c Allow OSS Audio Source Monitoring when 48k1; 2023-08-09 03:58:10 -04:00
lwvmobile
e9262f18db Fix RTL Source Audio Monitoring Bug; 2023-08-09 03:37:54 -04:00
lwvmobile
14b4af8b33 WIP: Working Analog/Raw Source Audio Monitoring; 2023-08-08 22:52:32 -04:00
lwvmobile
af271f62f3 Analog RMS Compiler Warning Fix; 2023-08-08 01:12:45 -04:00
lwvmobile
6f9fba9fbf EDACS Tweaks to Analog Call Handling; 2023-08-08 00:46:20 -04:00
lwvmobile
afa329b5e4 Experimental EDACS Analog Voice Monitoring; 2023-08-07 04:55:58 -04:00
lwvmobile
d8395fff59 Fix RTL RMS so it does't return Jank Values; 2023-08-07 04:32:01 -04:00
lwvmobile
81abd65da1 Fix Some DateName Issues for dates in Aero; 2023-08-07 04:29:41 -04:00
lwvmobile
a48c197ecc Update Example_Usage for Icecast; #159 2023-08-07 04:28:49 -04:00
lwvmobile
85d53896de Update Example_Usage.md 2023-08-07 04:27:21 -04:00
lwvmobile
8b844aa6e3 Disable Float Mono Audio Decimation; 2023-08-04 23:14:00 -04:00
lwvmobile
578117d82a Add patch files to gitignore; 2023-08-04 19:11:24 -04:00
lwvmobile
363c99ceca Fix Float Baseline; Notes on P25p2 Audio; 2023-08-04 18:46:49 -04:00
lwvmobile
a93177eb61 Ncurses Terminal Minor Cleanup and Term Tweaks; 2023-08-04 17:07:40 -04:00
lwvmobile
d6181e2dcd P25 Fix Some Logic Regarding Symbol Rate Switch; 2023-08-04 17:07:18 -04:00
lwvmobile
f9b74cf7e2 More Tweaking on AGF and Float Audio; 2023-08-03 15:38:44 -04:00
lwvmobile
d4740550e4 Fix Bug w/ Manual Gain in Ncurses; 2023-08-03 10:43:57 -04:00
lwvmobile
d91c44f6f3 Doc and Ncurses Cleanup; 2023-08-02 23:03:40 -04:00
lwvmobile
e59b46448a More Work/Tweaks on AGF and Ncurses Gain Control; 2023-08-02 22:48:17 -04:00
lwvmobile
d826391d16 Ncurses and Misc Tweaks; 2023-08-02 17:17:15 -04:00
lwvmobile
5406960f26 Fix Warning and Clarify Short/Float Manual Gain; 2023-08-02 16:42:13 -04:00
lwvmobile
8f1d1e4934 Tweaks to AGF function; Misc; 2023-08-02 14:35:10 -04:00
lwvmobile
54b6fd67e7 Change Defaults; Reorder Ncurses Menu; Fix X2; 2023-08-01 16:03:38 -04:00
lwvmobile
1568ee6176 Random Alignment Fixes; 2023-07-31 20:01:11 -04:00
lwvmobile
6978ac9cd3 DSTAR Fix CRC on Slow Data Header; Cleanup; 2023-07-31 19:50:12 -04:00
lwvmobile
1961eb832a DSTAR Slow Data Decoding WIP; 2023-07-31 16:50:25 -04:00
lwvmobile
c38423c251 DMR Stereo Tweak; Clear Stale Audio Buffers; 2023-07-30 13:41:25 -04:00
lwvmobile
ecd3ec1c61 Fix VoiceFS4 Slot On/Off Issue; 2023-07-29 22:02:03 -04:00
lwvmobile
66e8bcd86a Audio Mono Audio to Stereo Channel Tweaks; 2023-07-29 21:48:28 -04:00
lwvmobile
23b1036c6b Rewrite and Simplify DSTAR Handling; 2023-07-29 21:46:11 -04:00
lwvmobile
0d4ab17d0a Reorganize MBE handling -- initial commit; 2023-07-29 21:43:53 -04:00
lwvmobile
b38a692fc5 Rewrite Call Alert; Switch to Generated Tone; 2023-07-29 21:16:02 -04:00
lwvmobile
2ff96a6b91 Version Update; 2023-07-29 00:16:38 -04:00
lwvmobile
9089d6568a Cleanup; 2023-07-29 00:14:33 -04:00
lwvmobile
73c43b030e Rename XDMA to AUTO; Disable Legacy Auto; 2023-07-29 00:02:17 -04:00
lwvmobile
42fa737844 Configure OSS Output to be more Dynamic; 2023-07-28 23:32:17 -04:00
lwvmobile
e4f61115c6 M17 Cleanup and M17/Aero Jank Fixes; 2023-07-28 23:22:13 -04:00
lwvmobile
3bb9994589 Tweak Toggle Voice Synthesis for FDMA Sources; 2023-07-28 20:53:56 -04:00
lwvmobile
23f6c75257 Ncurses Tweak for TDMA Slot ON/OFF; 2023-07-28 19:26:53 -04:00
lwvmobile
3bac7ba99b Round of Code Cleanup; 2023-07-28 17:47:33 -04:00
lwvmobile
56a5df86a0 Fix Some Slot Preference Clashes; 2023-07-28 17:25:16 -04:00
lwvmobile
50d707a8e3 Rewrite OSS Handling (depending on use case); 2023-07-28 16:06:58 -04:00
lwvmobile
aa49e5869b User Enable/Disable Slots for Voice; 2023-07-28 15:56:06 -04:00
lwvmobile
d982a2b91e Temp Commit WIP; 2023-07-26 15:53:55 -04:00
lwvmobile
a92736bb3a Fix dPMR, pV, and MBEplayback for new audio; 2023-07-26 15:06:33 -04:00
lwvmobile
54386285cc Tweaks to DMR MS Audio Handling; 2023-07-26 15:04:02 -04:00
lwvmobile
676027a56f Tweak Float Auto Gain; Make User Configurable; 2023-07-26 07:21:25 -04:00
lwvmobile
cdc0d9e012 Tweak Install Notes; 2023-07-25 18:54:13 -04:00
lwvmobile
32d4c0ed72 AGF by Left/Right Channel/Slot; 2023-07-25 13:10:19 -04:00
lwvmobile
16959cac7a WIP: audio_work 2; 2023-07-24 18:32:09 -04:00
lwvmobile
f2f20f8f94 Fix P25p2 SACCH PDU Issue; 2023-07-22 18:34:54 -04:00
lwvmobile
1a8efd5835 YSF Decoded Wav File Saving on V/D2 Voice; 2023-07-20 10:12:17 -04:00
lwvmobile
5a01c7a4db Version; 2023-07-20 00:32:54 -04:00
lwvmobile
1b18139e41 Custom User Wav File with -7 option; 2023-07-20 00:32:44 -04:00
lwvmobile
263b3bbeda Fix Some Tab Alignment in dsd_main.c; 2023-07-13 13:59:21 -04:00
lwvmobile
cba01aaa59 Add Exitflag to DMR BS Loop; Update Readme; 2023-07-13 13:57:55 -04:00
lwvmobile
d4599b05a0 Appease Volo - God of Compiler Warnings; 2023-07-10 20:09:42 -04:00
lwvmobile
200287316d Fix Random Warnings on #152 2023-07-10 19:25:14 -04:00
lwvmobile
1d05f3d851 M17 More Work and Fixes; #152 2023-07-10 19:25:06 -04:00
lwvmobile
8e8d987686 NXDN LZ Tweak on RCCH Disc; #123 2023-07-10 19:24:54 -04:00
lwvmobile
343512e9bf Fix OSS Input/Output on M17 8K Sample; #152 2023-07-09 00:13:12 -04:00
lwvmobile
af612c058b M17 Dbuf Temp Bug Fix; Misc; #152 2023-07-09 00:13:01 -04:00
lwvmobile
d81e8be3cf Fix Cmake for Codec2 in Cygwin; #152 2023-07-09 00:12:49 -04:00
lwvmobile
fb93289538 Fix M17 3200bps Voice; Misc M17 Tweaks; #152 2023-07-07 02:17:50 -04:00
lwvmobile
92a2217e80 M17 Support (Partially Working Now); 2023-07-06 21:58:24 -04:00
lwvmobile
b6d41260e7 M17 Initial Support (Non-Working State); 2023-07-06 21:55:13 -04:00
lwvmobile
bb6b54990f Ncurses NXDN RAN/History Lazy Bug Fix; 2023-07-05 16:24:39 -04:00
lwvmobile
016d27e22d Minor Ncurses Fixes; 2023-07-05 14:38:06 -04:00
lwvmobile
17a336e27d Misc Minor Fixes; 2023-07-05 14:33:43 -04:00
lwvmobile
c3f3573a99 Merge pull request #151 from volo-zyko/fix-emptyBodyAndPointerSignWarnings
Fix warnings from -Wempty-body, -Wunused-label, and -Wpointer-sign
2023-07-05 13:58:44 -04:00
Volo Zyko
81dab2f0b6 Fix warnings from -Wempty-body, -Wunused-label, and -Wpointer-sign 2023-07-04 12:07:30 +03:00
lwvmobile
a80e534179 DMR LE ENC Identifiers Tweak; 2023-07-03 12:41:55 -04:00
lwvmobile
8310f87504 Merge pull request #150 from volo-zyko/fix-unusedParameterWarnings
Fix more warnings, now with unused parameters
2023-07-03 12:25:28 -04:00
lwvmobile
f27057c790 Merge pull request #148 from volo-zyko/ZDev3
Set exitflag before cleaning up
2023-07-03 12:25:17 -04:00
Volo Zyko
649d267fa5 Fix more warnings, now with unused parameters 2023-07-03 15:37:43 +03:00
Volo Zyko
d8a7e5d366 Set exitflag before cleaning up
This will signal to all related code that the program
is about to exit.
2023-07-03 11:03:51 +03:00
lwvmobile
8ccc241743 Fix Compiler error: parameter name omitted; 2023-07-02 15:42:32 -04:00
lwvmobile
af922d209d Fix ysf.c Unused Variables Warnings; 2023-07-01 22:59:32 -04:00
lwvmobile
958d0debbb Fix Trellis.c Unused Variables Warnings; 2023-07-01 22:59:13 -04:00
lwvmobile
2016891bd5 Fix NXDN de-scrambling bug; 2023-07-01 22:21:20 -04:00
lwvmobile
412cb26c0f Fix Ncurses Exitflag; 2023-07-01 22:06:49 -04:00
lwvmobile
3fc983f273 Add YSF to default decoding class; #143 2023-07-01 18:51:00 -04:00
lwvmobile
b5d24f9c00 Merge pull request #147 from volo-zyko/fix-unusedVariableWarning
Fix warnings related to unused variables
2023-07-01 13:27:49 -04:00
Volo Zyko
a432173cd6 Fix warnings related to unused variables 2023-07-01 13:48:38 +03:00
lwvmobile
5440161ff9 YSF Fix CM Variable; Line Break; #146 2023-06-30 18:43:32 -04:00
lwvmobile
bb542c475c YSF Radio ID Mode; Element Tweaks; #143 2023-06-30 16:48:43 -04:00
lwvmobile
aef834e914 Fix Line #137 2023-06-30 11:00:23 -04:00
lwvmobile
fd44120874 Merge pull request #145 from volo-zyko/fix-cleanupAndExit
Add signal handlers for a proper cleanup
2023-06-30 10:53:14 -04:00
Volo Zyko
0e9b2b245d Add signal handlers for a proper cleanup
Fix locking problem in get_rtlsdr_sample when it waits indefinitely
even when exitflag is non-zero; cleanup the code.
2023-06-30 14:12:48 +03:00
lwvmobile
eacbd21c50 Refine/Fix YSF FICH Element Decode #143 2023-06-30 01:15:05 -04:00
lwvmobile
deca8e74a8 Fix YSF Full Rate Voice #143 2023-06-29 22:55:22 -04:00
lwvmobile
9eefbb26d8 Fix Code Tab Alignment #143 2023-06-29 18:16:48 -04:00
lwvmobile
b637462ee8 WIP: YSF Decoding; #143 2023-06-29 18:07:43 -04:00
lwvmobile
7fc513e09e Symbolbin Display Fix in Ncurses; #138 2023-06-29 16:01:18 -04:00
lwvmobile
802e1c96bd Merge pull request #142 from volo-zyko/cleanup-symbolOutFileAPI
Cleanup symbol out file api
2023-06-29 15:45:04 -04:00
Volo Zyko
0bc75f6f78 Cleanup code related to symbol out (logic did not change) 2023-06-29 18:51:58 +03:00
lwvmobile
32a3ba535b Merge pull request #141 from lwvmobile/main
upstream
2023-06-29 10:37:22 -04:00
lwvmobile
2e898d997b Merge pull request #139 from volo-zyko/main
Fix potential issues in closeSymbolOutFile
2023-06-29 09:45:51 -04:00
Volo Zyko
817b335349 Fix potential issues in closeSymbolOutFile 2023-06-29 16:21:39 +03:00
lwvmobile
e9d551f4cb Fix Exitflag Variable #136 2023-06-28 16:54:59 -04:00
lwvmobile
33933e914e DMR LE/CAP+/Misc Tweaks; 2023-06-28 16:53:36 -04:00
lwvmobile
8e230a08b5 Misc; 2023-06-20 04:15:51 -04:00
lwvmobile
dfc4f6f304 TXI FLC and Misc; 2023-06-19 10:01:22 -04:00
lwvmobile
5a3061f942 Merge pull request #134 from lwvmobile/zDEV
Zdev Updates
2023-06-19 06:42:26 -04:00
lwvmobile
b40281fda3 Renable DMR Late Entry SB; Misc; 2023-06-19 06:40:21 -04:00
lwvmobile
966fbf8c6a Fix Alignment 3; 2023-06-18 20:15:12 -04:00
lwvmobile
ca65f1b209 Fix Alignment 2; 2023-06-18 20:12:37 -04:00
lwvmobile
a5d73f06d2 DMR - SB TXI Information and ENC Identifiers Fix; 2023-06-18 19:54:18 -04:00
lwvmobile
56b0e8440e Initialize/Zero Some Arrays; 2023-06-17 17:32:59 -04:00
lwvmobile
b6a12b6ceb Fix RC4 'Pop' on DMR when VC6 is Null; Fix Align; 2023-06-17 17:29:03 -04:00
lwvmobile
15a12acfd3 Update Cmake for zDEV; 2023-06-15 17:47:58 -04:00
lwvmobile
c534e0f1fe Merge pull request #133 from lwvmobile/zDEV
Updates;
2023-06-15 17:39:51 -04:00
lwvmobile
5e68580fa6 DMR - Minor Cosmetic Tweaks; 2023-06-15 17:35:42 -04:00
lwvmobile
e6d83e7305 Fix CMake Options error; Update Readme; 2023-06-15 17:29:33 -04:00
lwvmobile
d56cf106b4 DMR Late Entry ENC Fix; Switch to User Option; 2023-06-12 12:38:32 -04:00
lwvmobile
4279ccf292 DMR Anytone RC4 Fix; 2023-06-12 12:35:32 -04:00
lwvmobile
846b202192 Fix P25p1 -f1 Unmute on RC4 Key; Misc; 2023-06-11 19:43:49 -04:00
lwvmobile
330ebe2bf3 Fix Aero OSS Slot Preemption Issues; #127 2023-06-11 03:09:32 -04:00
lwvmobile
79b4a5e720 Fix DMR LE Alg/Key on SB; 2023-06-11 02:22:41 -04:00
lwvmobile
8186b62a91 RC4 Support (DMR, P25p1, P25p2); 2023-06-11 00:11:55 -04:00
lwvmobile
20f0c852aa NXDN Frame Print Tweaks; #123 2023-06-07 18:27:41 -04:00
lwvmobile
9e4ae23c0b Lit Fix and Tones Fix; #127 2023-06-06 20:32:09 -04:00
lwvmobile
585f6f2fa5 Staging for Main Branch #127 Lit Update; 2023-06-06 20:15:34 -04:00
lwvmobile
a4fba3b19c More Codeset Consolidation #127 Location of tones; 2023-06-06 19:53:30 -04:00
lwvmobile
a2180eb5d3 Switch to New NXDN FS (again) #123 2023-06-06 19:01:37 -04:00
lwvmobile
514161fefa NXDN Frame Tweaks; Late Nite FS Testing III; #123 2023-06-05 23:23:32 -04:00
lwvmobile
bba059f35f Late Nite FS Testing II; #123 2023-06-05 03:29:06 -04:00
lwvmobile
5977f865e3 Remove Min/Max Test (mixed results); #123 2023-06-05 02:43:37 -04:00
lwvmobile
ade7c0477f Late Nite FS Testing; #123 2023-06-05 02:17:38 -04:00
lwvmobile
a2fded8340 Revert Change to new NXDN FS; #123 2023-06-04 20:41:16 -04:00
lwvmobile
005e15c45f cmake remove 'zdev' #127 2023-06-04 18:56:41 -04:00
lwvmobile
e9962a8923 NXDN Switch to New FS; Payload Tweaks; #123 2023-06-04 18:45:05 -04:00
lwvmobile
c6611eae9c Update Some Documentation; 2023-06-03 03:55:43 -04:00
lwvmobile
261193959c Restore Documentation and Examples; 2023-06-02 19:21:25 -04:00
lwvmobile
e7a71eabb6 Minor Fix to Call String; 2023-06-02 16:42:38 -04:00
lwvmobile
afba84e584 Cap+ Call String Blink Fix; Minor Tweaks; #125 2023-05-30 14:52:44 -04:00
lwvmobile
96faff7711 RTL Verbosity Tweaks and Thread Safety; #125 2023-05-24 09:17:50 -04:00
lwvmobile
94166b493c Misc; #123 #125; 2023-05-23 06:21:58 -04:00
lwvmobile
6a0b1b2dcf RTL/NCURSES - Clear Queue and Dibit Buffer; #125 2023-05-21 20:19:56 -04:00
lwvmobile
5c8e3d95a7 Ncurses Tweaks; Revert RTL BW changes; #125 2023-05-21 13:39:49 -04:00
lwvmobile
4c91588af6 Re-enable P1 Heuristics On TCH and Non CS modes; 2023-05-21 09:14:02 -04:00
lwvmobile
35c05654a5 Fix NXDN/Scanner Bug; 2023-05-19 19:03:20 -04:00
lwvmobile
fbc9b5fab8 Reverting a few minor RTL tweaks; #125 2023-05-19 18:10:12 -04:00
lwvmobile
1126ab6578 P25 - Allow P2 6000sps on C4FM and QPSK; 2023-05-19 17:39:39 -04:00
lwvmobile
0842613b24 RTL - RMS based soft squelch and tweaks; #125 2023-05-19 11:27:13 -04:00
lwvmobile
bf4a4b574c RTL Misc; Disable Offset and Double BW; #125 2023-05-19 06:42:55 -04:00
lwvmobile
380657679e More LZ Tweaks; #123 2023-05-18 18:55:14 -04:00
lwvmobile
0a214af29b RTL ifdef tag additions; #125 2023-05-18 18:47:16 -04:00
lwvmobile
b008122149 More RTL Tweaks; #125 2023-05-18 10:22:05 -04:00
lwvmobile
7b6feb9e4f Attempt Fix/Clean on RTL input code; #125 2023-05-18 09:29:44 -04:00
lwvmobile
e4861bf94c Fix Idas Trunking Issue; #115 2023-05-17 16:23:22 -04:00
lwvmobile
587a3f01a2 Lima Zulu Tweaks III; #123 2023-05-17 07:37:28 -04:00
lwvmobile
8d5c82356e Initial Main/Aero Code Consolidation; #127 2023-05-15 15:06:34 -04:00
lwvmobile
df039ab1c1 Denny's Cap+ 0x90 Data Flag; #116 2023-05-15 12:14:50 -04:00
lwvmobile
f5e3c6eddd DMR Cap+ Block Counter Fix; #126 2023-05-15 03:00:21 -04:00
lwvmobile
fc01712132 Tweaks to NXDN FSW Tests II; #123 2023-05-14 13:59:29 -04:00
lwvmobile
7ec0bf83b4 Ncurses No Color Trunking Tweaks; #114 2023-05-13 20:11:39 -04:00
lwvmobile
504476c5db Misc Tweaks and Clear Stale Active Ch Values; #120 2023-05-13 01:39:16 -04:00
lwvmobile
f78dbd57bc Fix LimaZulu NXDN Tweaks #123 2023-05-12 02:44:18 -04:00
lwvmobile
d2b27fdf25 Tweaks to NXDN FSW Tests; #123 2023-05-05 18:32:06 -04:00
lwvmobile
3aa20f82b9 pV Conventional Frame Sync and pV Tweaks; #122 2023-05-05 06:34:42 -04:00
lwvmobile
402b2f0264 NXDN Frame Sync Tests and Cmake Option #123 2023-05-05 06:15:03 -04:00
lwvmobile
4dd2328e10 Various uint64_t/ul/ulli fixes for 32-bit; 2023-05-04 23:58:47 -04:00
lwvmobile
98bcdd203e Misc Tweaks and Fixes; 2023-05-03 23:45:04 -04:00
lwvmobile
741ed51d08 NCURSES Active Ch Display Tweaks; #120 2023-05-02 18:34:33 -04:00
lwvmobile
5d8e07228e DMR Active Channel Display; CSBK Tweaks; #120 2023-05-02 18:32:01 -04:00
lwvmobile
4a43a48b2e P25 ENC Trunk Toggle and Active Tweaks; #120 #121 2023-05-02 18:25:28 -04:00
lwvmobile
0ef3b4ab4b Active Channel Display NXDN Setup and Misc; #120 2023-05-02 18:20:51 -04:00
lwvmobile
00e0f00974 NXDN Tweaks to clear stale key values on keyload; 2023-04-29 17:02:55 -04:00
lwvmobile
91181f9e93 TCP Audio Retry on Disc; Ncurses Key '8'; #119 2023-04-29 16:06:41 -04:00
lwvmobile
5c42c50a40 Version Naming Update; 2023-04-25 17:18:35 -04:00
lwvmobile
36399386c5 More NXDN/IDAS Tweaks and Fixes; #115 and #118 2023-04-25 16:00:16 -04:00
lwvmobile
8eee4cd699 NXDN Type-D Decoding/Trunking; NXDN Tweaks; #115 2023-04-23 19:52:36 -04:00
lwvmobile
1410e8bd81 Cap Plus Expansion; Minor DMR Tweaks; #116 2023-04-23 19:50:06 -04:00
lwvmobile
915375fb1c Initial NXDN Type D - 'IDAS' Support; #115 2023-04-13 18:20:58 -04:00
lwvmobile
52fff28dc4 NXDN Array Expansion and Message Tweaks; #113 2023-04-13 11:00:37 -04:00
lwvmobile
bd035622b8 No Color Cmake Build Option #114 2023-04-13 11:00:00 -04:00
lwvmobile
44163710f9 More XPT Work; #110 2023-04-12 18:12:10 -04:00
lwvmobile
44b1ccdeae Hashed DMR TG Multi Key Loading Fix; #112 2023-04-12 13:10:13 -04:00
lwvmobile
34113cb782 housekeeping; 2023-04-09 14:30:05 -04:00
lwvmobile
2a336a9275 Hytera XPT WIP #110 2023-04-08 19:15:33 -04:00
lwvmobile
5c08a9193c Yet Another Cmake Warning Fix #107 2023-03-28 23:33:20 -04:00
lwvmobile
2cae7f9c18 NXDN -- DFA Base Freq Fix; ADJ_SITE_INFO; #106 2023-03-28 17:30:02 -04:00
lwvmobile
e056c97d9d Issue #105 - Make Work with Named Pipe (FIFO) 2023-03-22 20:07:02 -04:00
lwvmobile
dc49e0d08b NXDN DFA Support; 2023-03-22 20:00:41 -04:00
lwvmobile
b639f6af28 Fix Cmake Warnings; 2023-03-21 22:42:09 -04:00
lwvmobile
6b45c4ba9b Issue #105 Segfault Bugfix; 2023-03-21 21:09:45 -04:00
lwvmobile
2062502a59 P2 - TDMA-CC Tuning Bugfix and callstring tweak; 2023-03-21 20:58:44 -04:00
lwvmobile
a490d9ead2 Merge pull request #104 from lwvmobile/lite
NXDN48/96 Tweak;
2023-03-12 15:55:12 -04:00
lwvmobile
c73832ac2c NXDN48/96 Tweak; 2023-03-12 15:42:49 -04:00
lwvmobile
fe1fa79f70 More XPT Tweaks and Notes; 2023-03-09 19:12:57 -05:00
lwvmobile
f2f29f2287 Line Space OCD; 2023-03-09 18:40:36 -05:00
lwvmobile
3181e58b19 Lite to Aero Rebrand; 2023-03-08 02:25:51 -05:00
lwvmobile
6204aec2a5 P25 P1 LCW re-write and updates; 2023-03-08 02:25:29 -05:00
lwvmobile
267180ed0e NCurses LO Return to CC; 2023-03-08 02:04:56 -05:00
lwvmobile
8d9cbb3720 XPT Trunking Tweak; 2023-03-08 02:04:09 -05:00
lwvmobile
8af6d2e185 P25 P1 QPSK MSIZE/SSIZE Tweak; 2023-03-08 02:03:01 -05:00
lwvmobile
abeb92ff8a Fix trunk_hangtime lf to f; Ncurses Fixes; 2023-03-06 03:07:27 -05:00
lwvmobile
be47075611 Fix Fast Scanner and NCurses Display (again) 2023-03-05 05:54:23 -05:00
lwvmobile
1640b58ae4 Fix unintended bug in iden_up_vu; 2023-03-04 20:54:52 -05:00
lwvmobile
7a34d531b1 Literature Update 2023-03-04 19:28:58 -05:00
lwvmobile
0af814c72f P25 TSBK PDU Fix; vPDU PDU Fixes; Scanner Freq Fix 2023-03-04 19:26:44 -05:00
lwvmobile
1477190dea Fast Scan Ncurses Tweak; Update Literature; 2023-03-03 15:38:39 -05:00
lwvmobile
b0cd1881bb P25 - P1 MBF Format Addition; TSBK/vPDU Tweaks; 2023-03-03 15:15:42 -05:00
lwvmobile
44ad75ec17 NXDN Trunking Tweaks and Misc Tweaks; 2023-03-02 22:13:49 -05:00
lwvmobile
1ce487dc13 Trunking -- Faster CC Hunt; 2023-03-01 18:32:29 -05:00
lwvmobile
ed9a96fdc8 Experimental -- Fast Scanner Feature; 2023-03-01 17:56:10 -05:00
lwvmobile
c677efda49 P25 - Remove Test Code; NXDN - Remove Freq Calc; 2023-03-01 17:49:52 -05:00
lwvmobile
fea4f97b89 DMR - XPT Tweaks; Data Header Tweaks; 2023-02-25 16:08:55 -05:00
lwvmobile
f2e3834e0a FID 0x10 - FLCO 0x14, 0x15, 0x16, 0x17, 0x18; 2023-02-24 20:51:47 -05:00
lwvmobile
b8b62ef69a Disable remaining setmod_bw as safety precaution; 2023-02-24 20:46:33 -05:00
lwvmobile
4a8a4a088a NXDN Trunking Tweak - Snap Back to CC on Disc; 2023-02-24 18:41:02 -05:00
lwvmobile
9308c5b251 Fix P_Protect CSBK GI indicator; 2023-02-24 18:39:56 -05:00
lwvmobile
cdfe9435d3 Fix NCurses **tera key display when loaded; 2023-02-24 18:39:01 -05:00
lwvmobile
f6cd915f4d Misc Tweaks; Multi BP; More CapMax FLCO; XPT; 2023-02-23 21:59:08 -05:00
lwvmobile
1dfd59801e Literature Update; 2023-02-22 20:00:24 -05:00
lwvmobile
c4513fab7a NXDN Tweaks and SACCH/FACCH CRC Fixes; 2023-02-22 19:46:06 -05:00
lwvmobile
a3b8839897 Minor Cap+ and XPT Fix; 2023-02-21 13:55:15 -05:00
lwvmobile
9e009867ff Disable/Tweak some setmod_bw defaults; 2023-02-20 17:59:53 -05:00
lwvmobile
e95e2218d9 Cap+ NL; Hytera XPT Trunk Support (experimental) 2023-02-20 12:47:30 -05:00
lwvmobile
a9742043b8 General DMR Tweaks; 64-bit IV from 32-bit MI; 2023-02-20 12:43:16 -05:00
lwvmobile
05eef039c9 DMR - LRRP tweaks; Add LOCN PDU. 2023-02-20 12:41:20 -05:00
lwvmobile
818e952b7b DMR - dheader rewrite; UDT/USBD fix; block tweaks; 2023-02-20 12:40:42 -05:00
lwvmobile
38b962aacf P25 Dibit, Block and PDU Payload Tweaks; 2023-02-20 12:35:44 -05:00
lwvmobile
0217202801 DMR - Fix Cap+ CSBK; Various Minor Fixes; 2023-02-05 16:47:58 -05:00
lwvmobile
ef07b48540 DMR Minor Code Fixes; 2023-02-04 20:10:38 -05:00
lwvmobile
db67a8b227 NCurses Compiler Warning and Call Alert Fix; 2023-02-04 04:35:06 -05:00
lwvmobile
4e2c4577d5 DMR Cap+ CSBK Improvements; 2023-02-03 22:15:13 -05:00
lwvmobile
e581c96560 DMR FLCO Tweaks; P25 Site/RFSS Display; 2023-02-02 20:03:52 -05:00
lwvmobile
f3505269d0 DMR Conf Data CRC9; Message CRC32; Tweaks; 2023-02-01 05:35:21 -05:00
lwvmobile
20ccdbbced DMR FLC Tweaks; CSBK Cleaning; 2023-02-01 05:31:40 -05:00
lwvmobile
fc2fb99502 P25P2 OSS Bugfix; 2023-01-29 18:41:03 -05:00
lwvmobile
143c560958 DMR FLCO - Check PF First; 2023-01-29 16:09:47 -05:00
lwvmobile
d122d7e935 DMR Unknown FLCO Tweaks; PI Tweaks; 2023-01-28 21:00:13 -05:00
lwvmobile
d0f9bb4bad Fix DMR FEC/CRC/RAS Implementation Issues; 2023-01-21 05:43:42 -05:00
lwvmobile
ac752029bd Tweak RAS/CRC; Other Misc Tweaks; 2023-01-19 09:42:42 -05:00
lwvmobile
5b994f5129 NXDN Multi-Key CSV Import; Example Updt; 2023-01-18 12:18:56 -05:00
lwvmobile
ec7d7c24a5 DMR SB/RC Additions; Cap+ LC/CSBK; RAS; 2023-01-17 23:58:52 -05:00
lwvmobile
1d49481f2d Fix/Restore MBEout Files; 'DSP' CACH; Tweaks; 2023-01-17 02:25:53 -05:00
lwvmobile
7ca8cb421c Cap+ FLC/CSBK Tweaks; 2023-01-17 02:08:25 -05:00
lwvmobile
4eb44b3c67 'DSP' File Output for OKDMR - Initial Commit; 2023-01-15 22:04:04 -05:00
lwvmobile
e16e4b61fc Cap+ Things; 2023-01-15 21:22:28 -05:00
lwvmobile
fbd04fa869 Allow Standard BP Key on MBE File Playback; 2023-01-15 18:13:48 -05:00
lwvmobile
7f9b852f36 Fix Audio Gain/Device Out on MBE File Playback; 2023-01-15 18:12:15 -05:00
lwvmobile
f5a7ab2b77 P25 P2 ISCH Var Fix; 2023-01-15 18:09:47 -05:00
lwvmobile
ffe6098fb8 DMR Cap+ Rest Channel FLCO/SLCO Fix; 2023-01-09 19:39:05 -05:00
lwvmobile
157ca8c043 RTL Input Tuning Fix (UDP); Minor Tweaks; 2023-01-09 14:13:00 -05:00
lwvmobile
b722e43a3a dPMR Scrambler Key Support; 2023-01-07 18:41:44 -05:00
lwvmobile
2ba9953d33 'Lite' Optimizations and Tweaks for Win32CYG Build 2023-01-05 18:38:12 -05:00
lwvmobile
bb2199ee84 Con+ CSBK and Tuning Fixes; Group Call Options; 2023-01-02 08:04:22 -05:00
lwvmobile
4efec4e4ef Capacity Plus 'Things'; CSBK PF Check; 2022-12-30 07:22:30 -05:00
lwvmobile
12cf9aa80f Ncurses Call Toggle; T3 Call Safeguard; Lit Updt; 2022-12-29 10:06:15 -05:00
lwvmobile
e5a42dbb11 Literature Update; Minor Tweaks; CSBK update; 2022-12-28 08:43:00 -05:00
lwvmobile
67eaeadc03 Update Readme; 2022-12-27 11:27:03 -05:00
lwvmobile
acb5c16c30 Update README.md 2022-12-27 10:25:40 -05:00
lwvmobile
d16e775e46 Update README.md 2022-12-27 09:23:57 -05:00
lwvmobile
11d4c8c49c More Staging; 2022-12-27 09:18:07 -05:00
lwvmobile
1477880720 Staging for Promotion to Master Branch; 2022-12-27 08:32:34 -05:00
lwvmobile
9290098081 TCP/RIG Err Handling; Ncurses Menu Entries; 2022-12-27 07:04:49 -05:00
lwvmobile
eeb6924369 Default Smoothing Off; Upsample 8k Audio to 48k; 2022-12-26 09:37:37 -05:00
lwvmobile
c02d7c0ba0 DMR Trunking VC/CC Sync Time Tweaks; 2022-12-26 08:44:13 -05:00
lwvmobile
324191d79f Disable Audio Smoothing TCP/RTL; Make User Toggle; 2022-12-23 18:27:13 -05:00
lwvmobile
e613b85829 Lockout TG Audio Playback and Keyboard Shortcuts; 2022-12-21 22:02:13 -05:00
lwvmobile
49f81da4df Trunking White List, Private and Data Calls; 2022-12-21 21:20:57 -05:00
lwvmobile
826c99d563 Minor CSBK/CC Freq Tweak; Literature Tweak; 2022-12-20 21:15:37 -05:00
lwvmobile
2441664b19 RIGCTL hostname to mirror TCP Audio Link Hostname; 2022-12-19 18:24:37 -05:00
lwvmobile
5c733c0660 Remus Ncurses Call String Stuff; 2022-12-19 05:30:48 -05:00
lwvmobile
73824084ad Overcook DMRLA and T3 Site ID Things; 2022-12-19 04:59:00 -05:00
lwvmobile
209d4e039e DMR Con+ Site Id Bugfix/Revert; 2022-12-18 23:23:23 -05:00
lwvmobile
fa4e84bc77 DMR LRRP and T3 Site Id Work; 2022-12-18 21:52:59 -05:00
lwvmobile
4946897914 Minor DMR Trunk/Site Tweaks; Update Readme w demo; 2022-12-17 23:39:45 -05:00
lwvmobile
57e3f518dd DMR T3 DX Calls; RTL Input Frequency Check; 2022-12-15 19:22:54 -05:00
lwvmobile
08a548339c LRRP and Caputre Bin CLI Switches L and c; 2022-12-15 03:09:27 -05:00
lwvmobile
36c337ede8 Update Readme and Example Files; 2022-12-15 01:41:43 -05:00
lwvmobile
f6bb325dac DMR RTL Trunking Code Fix; 2022-12-14 18:06:50 -05:00
lwvmobile
626869992e DMR Con+ VC Sync Time Fix; SetMod_BW Fix; 2022-12-14 17:12:21 -05:00
lwvmobile
5422b337bb RTL work; Reassign CLI Switches; Fix CTRL+C; 2022-12-14 16:21:30 -05:00
lwvmobile
b6f270be05 NXDN Check for CC Freq Tweak; 2022-12-14 13:09:26 -05:00
lwvmobile
3ea813ebbc DMR Trunking VC Hangtime Tweaks; TG Block Tweak; 2022-12-14 00:04:36 -05:00
lwvmobile
53980c98ed DMR Con+ VC Hangtime Tweaks; 2022-12-13 20:20:28 -05:00
lwvmobile
536372d877 Set CC Frequency from RIGCTL if not specified; 2022-12-12 21:30:18 -05:00
lwvmobile
896f3a8533 User Configurable TCP Audio and SetMod BW; 2022-12-12 08:32:41 -05:00
lwvmobile
68bbea64d5 P25 Yellow PDUs; 2022-12-12 08:31:54 -05:00
lwvmobile
711a4cb871 More DMR Trunking Tweaks; MFID tweaks; 2022-12-11 16:33:25 -05:00
lwvmobile
8fd1d8fe35 DMR T3 Tweak; DMR Voice Tweak; Ncurses Reset Fix; 2022-12-10 20:35:14 -05:00
lwvmobile
23c396cbe8 DMR Cap+ Trunking RC Increment Reversion; 2022-12-09 23:41:10 -05:00
lwvmobile
e91c21fadb Fix Hangtime/CC Return Bug; 2022-12-09 22:39:37 -05:00
lwvmobile
15a8f80344 Assign Chan Map Import to LCN Freq for CC Hunting; 2022-12-09 18:23:20 -05:00
lwvmobile
5130899a67 DMR Con+ and Cap+ Trunking Fixes; 2022-12-09 18:03:53 -05:00
lwvmobile
f5ac9ff0b2 LRRP Temp Disable Most Reporting Types; 2022-12-09 18:02:15 -05:00
lwvmobile
14dd045312 Remus; 2022-12-09 08:36:42 -05:00
lwvmobile
fbb00f78fe Roman NCurses EGPS/LRRP/Data Display Fix; 2022-12-08 12:35:34 -05:00
lwvmobile
a5d23d9e12 MBC Header and Blocks CRC; 2022-12-07 22:58:57 -05:00
lwvmobile
a2b3da5b5a NCurses LRRP Tweak and Roman Data Header Stuff; 2022-12-07 18:00:09 -05:00
lwvmobile
a9417afd67 DMR EGPS, LRRP, Data Block Tweaks; 2022-12-07 04:26:11 -05:00
lwvmobile
438f89bf4c Add Date to Per Call Time Stamp; 2022-12-07 02:06:26 -05:00
lwvmobile
2f2eecddfc Various Trunking Tweaks; 2022-12-06 08:47:46 -05:00
lwvmobile
2fceee5a2f Reverse Mute 2022-12-04 19:15:33 -05:00
lwvmobile
62c70cbf92 Update Readme and Images; 2022-12-04 18:40:49 -05:00
lwvmobile
b97014ff0b DMR Cap+ Trunk Logic 2022-12-04 17:10:19 -05:00
lwvmobile
68edb9463c DMR NCurses Tweaks and Additions; E-GPS; 2022-12-04 14:35:26 -05:00
lwvmobile
178f88a28f DMR Reorganization; Initial Trunking Support; 2022-12-03 20:16:43 -05:00
lwvmobile
f7d103c6a2 NXDN Sync Type Tweak; 2022-12-03 17:08:01 -05:00
lwvmobile
10d10063f0 Additional Trunking Checkdown; 2022-12-02 18:45:25 -05:00
lwvmobile
dba3b79266 Disable Debug Frame Sync Prints; 2022-11-28 15:20:44 -05:00
lwvmobile
0441b8fdbd Hangtime Safety Parenthesis 2022-11-28 09:23:56 -05:00
lwvmobile
ea399e50a8 NXDN Preamble + FSW Sync; 2022-11-24 18:43:51 -05:00
lwvmobile
66f710e877 Channel to Frequency Map CSV Importer; 2022-11-23 09:08:32 -05:00
lwvmobile
0f227e40c3 Remove Unused OP25 NXDN Trellis Decoder; 2022-11-23 08:59:56 -05:00
lwvmobile
136ed75342 NCurses Display Group Labels in P25 and DMR; Tweak 2022-11-20 07:31:02 -05:00
lwvmobile
61cefa6a87 Trunking Hangtime and Tweaks; NXDN F2U Tweak; 2022-11-19 19:43:48 -05:00
lwvmobile
cc7504c280 Route /dev/dsp and pa input/output to pulse; 2022-11-18 11:06:42 -05:00
lwvmobile
07139b3d7d P25p2 QPSK Optimization Tweaks; 2022-11-18 09:44:53 -05:00
lwvmobile
638f212525 Update Readme and Screenshots; Keyboard Shortcuts; 2022-11-17 11:23:10 -05:00
lwvmobile
9f624e0b62 NXDN CAC/CCH Messages; Initial Trunking Support; 2022-11-17 05:50:14 -05:00
lwvmobile
eefe1bac5e Minor Cleanup and Tweaks; 2022-11-16 17:00:26 -05:00
lwvmobile
532c1cc3b6 P25 Trunking Additions; 2022-11-16 16:10:37 -05:00
lwvmobile
b1c40ed6e7 Roman DMR End Call Alert 2022-11-13 23:35:17 -05:00
lwvmobile
94dbd1512d P25 Trunking Initial Commit; 2022-11-13 23:04:50 -05:00
lwvmobile
c73d45d553 EDACS tweaks; 2022-11-12 03:34:21 -05:00
lwvmobile
d1efa05164 NXDN Permissed Data Conditional Check; 2022-11-11 22:45:33 -05:00
lwvmobile
7af5ffe9fa NXDN FSW and Lich Based Decoding; 2022-11-11 22:12:37 -05:00
lwvmobile
8141ea2e78 T_Max Frame Sync Work; Reorganizing; 2022-11-11 22:07:37 -05:00
lwvmobile
ec4ace1514 EDACS; Init Tr; RIGCTL; TCP and WAV in; 2022-11-09 23:51:58 -05:00
lwvmobile
eb5cbaad93 DEV BUILD designation 2022-11-09 15:32:45 -05:00
lwvmobile
f5d0575978 Update README.md 2022-11-06 00:39:34 -04:00
lwvmobile
a0d9e349c2 TSBK NET_STS_BCST Last Block Fix; Protect Block; 2022-11-02 01:40:45 -04:00
lwvmobile
7ca65cf687 Call History Fix & Timestamp; Cap+ VLC Fix; 2022-11-01 03:54:10 -04:00
lwvmobile
b4a0e2e9f3 P2 4V/2V Deinterleave Fix; Errs now C0 and C1; 2022-10-25 19:21:57 -04:00
lwvmobile
73f0d5df44 P25 TSBK Bug Fix; Add More P25 PDUs; 2022-10-23 21:36:06 -04:00
lwvmobile
b003d0a210 Merge pull request #90 from KuzVlad/fix_lfsr
fixed function signature
2022-10-23 15:20:45 -04:00
KuzVlad
83f390ba88 fixed function signature 2022-10-23 13:13:05 +03:00
lwvmobile
c8aafb1be0 P25 P2 Frame Stabilization and Tweaks 2022-10-22 18:45:25 -04:00
lwvmobile
3086b7852e MSData Bug Fix; Disable DMR Data Superframe Debug; 2022-10-20 11:38:50 -04:00
lwvmobile
8f6796d6f6 Filter Tests and Tweaks 2022-10-19 23:01:59 -04:00
lwvmobile
e9b1d76a98 Frame Sync OCD 2022-10-19 22:22:23 -04:00
lwvmobile
afba623b20 Fix More Compiler Warning 2022-10-19 22:19:00 -04:00
lwvmobile
9b92855b4e DMR CACH and Burst ERR Tweaking; 2022-10-17 21:07:58 -04:00
lwvmobile
4138f92917 DMR Burst Type FEC Fix; 2022-10-17 17:16:22 -04:00
lwvmobile
0bb9dd760c Enable DMR Direct Mode Voice; No Data; 2022-10-16 14:10:16 -04:00
lwvmobile
8b4f91ed8b char * pEnd build bugfix; 2022-10-13 14:18:05 -04:00
lwvmobile
a8fd2c7834 10/32/64 Key Entry at CLI; Unmute Condition Check; 2022-10-13 11:40:15 -04:00
lwvmobile
8670b99d69 DMR Stereo Internal Sync Tweaks; OCD Tweaks; 2022-10-09 07:32:48 -04:00
lwvmobile
6bd37821a9 NXDN96 Scrambler Support; Force Key Priority CLI; 2022-10-08 07:08:23 -04:00
lwvmobile
215594a2a8 P25 PDU Tweaks; 2022-10-08 07:07:45 -04:00
lwvmobile
3f31d4ffe0 GFSK Symbol Capture Bin Quick Fix 2022-10-05 13:29:00 -04:00
lwvmobile
4a83c1beae Permit MAC_SIGNAL on bad CRC with -F option 2022-10-05 12:51:33 -04:00
lwvmobile
67a78d8be0 Symbol Capture Read Tweaks and Fixes 2022-10-05 12:07:00 -04:00
lwvmobile
14ba90a33f TSBK to vPDU bug fix 2022-10-02 08:07:25 -04:00
lwvmobile
66fd3fd7bf Per Call Wrong Tone Selection Bug Fix 2022-10-02 05:58:49 -04:00
lwvmobile
d1ffcda819 Update Readme; NCurses MAC_SIGNAL Fix 2022-10-01 04:52:23 -04:00
lwvmobile
f81575335e Phase 2 Fixes and Tweaks (ISCH and Disc Tap) 2022-10-01 04:18:22 -04:00
lwvmobile
163db6b872 MFIDA4 Console Tweak 2022-09-30 12:43:16 -04:00
lwvmobile
e6927d8115 P25 Additions, Tweaks, Testing 2022-09-30 11:52:03 -04:00
lwvmobile
3a19bf5583 Update Readme p2 2022-09-28 17:09:14 -04:00
lwvmobile
181a6a5695 Update Readme 2022-09-28 17:04:24 -04:00
lwvmobile
0d2244fac0 Don't Log Null PDUs 2022-09-28 16:56:11 -04:00
lwvmobile
bd7d43de79 Help Clarification 2022-09-27 18:42:11 -04:00
lwvmobile
c37400bf81 DMR Stereo Standalone Option 2022-09-27 18:39:35 -04:00
lwvmobile
bab139e2e4 P25 Restructuring 2022-09-27 17:21:51 -04:00
lwvmobile
6714761d8e Mute Audio Bug Fix; Don't process audio when mute 2022-09-26 19:54:03 -04:00
lwvmobile
467992ceff Clear Audio Buffer on Mute Toggle 2022-09-26 19:27:23 -04:00
lwvmobile
cb84f7469e Mute Audio Option (-o null) 2022-09-26 19:13:49 -04:00
lwvmobile
ad4013d7d2 Test Push from VSCodium 2022-09-23 12:45:07 -04:00
lwvmobile
5b0e40e758 test commit from vscodium 2022-09-23 12:32:36 -04:00
lwvmobile
05a9268aef Merge pull request #85 from lwvmobile/callalert
Call Alert; Call History Bug Fix; Minor Tweaks
2022-09-22 21:13:04 -04:00
lwvmobile
f3d2dbb4dd Call Alert; Call History Bug Fix; Minor Tweaks
Call Alert (-a or toggle on/off in ncurses)
--beep sound on radio id change when using ncurses terminal (tied to call history array)
---need to copy tone8.wav and tone24.wav files to /usr/share/ directory and chmod 777 them.
---updated all auto install scripts to copy and chmod as appropriate
----iz4tow, need to update windows tutorials for the wav files, else they won't play

Tweaks/Bug Fix to Call History (specifically DMR) to only set src ids on voice sync, and not on data sync

Manually Set P2 Parameters at CLI (-X BEE00ABC123)
-- use -X (capital X) and then enter WACN/SYSID/CC altogether 
--- feature already available in ncurses terminal menu

Update Linux Install Instructions and auto installers to copy/paste wav files into /usr/share/ directory

Other Minor Tweaks
2022-09-22 20:46:47 -04:00
lwvmobile
370d6be28e NXDN/NCurses/CLI Per Call Bug Fix
NXDN/NCurses/CLI Per Call Bug Fix
2022-09-20 15:46:17 -04:00
lwvmobile
3224f0af37 Merge pull request #84 from lwvmobile/lwvmobile-patch-1
P2 Console Output Change; Disable YSF Sync
2022-09-20 14:09:22 -04:00
lwvmobile
5a73bcac8b P2 Console Output Change; Disable YSF Sync
P2 Console Output Change; 
--change up color coding slightly
Disable YSF Sync
--frame_ysf variable was never initialized, so some systems would false sync on YSF (YSF never finished, no handling yet)
2022-09-20 14:08:06 -04:00
lwvmobile
af76c8de0d Merge pull request #83 from lwvmobile/phase2
Phase 2 Audio Decoding
2022-09-20 00:00:54 -04:00
lwvmobile
a3ecbe7414 OCD Spacing Issue
OCD Spacing Issue
2022-09-19 23:25:37 -04:00
lwvmobile
4e04056f4b Phase 2 More PDU decodes
A few extra PDU decodes for Secondary Control Channel and Voice Grant Update
2022-09-19 23:08:44 -04:00
lwvmobile
d8cf47b225 Checkdown for Valid P2 Parameters
Checkdown for Valid P2 Parameters
--if invalid parameters specified by user for P2 WACN, SYSID, and CC (too large) then treat same as missing parameters and skip processing P2 frames that require scrambling.
2022-09-19 17:33:16 -04:00
lwvmobile
57d4c7afbe Minor Tweaks
Minor Tweaks
--ncurses will truncate manually entered P2 parameters set if they are larger than expected.
--muting/key tweak
2022-09-19 17:13:58 -04:00
lwvmobile
cb5c160fbf Experimental Symbol Capture Bin Input Throttle
Experimental Symbol Capture Bin Input Throttle
--throttle read speed when reading capture bin files that are still being written to by OP25, quick easy piggyback (-n).
Readme tweaks
Minor tweaks
2022-09-19 15:48:14 -04:00
lwvmobile
5390a52313 Restore Ncurses Menu Option
Restore Ncurses Menu Option
2022-09-17 13:25:57 -04:00
lwvmobile
1d78e000da Fix DMR Voice Burst Bug; Update Screenshot
Fix DMR Voice Burst Bug
--was gathering bits to bytes wrong, and it broke DMR ProcessVoiceBurstSync

Update Screenshot to reflect current look and feel of FME
2022-09-17 13:24:28 -04:00
lwvmobile
90700e7d28 Phase 2 Audio Decoding
Phase 2 Audio Decoding Implemented

XDMA decoder class implemented and set to default (-ft)
--decoder class includes P25 1, 2, DMR BS/MS, and X2-TDMA
-- -fr -T option reworked, -T now for Per Call, use -ft (default)

Force Privacy Key
--force privacy key use over system FID and SVC options.

Per call now works on XDMA decoding and NXDN decoding

Limited Phase 1 TSBK and Phase 2 LCCH handling (for Network Status Broadcast)
--Need to get WACN, SYSID, and CC values for Phase 2 descrambling

Fix most of the compiler warnings
2022-09-17 11:44:45 -04:00
lwvmobile
0e9c2fc3dc Additional Sanity Check
Additional Sanity Check
--perform sanity check on DMRvcL and DMRvcR to prevent out of bounds array issue that could lead to a crash in some environments with bad signal
2022-08-29 19:49:34 -04:00
lwvmobile
4d24e93905 small example fix
remove the -pu option, no longer need to unmute audio for a payload on it
2022-08-28 20:08:00 -04:00
lwvmobile
1505103c18 RTL PPM Input Fix
RTL Input Fix
--PPM error wasn't being set by command line -P switch. Had disabled for testing, forgot to re-enable.
2022-08-28 00:48:53 -04:00
lwvmobile
861ca3cb54 Merge pull request #82 from lwvmobile/SerpenteraII
Add More Options
2022-08-27 23:17:07 -04:00
lwvmobile
c228207588 Additional ifdef rtl rule
--add rule to prevent tuning box from opening if no rtl support.
2022-08-27 21:31:59 -04:00
lwvmobile
09f92579ee Banner Update
Banner Update; Minor Tweaks?
2022-08-27 20:29:13 -04:00
lwvmobile
a277707a4d Entry Box Width Fix 2022-08-26 22:05:23 -04:00
lwvmobile
41a236d244 Nomenclature Fix
Nomenclature Fix
2022-08-26 22:01:39 -04:00
lwvmobile
837bfac5f5 Add More Options
Serpen'tera' Privacy now supports 10/32/64 character modes (have to use ncurses terminal to enter 32 or 64 char values)
NXDN Scrambler LFSR
Odd and End Terminal Tweaks
2022-08-26 21:54:54 -04:00
lwvmobile
2f05bfacfa DMR Voice LC Header Fix
DMR Voice LC Header Fix
--Fix Voice LC Header to assign SRC and TGT values, mask if Cap+ system detected to prevent erroneous values
--Optimization for FID and SVC options, don't reset on carrier signal drop or TLC
2022-08-23 23:31:34 -04:00
lwvmobile
f61c59ccc0 Merge pull request #81 from lwvmobile/serpentera
DMR Additions
2022-08-23 17:01:19 -04:00
lwvmobile
a682d9e882 DMR Stereo Slot 2 Fix
DMR Stereo Slot 2 Fix
--DMRA Privacy Key not applied correctly in Slot 2 Stereo Mode
2022-08-22 17:57:05 -04:00
lwvmobile
88b3145cfd OCD Nomenclature #3
--final final on nomenclature, P to Pr
2022-08-22 16:57:44 -04:00
lwvmobile
7199848f16 OCD Line Spacing and Nomenclature
OCD Line Spacing and Nomenclature
--fixed a few alignment issues to my liking
--final on nomenclature for privacy modes
2022-08-22 16:55:00 -04:00
lwvmobile
b7bb59dbba Additional Console Print Fixes
Additional Console Print Fixes
--missed a few places where we needed to have info printing
2022-08-22 02:34:29 -04:00
lwvmobile
eb9152fb4e More Nomenclature Fixes
--maybe I can finally settle on this naming scheme
2022-08-22 01:49:56 -04:00
lwvmobile
2ec4250e5b Disable setting state src and tgt on VLC Header
Disable setting state src and tgt on VLC Header
--bugfix for ncurses terminal specifically to prevent the Voice LC Header setting the src and tgt ids; 
--some TIII systems seem to have different values for that than what is in the TLC and Voice Burst.
--console printout can still show erroneous VLC header radio src ids that don't match the TLC or Voice Burst.
2022-08-22 00:56:01 -04:00
lwvmobile
092da7b6d0 Nomenclature Fix
Nomenclature Fix
2022-08-21 23:55:16 -04:00
lwvmobile
df6d7a6609 DMR Additions
--Easier to use key entry for privacy modes
---Serpen'tera' 10 mode now available
--Slightly improved dmr dibit buffering/inverted dibit buffering
--Tweaks to console and ncurses output regarding FID, SVC, and privacy key values
--fix for RTL optional support (think I have all the ifdef covered now)
--TGT, SRC, FID, SVC, now set on Voice LC Header (not sure why I wasn't before)
--other misc tweaks that I can't recall
2022-08-21 23:45:00 -04:00
lwvmobile
7f34ff9340 LRRP Additional Shim
--Forgot a Shim Flag from the KrisMar set
2022-08-14 23:08:01 -04:00
lwvmobile
12e4b4cd6f Merge pull request #78 from lwvmobile/LRRPPatch5
LRRP Patches and More Options
2022-08-14 22:51:42 -04:00
lwvmobile
6189ec95fa LRRP Patches and More Options
LRRP Patches and LRRP Filename Options
--shim/rework some rules for KrisMar samples
--allow filename to be customized in ncurses terminal
2022-08-14 22:43:58 -04:00
lwvmobile
0f6140a30a Merge pull request #77 from lwvmobile/mutingtweaks
Muting Enc Tweaks; LRRP getDateL tweak;
2022-08-13 19:09:08 -04:00
lwvmobile
5cb14c356b Add files via upload 2022-08-13 19:07:53 -04:00
lwvmobile
44cdfd912d Muting Enc Tweaks; LRRP getDateL tweak;
Muting Enc Tweaks
--Tweak when to mute and unmute encrypted traffic, and when to write wav and mbe files when enc or not
--If any DMR traffic appears muted that shouldn't be, simply toggle the mute in ncurses menu
LRRP getDateL tweak
--expand array from 99 to 120; seems to be usable in both Linux Desktop and Cygwin this way, most tests required.
2022-08-13 19:03:35 -04:00
lwvmobile
ec4c4637df LRRP Patch 4
Revert getDateL array size; 200 fixes issue in Cygwin, but breaks in Linux builds; (priority is Linux builds) 
--Will look into a different solution that works on both ends.
2022-08-13 13:55:13 -04:00
lwvmobile
e5a7f8c41a LRRP Patch 3
Expand Array on LRRP getDateL function to get properly formatted datestamp in lrrp.txt
2022-08-13 12:47:03 -04:00
lwvmobile
03fb413750 Merge pull request #76 from lwvmobile/LRRPpatch2
LRRP Patch 2
2022-08-13 12:35:52 -04:00
lwvmobile
f22d61df62 LRRP Patch 2
Attempt to Patch/Mitigate Corrupt Date Stamp in lrrp.txt file when using certain environments (cygwin)
2022-08-13 12:35:03 -04:00
lwvmobile
d20de53f91 Merge pull request #75 from lwvmobile/lrrp-patch
LRRP Patch
2022-08-12 15:31:47 -04:00
lwvmobile
3ba7a96bbd LRRP Patch
LRRP Patch - Additional Flags for Lat/Lon
2022-08-12 15:31:18 -04:00
lwvmobile
3e36e5e78d Merge pull request #72 from lwvmobile/lwvmobile-patch-2
Fix Readme; Init Variable
2022-08-12 10:45:17 -04:00
lwvmobile
83edd7ff2b Fix Readme; Init Variable
Fix Reame Grammar Error (double text)
Init Variable that might cause the broken/experimental source audio monitor to open in some distros/cygwin.
2022-08-12 10:43:10 -04:00
lwvmobile
416edcbd59 Merge pull request #69 from lwvmobile/ncursesmenu
NCurses Menu
2022-08-11 19:21:15 -04:00
lwvmobile
65ce60f6b5 Update Readme
Embed Youtube video link to first image...hopefully.
2022-08-11 15:53:29 -04:00
lwvmobile
e461335b2e Update CMakeLists.txt
Make PulseAudio a requirement
2022-08-11 13:34:03 -04:00
lwvmobile
b9223e5207 Mute NXDN and P25 ENC
Mute NXDN and P25 ENC by default, but still print frame payloads.
2022-08-11 10:17:32 -04:00
lwvmobile
805fdd7583 Proof Reading; Tweaks;
Proof Read and tweak a few minor things. Add a few #ifdef USE_RTLSDR to make sure it still compiles when not using the rtl support.
2022-08-11 09:11:06 -04:00
lwvmobile
2b847c2270 Encrypted DMR muted by default now
Encrypted DMR muted by default now; Can be toggled in Terminal; Will still dump payload on request. Fix Bug in DMR Stereo 'muddy sound' caused by appending audio errs to both left and right channel each pass instead of only when using left or right.

--will not playback audio or write wav files or mbe files when muted

Fix errs and errsR to only append/set in MBE when on that slot, not always
2022-08-10 23:39:19 -04:00
lwvmobile
6043b14c13 Update Readme
Update Readme; Minor Bug Fix. Update dmr_so and dmr_soR in the Voice LC Header.
2022-08-10 20:03:26 -04:00
lwvmobile
11b353089b Data Header and Data Bursts Cleanup
Cleanup the code in the dmr_sync.c file, fix minor code errors.
Include the dsd-fme-qgis-map file for opening with QGIS and importing LRRP data dumped to ~/lrrp.txt
Update the Readme file.
2022-08-10 18:44:56 -04:00
lwvmobile
b39d5d8401 Accidentally included again
Deleted again
2022-08-09 18:45:21 -04:00
lwvmobile
5d44425b10 Cleanup Straggler Code and Language
Cleanup Straggler Code and Language
--only dropped one F-Bomb this time
2022-08-09 18:43:44 -04:00
lwvmobile
f45f4fe413 NCurses Menu
--NCurses Menu (no more tedious CLI options)
--Save/Read Capture Bin (WIP!)
--Read OP25 Capture Bin (WIP!)
--Per Call WAV saving on DMR Stereo
--Revampled Data Header and 1/2, 3/4 Data LRRP
--Dump LRRP Data to text file, import into QGIS
--Included QGIS Map File with layers set up
--DMR CACH and Burst FEC 
--No more Port Audio or OSS...ever. 
--Switch to 8Khz/1Ch for most decode types due to crisper sound
---DMR Stereo remains at 24/2, will look into revampint upsampe for cleaner sound
2022-08-09 18:10:13 -04:00
lwvmobile
10ed2eac5a Merge pull request #67 from lwvmobile/summercleanup
Summer Cleanup
2022-06-20 08:47:58 -04:00
lwvmobile
222cd706bf Update README.md 2022-06-19 11:44:01 -04:00
lwvmobile
18714523c7 Update Screenshot 2022-06-19 10:21:19 -04:00
lwvmobile
6c89c6260b Update README.md 2022-06-19 10:20:30 -04:00
lwvmobile
48006c28c0 Additional Info
Add info regarding download-and-install.sh vs download-and-install-nodeps.sh and when to use each one, and additional info on the transition from dsd to dsd-fme executable, and info on manually removing the old dsd executable if needed.
2022-06-19 09:54:40 -04:00
lwvmobile
634eba522f Create download-and-install-nodeps.sh
This version is to download and install if you already have dependencies installed, saving time over the initial download-and-install.sh which is only for new/clean builds without deps installed.
2022-06-19 09:37:55 -04:00
lwvmobile
81588b3201 Additional Accredation
Giving credit to where credit is due. Trying to make sure I get all my sources listed as best as I can.
2022-06-19 08:19:40 -04:00
lwvmobile
1ca0f8a7d5 Update README.md
Tweak the Auto Install script to use download-and-install.sh
Minor Info Tweak; Thorough Comb Through for Accuracy
2022-06-19 08:13:33 -04:00
lwvmobile
7133ad9dae Update Readme
Update Readme to let current users know to that the executable name was changed from dsd to dsd-fme.
2022-06-17 08:31:22 -04:00
lwvmobile
caf21d2f0c Add info for headless installs
Add info for headless installs
2022-06-16 13:16:28 -04:00
lwvmobile
2b0a85f99f Change Permission to allow execute
Change Permission to allow execute
2022-06-16 06:27:34 -04:00
lwvmobile
3a3f717236 Create install.sh 2022-06-16 06:17:20 -04:00
lwvmobile
b4c7c60427 Rename install.sh to download-and-install.sh 2022-06-16 06:15:03 -04:00
lwvmobile
0f2dfe4dca Change Examples
Change Examples to reflect executable name change from dsd to dsd-fme
2022-06-16 06:10:26 -04:00
lwvmobile
f0cc508bf9 change executable name to dsd-fme
rename executable from dsd to dsd-fme
2022-06-16 05:58:38 -04:00
lwvmobile
5b46fb8ab3 Remove Building TESTS
Remove Building TESTS
Remove PortAudio
2022-06-16 05:54:32 -04:00
lwvmobile
1a87f81f08 Delete debian directory 2022-06-16 05:53:32 -04:00
lwvmobile
af6a5b39de Delete FindLibPortAudio.cmake 2022-06-16 05:51:03 -04:00
lwvmobile
2c839f7fd2 Delete .github/workflows directory 2022-06-16 05:50:02 -04:00
lwvmobile
af0c0a4418 Delete .gitignore 2022-06-16 05:49:49 -04:00
lwvmobile
c495c90ef9 Delete CONTRIBUTING.md 2022-06-16 05:49:25 -04:00
lwvmobile
f8be80318b Delete CHANGELOG 2022-06-16 05:49:09 -04:00
lwvmobile
dbea859331 Delete test directory 2022-06-16 05:48:57 -04:00
lwvmobile
2463fe22f7 Delete .travis.yml 2022-06-16 05:48:15 -04:00
lwvmobile
dc0c78e14d Summer Cleanup
Summer Cleanup
--delete unused files, work on cmake,
2022-06-16 05:46:58 -04:00
lwvmobile
a2ac82c470 Merge pull request #66 from lwvmobile/dmrstereopatching
DMR Stereo Audio and Timing Tweaks
2022-06-15 04:59:18 -04:00
lwvmobile
c402dfff96 Code Tweak and Clean Up More DEV Code
Tweaks to when to run LFSR and remove unused code
2022-06-12 13:10:26 -04:00
lwvmobile
3f586d9c98 Restore Line Break 2
Restore Line Break 2
2022-06-12 12:30:05 -04:00
lwvmobile
4ab74a6bf0 Restore Line Break Printing
Restore Line Break Printing and Clean Out some DEV code
2022-06-12 12:14:54 -04:00
lwvmobile
d89507ebde DMR Stereo Audio and Timing Tweaks
--Tweak Naming of DMR Stereo output streams, giving them unique names so that the pulse audio server will remember their audio levels and left and right channel configurations on subsequent start ups.

--Tweak timing of events inside of the DMR BS Stereo Method
2022-06-12 11:58:03 -04:00
lwvmobile
806fe955cb Fix Minor Ncurses Regression
Fix Minor Ncurses Regression
2022-06-09 20:06:22 -04:00
lwvmobile
c82e028032 Merge pull request #65 from lwvmobile/pulsetesting
Code Cleanup and Testing
2022-06-09 20:02:30 -04:00
lwvmobile
357f59b290 Minor Code Tweaks
Minor Code Tweaks
2022-06-09 16:58:45 -04:00
lwvmobile
cbd3d98151 More Code Testing and Cleanup
More Code Testing and Cleanup
--disable some debug printouts
2022-06-08 22:42:06 -04:00
lwvmobile
5a39fe65db Code Cleanup and Testing
Code Cleanup and Testing
--Minor Tweaks and Clean Up
2022-06-07 23:01:52 -04:00
lwvmobile
37c61aa5cb Merge pull request #63 from lwvmobile/pulsecleaning
Code Cleanup and Tweaks
2022-05-30 17:10:26 -04:00
lwvmobile
74d08ffaa6 Update README.md
Add link to RR Forum Main Post about DSD-FME
2022-05-30 17:09:32 -04:00
lwvmobile
171f372a4a Really Fix Compiler Warning
Change the correct X to llX this time
2022-05-30 03:35:42 -04:00
lwvmobile
3924c70386 Fix Compiler Warning
the usual %X to %llX warnings I forget to deal with
2022-05-30 03:32:37 -04:00
lwvmobile
656d7b2add Disable VC6 sync print
Disable VC6 sync print
2022-05-30 03:24:19 -04:00
lwvmobile
66ec027bd2 Code Cleanup and Tweaks
Code Cleanup and Tweaks
--properly accredit LFSR
--change name from LSFR to LFSR (oops)
--minor code tweaks and OCD Spacing
2022-05-30 03:19:21 -04:00
lwvmobile
6ad98fbf69 Merge pull request #62 from lwvmobile/dmrstereopatch
DMR Stereo Patches
2022-05-20 14:43:32 -04:00
lwvmobile
9b4e790095 Update Readme
Update Readme to reflect change in usage 
-- no more '-d ./MBE/' required unless user wants to save MBE files as well.
-- other small clarifications and updates
2022-05-20 14:36:47 -04:00
lwvmobile
e69451b0d7 Seperate MBE Payload Printing from MBE Saving
Seperate MBE Payload Printing from MBE Saving
--seperate the MBE Payload Printing functions from MBE Saving Function
--no longer need to use -d ./MBE/ to print a MBE Payload
--is currently using -Z for payload printing, may further seperate, make new user switch in future
2022-05-19 22:16:44 -04:00
lwvmobile
1d30d5ec32 Fix Uninitialized Values
audio_in_type and audio_out_type were not initialized
--this caused issues with Raspberry Pi OS 64-bit, presumably others as well by not opening the audio output stream.
2022-05-19 20:05:39 -04:00
lwvmobile
710e76d0ab Stupid Compiler Fix
Stupid Compiler Fix
2022-05-19 17:38:39 -04:00
lwvmobile
994e728bfb DMR Stereo Payload Printing
DMR Stereo Payload Printing
--new method to print voice payloads
--dump DMR Stereo payloads without needing to use -d ./MBE/
--rework how DMR Stereo voice is handled and add extra features to it
--general code cleanup
2022-05-19 17:26:45 -04:00
lwvmobile
2fd250b357 Merge pull request #61 from lwvmobile/lwvmobile-dmrstereo-patch
DMR Stereo Inversion Handling
2022-05-14 09:14:53 -04:00
lwvmobile
ed68f41f0e Revert STDIN Audio Output
Revert STDIN Audio Output
--Revert back to 8K/1 for normal due to occasional crackling that resulted from upscaling audio to 48k when using stdin, mbe, and rtl.
--Still need to investigate the root cause of this issue.
2022-05-13 16:22:35 -04:00
lwvmobile
16e84ae104 Fix Segfault on MBE Payload directory not existing
Fix Segfault on MBE Payload directory not existing
--code will check for existence of save directory, and create it if needed to prevent a segfault.
--other minor tweak to DMR slots
2022-05-13 13:18:44 -04:00
lwvmobile
4f1ecda2ad Forgot Something
Forgot Something
--I don't even remember now
2022-05-12 22:03:09 -04:00
lwvmobile
685c8aebe4 Fix Slot0/2 Thing
Fix Slot0/2 Thing
2022-05-12 21:38:55 -04:00
lwvmobile
6de3e6c9f3 DMR Remove SLOTS from MS Mode
DMR Remove SLOTS from MS Mode
--other little tweaks/inversion tweaks
2022-05-12 21:31:26 -04:00
lwvmobile
a848f9c0fe More DMR Inversion fixes
More DMR Inversion fixes
--fix some issues regarding when to invert dibits
---still have random issue of frame syncing to voice type instead of data type immediately after voice ends in TDMA stereo when inverted, guessing the dibit buffer is storing non-inverted dibits causing this?
--code will need a round of cleanup once fully tested and going good inverted
2022-05-12 16:54:45 -04:00
lwvmobile
7d6c3dc67c DMR Stereo Inversion Handling
DMR Stereo Inversion Handling
--Fix frame sync not forwarding inverted signal to DMR Stereo methods
--Other Misc Bug Fixes
2022-05-12 11:25:41 -04:00
lwvmobile
2263ddae63 Merge pull request #59 from lwvmobile/dmrstereo
DMR Stereo TDMA
2022-05-07 08:15:13 -04:00
lwvmobile
f8b9d47c6d Minor Framesync Print with DMR
Minor Framesync Print with DMR
--Minor Framesync Print Fix for DMR
2022-05-06 11:48:37 -04:00
lwvmobile
064cc21b2b Update README.md
Clarification/Cleanup/Spelling/Grammar
2022-05-05 15:46:01 -04:00
lwvmobile
56da871ce2 Update README.md
Update Readme to include information for DMR Stereo, new screenshots, and other updates.
2022-05-05 13:28:53 -04:00
lwvmobile
ddc2a52a33 Update Screenshots
Update Screenshots
2022-05-05 13:06:15 -04:00
lwvmobile
ec9c220ad7 Fix Upsampling Bug
Fix Upsampling Bug
--Change logic to only upsample audio when out sample rate is greater than 8k.
--Revert RTL and MBE output sample rate to 8k/1 due to random crackling
--RTL will still shift to 24k/2 for DMR TDMA stereo, may produce noticeable crackling, unknown as of now, unable to test.
2022-05-04 10:28:35 -04:00
lwvmobile
02a27111d3 Fix Upsampling
Fix Upsampling
--upsample audio on all input types to the proper output rate required for mono and stereo output.
--Allows for 48000/1 or 24000/2 output when using RTL or STDIN input
--MBE file playback still at 8000 due to random crackling when upscaled
--WAV file still recorded at 8000 mono
--MBE file saving and WAV saving disabled when using the -T Stereo TDMA option until both can be reworked.
2022-05-03 15:48:15 -04:00
lwvmobile
4c3a3e0959 Reconfigure STDIN and RTL for TDMA Stereo
Reconfigure STDIN and RTL for TDMA Stereo
--adjust configurations and rates to allow two channel audio output when using -T option with RTL and STDIN
--minor LRRP print mistake
2022-05-03 13:49:44 -04:00
lwvmobile
ea40e3e3b7 More NCurses Tweaks
More NCurses Tweaks
--Clarify extra call and data information lines
--Add Data SRC and TGT to NCurses for LRRP and other things
--OCD nitpicks
2022-05-03 07:54:45 -04:00
lwvmobile
ab873d3821 NCurses Updates
Update NCurses to work with DMR BS TDMA Stereo, DMR MS, dPMR, D-STAR
--reorganize the code and clean up the mess
Minor Tweaks and Code Cleanup
2022-05-03 06:54:08 -04:00
lwvmobile
3cd1eefad8 DMR Stereo TDMA
DMR Stereo TDMA
--play voice in both TDMA slots with the -T option (dsd -fr -T)
--Improved MS voice (mostly working) and data handling (hit or miss)
--pretty pretty colors on the console log output
--rate 3/4 data decoding partially working
2022-04-30 04:43:03 -04:00
lwvmobile
8b48328431 Merge pull request #57 from lwvmobile/pulse-dpmr
dPMR Smooth Sync and Playback
2022-04-08 20:49:12 -04:00
lwvmobile
2c842f5115 ncurses tweak take 2
ncurses tweak take 2
2022-04-08 20:38:32 -04:00
lwvmobile
4ad5a8f9dd revert ncurses tweak (again)
revert ncurses tweak (again)
2022-04-08 20:22:00 -04:00
lwvmobile
33cbad7618 ncurses tweak
ncurses tweak
2022-04-08 20:12:06 -04:00
lwvmobile
504ee431b5 Update dmr_process_voice.c 2022-04-08 19:59:05 -04:00
lwvmobile
53fca195ba Delete trellis.h 2022-04-08 16:27:05 -04:00
lwvmobile
12dbd90509 dPMR Smooth Sync and Playback
dPMR Smooth Sync and Playback
--fix sync and playback issues with dPMR
General Code Cleanup
2022-04-08 16:22:08 -04:00
lwvmobile
2339cee016 Merge pull request #56 from lwvmobile/pulse-bug-fix
bug fixes
2022-04-04 16:43:40 -04:00
lwvmobile
4c44a47c61 ncurses bug fix 2
ncurses bug fix 2
2022-04-04 16:39:22 -04:00
lwvmobile
11d4b2b330 ncurses bugfix
ncurses bugfix
2022-04-04 16:32:53 -04:00
lwvmobile
cb57478fcc compiler warning fix
compiler warning fix
2022-04-04 16:27:07 -04:00
lwvmobile
672e5cbd44 bug fixes
bug fixes and tweaks
2022-04-04 16:12:19 -04:00
lwvmobile
c1eb511855 Merge pull request #53 from lwvmobile/pulse-raw2
Fix Raw Audio Monitoring
2022-04-03 06:21:25 -04:00
lwvmobile
2ccc27c03b Fix Minor Ncurses DMR Regression
Fix Minor Ncurses DMR Regression
2022-04-02 19:17:55 -04:00
lwvmobile
43c1c9823b Remove dmr_branding from ncurses printer
Remove dmr_branding from ncurses printer
--unreliable at the moment
2022-04-02 17:15:59 -04:00
lwvmobile
a3530c58a0 Last Second DMR Print Fix
Fix Voice Header Payload
2022-04-02 16:12:30 -04:00
lwvmobile
48ddba2ab8 Last Second NXDN Print Cleanup 2022-04-02 16:06:55 -04:00
lwvmobile
9b554dfd93 Additional NXDN STDERR Printing Cleanup 2022-04-02 15:58:21 -04:00
lwvmobile
edf465d03c More Code Cleanup 2022-04-02 15:38:01 -04:00
lwvmobile
e7a477dc88 Delete dmr_encryption.c 2022-04-02 14:28:12 -04:00
lwvmobile
7c461844ad Fix Raw Audio Monitoring
Fix Raw Audio Monitoring
--Still crashes Pulse Audio server on Ubuntu/Linux Mint
--PULSE_LATENCY_MSEC=1000 or high value mitigates problem for brief moment, but still crashes
---Issue with Latency, or maybe writing garbage values to pa_simple_write
General Code Cleanup
Tweak NCURSES Printer
Tweak STDERR Printouts
2022-04-02 14:24:47 -04:00
lwvmobile
ab29dd8e6a Merge pull request #48 from lwvmobile/DMR12
DMR 12 Rate Data LRRP
2022-03-26 07:28:02 -04:00
lwvmobile
800fc3101e Fix swapped inverted_dmr to inverted_dpmr
Fix swapped inverted_dmr to inverted_dpmr in the dmr_voice.c file.
-accidentally swapped inverted_dmr to inverted_dpmr while working on dPMR.
2022-03-26 00:10:49 -04:00
lwvmobile
13ec6855f8 DMR 12 Rate Updates
DMR 12 Rate Updates
Other Tweaks to P25 Printing
More experimenting with 34 Rate Trellis Code (busted)
2022-03-26 00:03:14 -04:00
lwvmobile
6a649376fc DMR 12
Fix Compiler Warnings
2022-03-24 08:31:30 -04:00
lwvmobile
1ee3dba499 DMR 12 Rate Data LRRP
DMR 12 Rate Data LRRP Decoding
2022-03-24 07:54:09 -04:00
lwvmobile
94487fd1c0 Merge pull request #47 from lwvmobile/pulsedmr
Staging for DMR Improvements
2022-03-13 21:12:34 -04:00
lwvmobile
4af78289b2 Last Minute NCURSES Tweak
Last Minute NCURSES Tweak
2022-03-13 20:44:48 -04:00
lwvmobile
5ee669aa18 Fix Compiler Warning, minor tweaks
Fix Compiler Warning, minor tweaks to NCurses view and information logging
2022-03-13 20:32:32 -04:00
lwvmobile
6afb0d718f Update Information for README
Update Information for README
2022-03-13 20:30:29 -04:00
lwvmobile
ea1f0bdf2f Update Screenshot
Update Screenshot
2022-03-13 19:49:13 -04:00
lwvmobile
184b8b6a39 Enable D-Star, Pulse Tweaks, NCurses Tweaks, Misc
Enable D-Star, Pulse Tweaks, NCurses Tweaks, Misc
2022-03-13 19:13:09 -04:00
lwvmobile
0fc9380b00 DMR PI Header, NCurses Tweaks, Fun Stuff
DMR PI Header, NCurses Tweaks, Fun Stuff
--Add PI Header handler, print DMR ALG, KEY, and MI values
--NCurses updates to reflect new DMR and NXDN info available
--Other Fun Stuff a.k.a. Stuff I might have broken or can't remember what I did now
2022-03-12 00:03:21 -05:00
lwvmobile
9f330e7902 NXDN Ncurses Improvements
NXDN Ncurses Improvements
-show TG, call types, alg, keys, etc on NXDN systems
2022-03-09 18:10:32 -05:00
lwvmobile
d756ab6574 DMR, dPMR, Pulse Audio Tinkering
DMR, dPMR, Pulse Audio Tinkering
2022-03-08 16:57:26 -05:00
lwvmobile
beb96f73db Fix MI to llX
Fix MI to llX
2022-03-06 22:48:44 -05:00
lwvmobile
f053e53e76 More DMR Staging, Fix MI to Hex in P25
More DMR Staging, Fix MI to Hex in P25
-switch back to 7 octets on AMB payloads
--will break compatibility with 6 octets
-Print MI values as Hex now, not as binary strings
2022-03-06 22:38:29 -05:00
lwvmobile
c994f00e5d Fix issue on amb file playback
Fix issue on amb file playback
-switching from 7 back to 6, otherwise older files may break when playing back 
-still needs testing on 6 to 6, and 7 to 6 reads
2022-03-06 18:42:50 -05:00
lwvmobile
5834914e91 Staging for DMR Improvements
Staging for DMR Improvements
2022-03-06 18:30:29 -05:00
lwvmobile
2b71652b23 Merge pull request #46 from lwvmobile/lwvmobile-patch-p
Tweak Ncurses; Tweak Modulations
2022-02-28 17:06:34 -05:00
lwvmobile
d44c050ca4 Tweak Ncurses; Tweak Modulations
Tweak Ncurses:
-update NXDN call log values; fix ran and initial rd value
Tweak Modulations:
-set correct modulation types for P25 and DMR systems
2022-02-28 16:51:17 -05:00
lwvmobile
1e9ea14a51 Merge pull request #43 from lwvmobile/lwvmobile-patch-1
More ALG,KEY,MI 'fixes'
2022-02-26 08:00:21 -05:00
lwvmobile
f6fdbfa922 More ALG,KEY,MI 'fixes'
Only assign and print when err == 0
2022-02-26 07:59:24 -05:00
lwvmobile
7a341fa1c9 Merge pull request #41 from lwvmobile/lwvmobile-patch-1
Fix Alg,Key,MI
2022-02-25 19:43:36 -05:00
lwvmobile
786f306eac Fix Alg,Key,MI
Wasn't always printing
2022-02-25 19:41:31 -05:00
lwvmobile
b61b77e773 Merge pull request #39 from lwvmobile/lwvmobile-patch-3
Fix to MBE filenames for IMBE types
2022-02-25 15:27:21 -05:00
lwvmobile
bba8579192 Fix to MBE filenames for IMBE types
Fix MBE filenames, no nac/tg on ProVoice type
2022-02-25 15:27:03 -05:00
lwvmobile
aca0adc4c5 Merge pull request #38 from lwvmobile/lwvmobile-patch-2
Append WAV Files
2022-02-25 15:17:27 -05:00
lwvmobile
b996d95b1c Append WAV Files
Append to WAV files as opposed to overwriting them each time
Minor Tweaks to NCURSES terminal in regards to NXDN, update call log on systems with RAN of 0
2022-02-25 15:09:06 -05:00
lwvmobile
71be900630 Merge pull request #37 from lwvmobile/lwvmobile-patch-1
MI Values
2022-02-25 08:34:00 -05:00
lwvmobile
5530d2ac9c MI Values
MI Values
2022-02-25 08:31:54 -05:00
lwvmobile
a64c4187e5 Merge pull request #36 from lwvmobile/lwvmobile-patch-1
P25P1 Information
2022-02-24 20:20:05 -05:00
lwvmobile
568a8521c0 Informational Print to Main
fprintf Unmute P25 Encrypted Audio
2022-02-24 20:19:11 -05:00
lwvmobile
ab186da2f3 P25P1 Information
P25P1 Information
-added fprintf and printw for algid, keyid, mfid, errs, etc
2022-02-24 20:05:32 -05:00
lwvmobile
11d72c39d3 Merge pull request #35 from lwvmobile/lwvmobile-patch-1
Tweaks to Instal Script and Readme
2022-02-22 18:37:06 -05:00
lwvmobile
8669f6c309 remove ITPP from auto building
users will need to manually build ITPP if they cannot download and install it from their repo.
2022-02-22 18:07:40 -05:00
lwvmobile
fdaeae1307 Update README.md 2022-02-22 18:03:50 -05:00
lwvmobile
010ff8cb60 Tweaks to Instal Script and Readme 2022-02-22 17:53:45 -05:00
lwvmobile
12c7379d2a Add ncurses example to readme
Add ncurses example to readme
2022-02-22 11:01:21 -05:00
lwvmobile
ae462d74a5 Update Screenshot 2
Update Screenshot 2
2022-02-22 10:54:21 -05:00
lwvmobile
aa2600cdc2 Update Screenshot
Update Screenshot
2022-02-22 10:53:23 -05:00
lwvmobile
69034b7c2f Update Screenshot
Update Screenshot
-show ncurses terminal
2022-02-22 10:24:12 -05:00
lwvmobile
49ea9f7f52 Merge pull request #33 from lwvmobile/lwvmobile-patch-1
Little Tweaks
2022-02-22 08:50:52 -05:00
lwvmobile
670e4e7bec Little Tweaks
Little Tweaks
2022-02-22 08:49:46 -05:00
lwvmobile
5b4d624bb2 Merge pull request #32 from lwvmobile/lwvmobile-patch-cmake
Lwvmobile patch cmake
2022-02-21 13:47:57 -05:00
lwvmobile
1a4440f1ab Add files via upload 2022-02-21 13:17:44 -05:00
lwvmobile
c917c61b85 Fix CMAKE set
Fix CMAKE set Curses to Ncurses, need wide true
2022-02-21 13:11:07 -05:00
lwvmobile
a239cd94fe Delete nxdn_voice.c.bkp3 2022-02-21 12:57:44 -05:00
lwvmobile
a6c83a7fbb Delete nxdn_data.c.bkp2 2022-02-21 12:57:36 -05:00
lwvmobile
c7e52ab4fe Delete nxdn_data.c.bkp 2022-02-21 12:57:28 -05:00
lwvmobile
df14508778 Delete dsd_frame.c.bkp 2022-02-21 12:57:20 -05:00
lwvmobile
178b76f092 Delete 222FindCURSES.cmake.old 2022-02-21 12:57:04 -05:00
lwvmobile
36fbbfd4d7 Delete FindCURSES.cmake.bkp 2022-02-21 12:56:57 -05:00
lwvmobile
d1903b1574 Delete FindCURSES.cmake 2022-02-21 12:56:48 -05:00
lwvmobile
fea03a0242 CMake Changes, NCURSES Tweaks
Remove NCurses FindCurses.cmake file, change lines in Cmakelists
Tweak and Fix a few NCurses Terminal tidbits
2022-02-21 12:55:20 -05:00
lwvmobile
2ed2dc36aa Minor Tweak
Add lines to instruct user to hit CTRL+C again on exit, and also to run reset in terminal to clean up any mess.
2022-02-20 17:03:47 -05:00
lwvmobile
2223183805 Fix CmakeLists.txt
Had to change PulseAudio back to PULSEAUDIO
Arch complains about it in all caps, but Mint refuses to build without it in all caps.
2022-02-20 16:50:04 -05:00
lwvmobile
25affc5b54 Merge pull request #31 from lwvmobile/ncursesandnxdn
NCurses and NXDN Updates
2022-02-20 16:31:04 -05:00
lwvmobile
ad13d06acc Delete nxdn_voice.c.bkp3 2022-02-20 16:25:18 -05:00
lwvmobile
291f9ed963 Delete nxdn_data.c.bkp2 2022-02-20 16:25:03 -05:00
lwvmobile
455a7a9329 Delete nxdn_data.c.bkp 2022-02-20 16:24:55 -05:00
lwvmobile
7e9eadaea5 Delete dsd_frame.c.bkp 2022-02-20 16:24:45 -05:00
lwvmobile
387f2253b1 More NCURSES Tweaking
More NCURSES Tweaking
-tweak array, seems to update smoother now, immediate
-more concise, cleaner names for sync types
-array updates on DMR, P25P1, NXDN, PV types only currenlty (no dstar etc yet)
More P25 resetState tweaking/testing
Other under the hood tweaking
2022-02-20 15:41:28 -05:00
lwvmobile
af401a7e5b More NCURSES tweaking
More NCURSES tweaking
resetState memory leak mitigation
2022-02-19 19:44:56 -05:00
lwvmobile
4404c1afed remove printw carrier
remove printw carrier
only had that in as a quick test, forgot to disable it
2022-02-19 10:47:52 -05:00
lwvmobile
417a48cc71 resetState and Minor Ncurses Printer tweak
resetState and Minor Ncurses Printer tweak
don't run with -n yet, resets state, using to test to fix when input type changes, but won't decode properly
2022-02-19 10:42:55 -05:00
lwvmobile
9acff308b9 OCD change
OCD change to how rtl info is presented in ncurses window
2022-02-19 06:35:39 -05:00
lwvmobile
48c9ae4b28 disable FM_banner
disable FM_banner on ncurses terminal, still can't figure out ncursesw support in cmake
2022-02-19 06:20:19 -05:00
lwvmobile
c3c4956ebb set(CURSES_NEED_WIDE TRUE)
set(CURSES_NEED_WIDE TRUE)
2022-02-19 06:13:07 -05:00
lwvmobile
9751eb165f set(CURSES_NEED_WIDE TRUE)
set(CURSES_NEED_WIDE TRUE)
2022-02-19 06:09:35 -05:00
lwvmobile
409321eb43 NCurses wide support and cmake
NCurses wide support and cmake
2022-02-19 05:55:13 -05:00
lwvmobile
6f2682d667 NCurses and NXDN Updates
NCurses Terminal in pretty good shape, good enough for testing
NXDN decodes RAN and RID now (from LEH)
2022-02-18 19:05:14 -05:00
lwvmobile
46196cf283 Merge pull request #30 from lwvmobile/lwvmobile-patch-nxdn-mod2
NXDN48/96 Modulation Fix
2022-02-15 11:04:50 -05:00
lwvmobile
80526be3ed NXDN48/96 Modulation Fix
Change NXDN to C4FM Modulation and change RF_mod type.
Not sure if it actually affects performance, but its the correct type.
Decoding relies more on samplesPerSymbol than anything.
2022-02-15 11:00:03 -05:00
lwvmobile
d26d45eb7e Merge pull request #28 from lwvmobile/lwvmobile-patch-stdin-fix
fix STDIN audio rates
2022-02-14 15:01:29 -05:00
lwvmobile
36f522922d fix STDIN audio rates
fix STDIN audio rates
made a boo boo with pulse audio rates tinkering, had to fix rates for STDIN so that decoded audio played out at the correct rate
2022-02-14 14:59:45 -05:00
lwvmobile
d70cab2499 Update README.md 2022-02-13 19:11:06 -05:00
lwvmobile
6583fbe8f7 OCD tweak
OCD tweak
2022-02-13 17:54:09 -05:00
lwvmobile
b3383cd543 Add Virtual Sink script
Add Virtual Sink script, making it even easier to get going
2022-02-13 17:53:05 -05:00
lwvmobile
9596301aee Merge pull request #26 from lwvmobile/lwvmobile-patch-readme
Lwvmobile patch readme
2022-02-13 17:49:10 -05:00
lwvmobile
fbbd4285f5 wget install.sh
wget isntall.sh, make it easy
2022-02-13 17:47:04 -05:00
lwvmobile
97bc736f86 Update README.md 2022-02-13 17:41:03 -05:00
lwvmobile
460b8999c3 Delete Screenshot_216.png 2022-02-13 17:39:09 -05:00
lwvmobile
88d7a59afe Delete Screenshot_214.png 2022-02-13 17:39:00 -05:00
lwvmobile
6be364c6ce New Screenshot with uniform name
New Screenshot with uniform name
Make new screenshots uploaded seemless
2022-02-13 17:38:47 -05:00
lwvmobile
3d83c0b06c Update README.md 2022-02-13 17:36:04 -05:00
lwvmobile
3b9185fc40 Update README.md 2022-02-13 17:34:43 -05:00
lwvmobile
5897131f05 Merge pull request #25 from lwvmobile/lwvmobile-patch-1
Fix Naughty Merge
2022-02-13 15:36:43 -05:00
lwvmobile
c7a83c8c51 Fix Naughty Merge
Fix Naughty Merge
Didn't know resolving issue on a test pull I wouldn't commit would change the file.
2022-02-13 15:36:06 -05:00
lwvmobile
0eda6f5cf1 Merge branch 'master' into pulseaudio 2022-02-13 14:38:47 -05:00
lwvmobile
718d049927 Merge pull request #23 from lwvmobile/lwvmobile-patch-under-the-hood
Add Github Build Version
2022-02-13 14:35:33 -05:00
lwvmobile
e0c2e740d2 Add Github Build Version
Add Github Build Version
Work on Pulse Audio System (Testing 2 Channel Stereo Output)
Work on NCurses Terminal (Still Work to Do)
Include install.sh and rebuild.sh scripts
2022-02-13 14:31:15 -05:00
lwvmobile
aab0208605 Merge pull request #22 from lwvmobile/lwvmobile-patch-1
Show Github Build Version
2022-02-12 16:23:13 -05:00
lwvmobile
d037d2e0ad quick link fix
quick link fix
2022-02-12 15:58:50 -05:00
lwvmobile
dd8e48789f Add hyperlink to bottom of banner
Add hyperlink to bottom of banner
2022-02-12 15:56:03 -05:00
lwvmobile
d37ccf2883 Show Github Build Version 2022-02-12 15:50:11 -05:00
lwvmobile
6fb16cbd95 Update README.md 2022-02-11 19:39:36 -05:00
lwvmobile
7a3e1a67da Merge branch 'master' into pulseaudio 2022-02-11 19:32:21 -05:00
lwvmobile
0f5c019d44 Merge pull request #21 from lwvmobile/lwvmobile-patch-ncurses-initial
Initial NCURSES Support
2022-02-11 19:29:56 -05:00
lwvmobile
9092259ce1 Initial NCURSES Support
Initial NCURSES Support

Its in there, and can be called with -N, but it doesn't display much yet aside from program name, mbelib, and time.
Just want to upload it so I can test it vs autobuild with cmake requiring ncurses libraries again
2022-02-11 19:25:05 -05:00
lwvmobile
079ed7e8cc Merge pull request #20 from lwvmobile/lwvmobile-patch-NXDN-bug-fix
NXDN Detection Bug
2022-02-11 18:44:13 -05:00
lwvmobile
3bb8a5608f NXDN Detection Bug
Had to fix line 644 with this
Had wrong detection type

else if ((strncmperr (synctest18, INV_NXDN_BS_VOICE_SYNC, 18, 1) == 0) || (strncmperr (synctest18, INV_NXDN_MS_VOICE_SYNC, 18, 1) == 0)) //supposed to be voice, not data?
2022-02-11 18:40:04 -05:00
lwvmobile
142fb0c60e Merge pull request #19 from lwvmobile/lwvmobile-patch-nxdn-inv-detection-fix
NXDN bug fix
2022-02-11 18:34:10 -05:00
lwvmobile
d088d09328 NXDN bug fix
Had to fix line 651 with correct detection type

else if ((strncmperr (synctest18, INV_NXDN_BS_VOICE_SYNC, 18, 1) == 0) || (strncmperr (synctest18, INV_NXDN_MS_VOICE_SYNC, 18, 1) == 0))
2022-02-11 18:32:28 -05:00
lwvmobile
baca1be1b3 Simple Quick Installer
Simple Quick Installer
Should work on any Ubuntu/Debian/Raspberry Pi OS/ based system.
2022-02-10 19:57:57 -05:00
lwvmobile
47c43f9c9c Update README.md 2022-02-10 19:30:05 -05:00
lwvmobile
b1dcbeb459 Update README.md 2022-02-10 19:14:33 -05:00
lwvmobile
ceb98222b6 Update README.md 2022-02-10 19:09:30 -05:00
lwvmobile
34338ce2b1 Update README.md 2022-02-10 18:02:39 -05:00
lwvmobile
3ef8c846c6 Merge pull request #18 from lwvmobile/lwvmobile-patch-1
Direct all prints to STDERR
2022-02-10 17:08:32 -05:00
lwvmobile
325bff80d0 Print to STDERR
Print to STDERR
Take 3
2022-02-10 17:04:47 -05:00
lwvmobile
fcf680a138 Direct all prints to STDERR
Direct all prints to STDERR
Take 2
2022-02-10 16:56:37 -05:00
lwvmobile
05b9e29724 Update README.md 2022-02-10 16:43:07 -05:00
lwvmobile
fcfe06e1b2 Update README.md 2022-02-08 19:22:39 -05:00
lwvmobile
7e4a537035 Forgot to upload this 2022-02-08 18:46:03 -05:00
lwvmobile
62bf2d91ca Add files via upload
try try again
2022-02-08 18:38:09 -05:00
lwvmobile
003b956d2c Merge pull request #16 from lwvmobile/lwvmobile-patch-pulse-stdin-etc
Fix STDIN, file playback, and WAV file creation
2022-02-08 18:37:33 -05:00
lwvmobile
c408a57198 Fix STDIN, file playback, and WAV file creation
Fix STDIN and file playback
set rate out to 8000 when calling for any of these methods
2022-02-08 18:35:56 -05:00
lwvmobile
9f0e0adee8 Delete dsd.h.bkp 2022-02-08 13:11:07 -05:00
lwvmobile
b23705b7b6 Delete dsd_audio.c.bkp 2022-02-08 13:10:45 -05:00
lwvmobile
eaec87ac44 Merge pull request #15 from lwvmobile/lwvmobile-patch-pulse1
More Pulse Audio Tinkering
2022-02-08 13:06:20 -05:00
lwvmobile
4f012390c0 More Pulse Audio Tinkering
More Pulse Audio Tinkering
Had to disable Monitor Source Input
(Was working in Arch, but with some latency/buffer issues, makes LM pulse server crash/restart?)
2022-02-08 13:04:29 -05:00
lwvmobile
d125d12132 Update README.md 2022-02-08 12:11:28 -05:00
lwvmobile
617b5d8072 Add files via upload 2022-02-08 12:08:43 -05:00
lwvmobile
4b81636947 Add pulseaudio stuff
add pulseaudio stuff
2022-02-08 00:46:49 -05:00
lwvmobile
4c8f0f3c50 Merge pull request #12 from lwvmobile/lwvmobile-patch-pulse
PulseAudio
2022-02-08 00:33:30 -05:00
lwvmobile
130afdc278 PulseAudio
Swap Pulse Audio in for all instance where OSS is used
Lots of other potentially things breaking
2022-02-08 00:26:14 -05:00
lwvmobile
a4aab9a56d Merge pull request #11 from lwvmobile/lwvmobile-patch-3
Fix Monitor Source Audio Issue
2022-02-05 14:42:56 -05:00
lwvmobile
2b8ce4b248 Fix Monitor Source Audio Issue
Fix Monitor Source Audio Issue
Forgot to add 'now' variable to all sync types, would attempt to play source audio and decoded audio at same time on most types.
2022-02-05 14:37:27 -05:00
lwvmobile
be165c8c77 Update README.md 2022-02-05 13:49:35 -05:00
lwvmobile
46fa8b5c60 Update README.md 2022-02-05 13:45:31 -05:00
lwvmobile
628b9c30c2 Add files via upload 2022-02-05 13:45:17 -05:00
lwvmobile
13a453193a Update README.md 2022-02-05 13:38:37 -05:00
lwvmobile
b58b2b578a Merge pull request #10 from lwvmobile/lwvmobile-patch-2
Add RTL VFO bandwidth options
2022-02-05 13:36:05 -05:00
lwvmobile
b66cac75d2 Add RTL VFO bandwidth options
Add RTL VFO bandwidth options
-Y 8 for 8 kHz VFO
-Y 24 for 24 kHz VFO

Should work at any interval where 48 cleanly divides by a number
2022-02-05 13:30:44 -05:00
lwvmobile
6573521363 Update README.md 2022-02-05 13:27:48 -05:00
lwvmobile
f5ed83289f Update README.md 2022-02-05 13:26:45 -05:00
lwvmobile
2859ad3927 Update README.md 2022-02-05 11:07:07 -05:00
lwvmobile
aaa8e5c3f1 Update README.md 2022-02-05 10:41:29 -05:00
lwvmobile
f6673b6f59 Update README.md 2022-02-05 10:39:58 -05:00
lwvmobile
f3dac806a8 Update README.md 2022-02-05 10:31:46 -05:00
lwvmobile
92db25f56d Add Screenshot
Add Screenshot for README
2022-02-05 10:28:05 -05:00
lwvmobile
4e60c61eb0 Update README.md 2022-02-05 10:22:19 -05:00
lwvmobile
fd9f9126d7 Merge pull request #9 from lwvmobile/lwvmobile-patch-1
Remove NXDN from -fa option
2022-02-05 09:54:02 -05:00
lwvmobile
7e6b3adf9d Remove NXDN from -fa option
Removed NXDN from -fa option so it doesn't cause a bunch of random false positives
Clean up a few little things, hopefully nothing too major.
2022-02-05 09:44:26 -05:00
lwvmobile
e0bddd6699 Merge pull request #8 from lwvmobile/lwvmobile-patch-1
Source Audio Monitoring (WIP)
2022-02-04 18:16:08 -05:00
lwvmobile
d98040895d Source Audio Monitoring (WIP)
Add Source Audio Monitoring - But its a Work in Progress
Seriously, though, depending on which setting you have on, it sounds terrible.

Also, make ncurses no longer a requirement for the time being. Still want to work that into this version eventually.
2022-02-04 18:01:33 -05:00
lwvmobile
5a8b6f1d4a Update README.md 2022-02-01 22:38:43 -05:00
lwvmobile
4ca81a5dc2 Merge pull request #7 from lwvmobile/lwvmobile-patch-1
Add RTL option -U to specify udp port
2022-02-01 22:30:56 -05:00
lwvmobile
7222e71c08 Fix example usage to include all current options 2022-02-01 22:29:49 -05:00
lwvmobile
cb9e6c632c Add RTL option -U to specify udp port
Add RTL option -U to specify udp port for remote control
2022-02-01 22:23:49 -05:00
lwvmobile
005d356859 Merge pull request #6 from lwvmobile/lwvmobile-patch-1
Added a few more RTL options
2022-02-01 21:41:01 -05:00
lwvmobile
7a94be9292 Added a few more RTL options
Added RTL options for Squelch (-L) and Sample 'Volume' Multiplier -V
Hopefully, I didn't break anything else in the process
2022-02-01 21:37:09 -05:00
lwvmobile
9ae874449f Merge pull request #4 from lwvmobile/lwvmobile-patch-1
NXDN48 Voice Decoding is Good Now
2022-02-01 00:03:39 -05:00
lwvmobile
1e95db0977 NXDN48 Voice Decoding is Good Now
NXDN48 Voice Decoding is Good Now

Just use squelch if using SDR++ or GQRX to feed it. RTL-SDR input mode and NXDN still makes tons of false positives, and doesn't work well at all. May just be a bad signal issue but still think the RTLSDR input uses wrong center freq/tuned freq/"optimizations", need to get back to that some time, maybe also implement squelch settings on rtl_fm mode.

Thanks to LouisErigHerve for his 'Improved NXDN Detection' update on his version, implemented it and works SO MUCH BETTER!

May still disable the if ((state->lastsynctype == 9) || (state->lastsynctype == 17)) condition in dsd_frame_sync.c if I think it leads to more consistent decoding vs false positives. USE SQUELCH!
2022-01-31 23:54:14 -05:00
lwvmobile
93ccc668d7 add quick usage example 2022-01-29 22:57:21 -05:00
lwvmobile
defa6455d6 Update README.md 2022-01-29 22:43:54 -05:00
lwvmobile
7c5fef56e9 Merge pull request #2 from lwvmobile/rtl-sdr
Attempt to make the rtl-sdr branch the main branch
2022-01-29 22:42:00 -05:00
lwvmobile
6ed5e0bcab fix things so stupid checker will pass 2022-01-29 22:34:05 -05:00
lwvmobile
31157b72ab Update codeql-analysis.yml
add libncurses5 and libncurses5-dev
2022-01-29 22:30:54 -05:00
lwvmobile
0cb68d7c53 Merge branch 'master' into rtl-sdr 2022-01-29 22:25:38 -05:00
lwvmobile
b67a3bb6de Update README.md 2022-01-29 22:17:19 -05:00
lwvmobile
d0086a5f96 Update README.md
Add warnings to README file
2022-01-29 22:11:28 -05:00
lwvmobile
2b84518caf Merge pull request #1 from lwvmobile/lwvmobile-patch-1
Add More RTL Options, UDP Remote
2022-01-29 22:06:49 -05:00
lwvmobile
60593dcce9 Clean up some naughty language
Clean up some naughty language
2022-01-29 22:05:15 -05:00
lwvmobile
fad831d1aa Delete FindNCURSES.cmake
Didn't mean to include this file
2022-01-29 22:03:42 -05:00
lwvmobile
3c11d72652 Delete old ASCII art
Delete old ASCII art and printer
2022-01-29 21:59:55 -05:00
lwvmobile
97a17df9d1 Delete todolist
Didn't mean to upload the todolist
2022-01-29 21:58:03 -05:00
lwvmobile
2523383b14 Add More RTL Options, UDP Remote
Add Gain and Device Index Number for RTL, add UDP remote to control frequency and squelch of RTL. Other Random things.
2022-01-29 21:53:35 -05:00
Jared Szechy
a50f3b714f Install deps 2021-12-13 16:38:44 -05:00
Jared Szechy
df3f58b05e Create codeql-analysis.yml 2021-12-13 16:31:03 -05:00
Yinette Hodge
2debc3e5f1 Fixing multiple definitions of exitflag (szechyjs#104) (#105)
Thanks to N0YKG for the fix! I am just making the PR :)
2021-10-21 13:47:46 -04:00
Jared Szechy
f383d165fd Add ppm_error option 2021-01-21 23:14:04 -05:00
Jared Szechy
5324d53c47 Add center freq cli opt 2021-01-17 19:37:00 -05:00
Jared Szechy
f0f067510f Require threads 2021-01-16 22:53:08 -05:00
Jared Szechy
2bdcc9cc65 Update deps 2021-01-16 22:33:27 -05:00
Jared Szechy
0b0754c1d5 It works 2021-01-16 21:43:23 -05:00
Jared Szechy
502607a608 Start on rtlsdr 2021-01-16 18:29:20 -05:00
ra1nb0w
290a2204ba cmake: fix portaudio linking issue (#103) 2020-12-22 16:38:51 -05:00
Jared Szechy
f175834e45 Update travis 2018-07-01 10:07:39 -04:00
Jared Szechy
98f9e36291 Cleanup cmake find modules 2018-07-01 09:55:06 -04:00
Jared Szechy
5f8aedb864 Don't use default tar-ignore, we need the .git dir for version 2018-06-29 00:02:54 -04:00
Jared Szechy
b674f277d9 Remove samples submodule 2018-06-28 23:33:16 -04:00
Jared Szechy
386cf93eb1 Add debian packaging 2018-06-28 23:03:12 -04:00
Jared Szechy
7ee04e58c5 Use the new travis containers 2015-08-06 12:54:09 -04:00
Jared Szechy
9eaaa323fe More cleanup 2015-08-06 12:34:56 -04:00
Jared Szechy
6605925162 Some much needed organization 2015-08-06 12:25:30 -04:00
Jared Szechy
6fbda52998 Update CONTRIBUTING.md 2015-08-06 11:44:38 -04:00
Jared Szechy
8e60a7b6a8 Add contributing file 2015-08-06 11:43:44 -04:00
Jared Szechy
e18cbf730e Fix link 2015-08-06 11:31:14 -04:00
Jared Szechy
8db618f83d Tweaks to README 2015-08-06 11:29:36 -04:00
Jared Szechy
60807e09ab Merge pull request #48 from dreinhold/master
Fixed 12.5KHz NXDN poor performance due to the 6.25KHz filter being used...
2014-10-08 14:52:46 -04:00
LinuxSheeple-E
c55f8b71fd Fixed 12.5KHz NXDN poor performance due to the 6.25KHz filter being used. 2014-10-05 19:12:35 -07:00
Jared Szechy
cc1fb3b33c Merge pull request #45 from midnightmagic/libsndfile_help_output
-h now lists the new '-' option (woops)
2014-09-14 21:10:32 -04:00
midnightmagic
cfcbf6a8da -h now lists the new '-' option (woops) 2014-09-14 14:15:53 -07:00
Jared Szechy
dd5c11acb3 Merge pull request #44 from midnightmagic/libsndfile_stdin_pipe_support
libsndfile can be used to open a UNIX-style pipe
2014-09-14 17:02:07 -04:00
midnightmagic
fd998e2bf7 libsndfile can be used to open a UNIX-style pipe on many platforms
In specific, it can be used to read in data almost directly from Gqrx
Currently, this will not function correctly using -i /dev/stdin on OS X
because stdin is not seekable, and it is not actually a file; also, for
ongoing raw data, there are no hints for libsndfile to identify the
sample.

So, we can use the UNIX-y '-' to do libsndfile-approved fd handle open.

Tested with the dsd-samples wav after converting it to correct sampletype
(stereo) -> sox p25_raw_unencrypted_edf.wav -c 2 ~/gqrx_last_recorded_filename.wav
.. and then pressing 'play' in the Gqrx interface while running:

socat udp-listen:7355 - | dsd -i - -o pa:2

.. in the background. And it decoded it nicely as many times as I played it,
which was 5 or 10.
2014-09-11 03:32:22 -07:00
Jared Szechy
6a9aa076b8 Add option to display available portaudio devices. 2014-07-07 20:21:39 -04:00
Jared Szechy
45eb53f245 Merge pull request #38 from jpwichern/master
Portaudio support
2014-06-09 15:50:52 -04:00
Jiri Wichern
74fa117850 Tweaking the delay a bit... 0,050 s for output seems too little; it results in choppy audio and ultimately, a heap of errors. 0,100 seems ok for the output buffer. But the input buffer needs to be much larger else it overflows. Also, an extra stop stream before terminating to make sure all audio from the audio buffer is played. 2014-06-07 20:49:35 +02:00
jpwichern
5dd236ec96 Update dsd_audio.c
Small oops
2014-06-06 17:26:50 +02:00
jpwichern
55b190ef49 Update dsd.h, dsd_audio.c, dsd_main.c and dsd_symbol.c
Adding portaudio support. Implementing it as a new audio_..._type in dsd.h.

Update CMakeLists.txt and create FindLibPortAudio.cmake

CMake portaudio check
2014-06-05 21:54:38 +02:00
Jared Szechy
df3c0dcab4 Merge pull request #36 from robotastic/master
Fixes a crash if an irrecoverable error happens
2014-05-27 19:19:36 -04:00
robotastic
d077cd8316 Fixes a crash if an irrecoverable error happens
If an irrecoverable error happens, you should start a new sequence
since the previous dibit was not set
2014-05-26 22:30:45 -04:00
Jared Szechy
05caba143b Merge pull request #35 from dreinhold/master
Allow the mbe file move to work in windows based systems.
2014-05-26 17:56:39 -04:00
Dylan Reinhold
f2767707ef Allow the mbe file move to work in windows based systems. 2014-05-26 10:37:15 -07:00
Jared Szechy
4e338dede9 Fixed file output directory.
- This fix is very minimal, as a result output directory arguments
    must have a trailing slash.

Fixes #34
2014-05-26 12:38:07 -04:00
Jared Szechy
f207eba8f9 Use svg travis-ci badge 2014-05-15 22:06:41 -04:00
Jared Szechy
3e9dc91e81 Merge pull request #30 from EdFuentetaja/master
P25 "heuristiscs" module
2014-05-10 21:28:18 -04:00
Jared Szechy
c39b0e6e43 Add travis-ci badge to README 2014-05-10 21:10:47 -04:00
Jared Szechy
a9995c695a Add sudo to install 2014-05-10 21:07:00 -04:00
Jared Szechy
f062fe0ef3 Forgot directory on cmakes 2014-05-10 21:04:57 -04:00
Jared Szechy
5f30a6aad6 Make travis_deps.sh executable 2014-05-10 21:03:04 -04:00
Jared Szechy
e0c574c470 Fix package names 2014-05-10 21:01:31 -04:00
Jared Szechy
68c471d639 First cut at enabling travis-ci 2014-05-10 20:55:31 -04:00
EdFuentetaja
1c05c6da6e Merge branch 'master' of https://github.com/EdFuentetaja/dsd.git 2014-05-11 08:43:54 +08:00
EdFuentetaja
8f61ac63a3 Minor fix in comments. 2014-05-11 08:43:06 +08:00
EdFuentetaja
840dbac8b0 Minor fix in comments. 2014-05-11 08:34:40 +08:00
EdFuentetaja
a0c7d16905 Merge branch 'master' of https://github.com/szechyjs/dsd.git
Conflicts:
	dsd.h
	test/reedsolomon-test.cpp
2014-05-11 08:21:20 +08:00
EdFuentetaja
9655ab0bd7 Merge branch 'master' of https://github.com/EdFuentetaja/dsd.git 2014-05-11 08:16:37 +08:00
EdFuentetaja
9e6b3b7978 Included error correction on P25 TDULC.
Added a new "heuristics" module for P25 that improves the estimation of the symbol (dibit) that corresponds to a given analog signal value.
Added a BER (bit error reate) estimation for P25.
2014-05-11 08:14:29 +08:00
EdFuentetaja
d8181ec79e Fixed some compilation warnings and added a few comments. 2014-05-11 08:14:29 +08:00
EdFuentetaja
f8cd8d715f Added error correction to the metadata of LDU1 and LDU2.
Refactored implementation of p25p1_ldu1.c and p25p1_ldu2.c. There are less duplicities now and hopefully is easier to read and maintain.
Added a unit test for the Hamming algorithm.
2014-05-11 08:14:28 +08:00
Jared Szechy
20c55d073b Update samples 2014-05-11 08:14:28 +08:00
Jared Szechy
1e854adb84 Use gtest for golay24 and reed-solomon tests 2014-05-11 08:14:27 +08:00
Jared Szechy
6ab62d006a Add itpp as a requirement in readme 2014-05-11 08:14:27 +08:00
EdFuentetaja
9d0fe07931 Included error correction on P25 TDULC.
Added a new "heuristics" module for P25 that improves the estimation of the symbol (dibit) that corresponds to a given analog signal value.
Added a BER (bit error reate) estimation for P25.
2014-05-11 02:23:24 +08:00
EdFuentetaja
b45e563e54 Fixed some compilation warnings and added a few comments. 2014-05-06 23:57:15 +08:00
Jared Szechy
ad0c849dc4 Merge pull request #26 from waffle-iron/master
waffle.io Badge
2014-04-26 10:59:00 -04:00
Making GitHub Delicious.
3229737e6c add waffle.io badge 2014-04-26 08:57:22 -06:00
Jared Szechy
596451eba0 Fix compile errors from #23 2014-04-22 19:46:01 -04:00
Jared Szechy
c23ff4fe0c Merge pull request #23 from EdFuentetaja/master
Error correction on the metadata fields of P25 LDU1 and LDU2
2014-04-22 19:23:07 -04:00
Jared Szechy
134f2e8e21 Move bulk of README to the Wiki 2014-04-22 19:21:43 -04:00
EdFuentetaja
01a2b6959a Added error correction to the metadata of LDU1 and LDU2.
Refactored implementation of p25p1_ldu1.c and p25p1_ldu2.c. There are less duplicities now and hopefully is easier to read and maintain.
Added a unit test for the Hamming algorithm.
2014-03-31 23:37:08 +08:00
EdFuentetaja
7299b78c3b Merge branch 'master' of https://github.com/szechyjs/dsd.git 2014-03-31 21:31:30 +08:00
EdFuentetaja
9b35ef5c83 Added a few comments, fixed ortography and some other cosmetic changes. 2014-03-31 21:31:00 +08:00
Jared Szechy
75972cb024 Update samples 2014-03-12 01:26:16 -04:00
Jared Szechy
461031d3f1 Use gtest for golay24 and reed-solomon tests 2014-03-11 22:29:15 -04:00
Jared Szechy
772eb7f810 Merge pull request #22 from EdFuentetaja/master
Added support for error correction in P25 HDU data.
2014-03-11 21:34:25 -04:00
EdFuentetaja
3f4ff87078 Added support for error correction in P25 HDU data.
Both Golay(24,12,8) and Reed-Solomon(63,47,17) are now implemented.
2014-03-11 22:41:59 +08:00
Jared Szechy
1553973718 Add itpp as a requirement in readme 2014-03-01 18:13:47 -05:00
Jared Szechy
95c3d8fd27 Merge pull request #20 from EdFuentetaja/master
Added decoding and error correction on the NID fields: NAC and DUID.
2014-03-01 15:01:24 -05:00
EdFuentetaja
d7b36f32c0 Parity errors in NIC are now ignored.
Clean up the code to make it easier to understand. Now the logic to error correct the NIC makes more sense.
2014-03-01 20:35:46 +08:00
EdFuentetaja
9b9cb78ddf Added decoding and error correction on the NID fields: NAC and DUID. Making use of the IT++ library for BCH encoding/decoding. 2014-02-02 14:45:19 +08:00
Jared Szechy
e40e89ae81 Merge pull request #15 from dreinhold/add_git_sha_version
Add git tag / SHA1 as a build string
2013-12-19 10:09:02 -08:00
Dylan Reinhold
2f6214fe72 Add git tag / SHA1 as a build string
Every build from commit 20271c6 (Apr 10 2013) is versioned as 1.6.0.
Add a build version after the version number
Digital Speech Decoder 1.6.0 (build:v1.6.0-20-g16110bd)

The build string uses git describe to list the tag closest to head,
and the number of commits past that tag, the a litteral g and ending
with the current SHA1
2013-12-19 08:49:49 -08:00
Jared Szechy
271a7e459a Change current work to v1.7.0-dev 2013-12-19 10:11:38 -05:00
Jared Szechy
e3dde6f7f9 Merge commit '20271c6df57dacbaed3f2255a8230f44f58bd3ae'
Apparently when 1.6.0 was release it was not properly merged. This re-add the disable p25 encryption muting flag.

Conflicts:
	README
	dsd.h
	dsd_main.c
	dsd_symbol.c
	p25p1_ldu1.c
	p25p1_ldu2.c
2013-12-19 09:57:23 -05:00
Jared Szechy
16110bd251 Update README 2013-12-18 16:38:26 -05:00
Jared Szechy
945f93d678 Add samples as a subrepo 2013-12-18 15:58:06 -05:00
Jared Szechy
2630e98128 Remove samples dir, will replace with a submodule for those that want to use it 2013-12-18 15:50:14 -05:00
Jared Szechy
855fdd64e8 Add missing -r option from help command. Also add cmake a s a requirement in the README. 2013-12-18 15:10:15 -05:00
Jared Szechy
158ae7c520 Update README 2013-12-17 03:05:10 -05:00
Jared Szechy
7bd0a10c65 Change CMake to properly locate required libraries 2013-12-17 02:04:22 -05:00
Jared Szechy
e0376bc009 Add samples directory 2013-12-17 01:22:43 -05:00
Jared Szechy
25765ef4d0 Merge pull request #9 from balr0g/filtering-fixes
Filtering fixes
2013-12-16 19:19:22 -08:00
Jared Szechy
9965f8a36d Merge pull request #8 from balr0g/readme-fixes
Updated README for dstar
2013-12-16 19:18:10 -08:00
balr0g
4763717b59 Improvements to CLI input parsing and filtering 2013-12-16 14:50:20 -05:00
balr0g
8c8dea4142 Updated README 2013-12-16 13:04:44 -05:00
Jared Szechy
ac816f9207 Merge pull request #7 from balr0g/dstar
Initial DSTAR AMBE voice decoding support
2013-12-16 10:01:26 -08:00
balr0g
040ea148b0 Initial working DSTAR voice support 2013-12-16 13:00:18 -05:00
Jared Szechy
27960ae4be Merge pull request #6 from balr0g/libsndfile-support
Support for wav input/output using libsndfile
2013-12-16 09:54:14 -08:00
Jared Szechy
5fb79e9baa Merge pull request #5 from balr0g/dmr-ambe+2-rename
Fixes for ambe3600x2250 -> ambe3600x2450 rename
2013-12-15 13:55:19 -08:00
balr0g
de3e5e7f60 Use libsndfile for wav output as well 2013-12-12 20:09:08 -05:00
balr0g
e3bafe96e9 Use libsndfile for wav file input 2013-12-12 19:50:07 -05:00
balr0g
f978a8759e Fixes for ambe3600x2250 -> ambe3600x2450 rename 2013-12-12 09:58:08 -05:00
Jared Szechy
260ec82ea1 Merge pull request #1 from balr0g/cmake-build-fixes
Convert build system to use cmake and fix for Mac OS X build
2013-07-26 10:07:48 -07:00
balr0g
e40c32d8ad Convert build system to use cmake and fix for Mac OS X build 2013-07-07 17:55:42 -04:00
Alex Mirea
5d147c9f04 version 1.6.0
See
http://forums.radioreference.com/digital-voice-decoding-software/256111-
dsd-1-6-closed-fork-open-source.html#post1884783
2013-06-19 18:39:48 -04:00
Jared Szechy
3683f6c631 Fix linking of mbe 2013-06-19 18:30:53 -04:00
Alex Mirea
20271c6df5 new options to control filters and P25 encrypted signals
I have added the -l and -pu options.
2013-04-10 09:05:56 +03:00
Alex Mirea
fa73feded2 version 1.6.0
See
http://forums.radioreference.com/digital-voice-decoding-software/256111-
dsd-1-6-closed-fork-open-source.html#post1884783
2013-04-09 22:50:45 +03:00
Jared Szechy
46b9b01baf add ignore file 2011-08-21 04:01:34 -04:00
Jared Szechy
b1024fba95 version 1.4.1 2011-08-21 03:36:53 -04:00
215 changed files with 90015 additions and 7108 deletions

12
.gitignore vendored Normal file
View File

@@ -0,0 +1,12 @@
*.[ao]
*.so*
*.dylib
build
*.sh
*.csv
examples
*.bin
*.ans
*.patch
*.zip
result

View File

@@ -1,37 +0,0 @@
1.3 New features:
Decodes voice from ProVoice signals (requires -fp option)
algid and kid are now shown in hex notation
Fixed bugs:
auto output gain now has faster rise time
MoTDMA is now correctly labeled X2-TDMA
1.2 New features:
Decodes voice for DMR standard (including MOTOTRBO)
Full metadata (src, talkgroup, lcinfo, mfid, lcformat, mi, algid, keyid) for X2-TDMA
TDMA slot identification for X2-TDMA/DMR/MOTOTRBO
Identifies non-voice frame types for X2-TDMA/DMR/MOTOTRBO
Frame only (no voice yet) support for 9600 baud NXDN
Auto leveling audio output gain (default) and -g option for fixed gain
GFSK modulation optimizations and improved C4FM/GFSK/QPSK auto detect
Fixed bugs:
nac was showing wrong ID
p25 metadata (lcinfo, mfid, lfcormat, mi, keyid, algid, lsd) are now
printed out in the correct bit order (MSB -> LSB), was reversed.
fixed serveral bugs in dsd_upsample.c, with improved quality
1.1 New features:
Scanner control options to allow scan resume during certain TDULC
Improved upsampling function audio quality
Greatly improved handling of X2-TDMA frames
Much faster QPSK decision point tracking by default
Fixed bugs:
playMbeFiles was not output to .wav file when -w was given
Now correctly detects/handles Mot and P25 talkgroup formats
PDU frames were not detected
1.0.3 Fixed buggy C4FM/QPSK auto detection and added -A option to adjust it.
1.0 Initial release

177
CMakeLists.txt Normal file
View File

@@ -0,0 +1,177 @@
#Ubuntu 20.04 uses 3.16.3
#Ubuntu 22.04 uses 3.22.1
#Arch currently on 3.26.3
#Cygwin currently using 3.23.2 (or newer)
cmake_minimum_required(VERSION 3.10.2)
project(dsd-fme)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")
#Set curses to ncurses, and wide true for ascii
set(CURSES_NEED_NCURSES TRUE)
set(CURSES_NEED_WIDE TRUE)
#use cmake option -DCOLORS=OFF to disable color output (ncurses)
option(COLORS
"Build with Colors Enabled" ON)
if (COLORS)
add_definitions(-DPRETTY_COLORS)
endif ()
#use cmake option -DCOLORSLOGS=OFF to disable color output (terminal/logs)
option(COLORSLOGS
"Build with Colors Enabled" ON)
if (COLORSLOGS)
add_definitions(-DPRETTY_COLORS_LOGS)
endif ()
#use cmake option -DPVC=ON to enable Provoice Conventional Frame Sync
option(PVC
"Build with Provoice Conventional Frame Sync Enabled" OFF)
if (PVC)
add_definitions(-DPVCONVENTIONAL)
endif ()
#use cmake option -DLZ=ON to enable LimaZulu Requested NXDN Tweaks
option(LZ
"Build with new LimaZulu Requested NXDN Tweaks Enabled" OFF)
if (LZ)
add_definitions(-DLIMAZULUTWEAKS)
endif ()
#use cmake option -DASCII=ON to enable ASCII only Alias Support in NXDN
option(ASCII
"Build with ASCII only Alias Support in NXDN Enabled" ON)
if (ASCII)
add_definitions(-DASCII_DECODE)
endif ()
#use cmake option -DASCII=OFF -DBIG5=ON to enable ASCII and BIG5 Alias Support in NXDN
option(BIG5
"Build with BIG5 and ASCII Alias Support in NXDN Enabled" OFF)
if (BIG5)
add_definitions(-DBIG5_DECODE)
endif ()
#use cmake option -DASCII=OFF -DSJIS=ON to enable ASCII and SJIS Alias Support in NXDN
option(SJIS
"Build with SJIS and ASCII Alias Support in NXDN Enabled" OFF)
if (SJIS)
add_definitions(-DSJIS_DECODE)
endif ()
#use cmake option -DASCII=OFF -DUTF16=ON to enable ASCII and UTF16BE Alias Support in NXDN
option(UTF16
"Build with UTF16BE and ASCII Alias Support in NXDN Enabled" OFF)
if (UTF16)
add_definitions(-DUTF16_DECODE)
endif ()
#use cmake option -DTYPEC=OFF to disable NXDN Type-C and Conventional Decoding (enabled by default)
option(TYPEC
"Build with NXDN Type-C and Conventional Decoding Enabled" ON)
if (TYPEC)
add_definitions(-DTYPE_C_DECODE)
endif ()
#use cmake option -DTYPED=OFF to disable NXDN Type-D / IDAS Decoding (enabled by default)
option(TYPED
"Build with NXDN Type-D / IDAS Decoding Enabled" ON)
if (TYPED)
add_definitions(-DTYPE_D_DECODE)
endif ()
#use cmake option -DDCR=OFF to disable Japanese DCR (NXDN Variant) Decoding (enabled by default)
option(DCR
"Build with Japanese DCR (NXDN Variant) Decoding Enabled" ON)
if (DCR)
add_definitions(-DJPNDCR_DECODE)
endif ()
#use cmake option -DNOS=ON to enable older NXDN sync w/ pos and inv polarity, disable newer seperated (disabled by default)
option(NOS
"Build with Old NXDN Sync (pos and inv polarity) Enabled" OFF)
if (NOS)
add_definitions(-DNXDN_OLD_SYNC)
endif ()
#use cmake option -DSID=ON to enable P25p1 Soft ID decoding -- Experimental
option(SID
"Build with P25p1 LSD/Soft ID Enabled" OFF)
if (SID)
add_definitions(-DSOFTID)
endif ()
include(git_revision)
git_describe(GIT_TAG)
find_package(LibSndFile REQUIRED)
find_package(MBE REQUIRED)
find_package(RTLSDR)
find_package(Curses REQUIRED)
find_package(PulseAudio REQUIRED)
find_package(CODEC2)
include_directories(SYSTEM ${LIBSNDFILE_INCLUDE_DIR} ${MBE_INCLUDE_DIR} ${PULSEAUDIO_INCLUDE_DIRS} ${CURSES_INCLUDE_DIRS})
set(LIBS ${MBE_LIBRARY} ${LIBSNDFILE_LIBRARY} ${PULSEAUDIO_SIMPLE_LIBRARY} ${PULSEAUDIO_LIBRARY} ${CURSES_LIBRARIES})
if(RTLSDR_FOUND)
find_package(Threads)
include_directories(SYSTEM ${RTLSDR_INCLUDE_DIRS})
list(APPEND LIBS ${RTLSDR_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
add_definitions(-DUSE_RTLSDR)
endif(RTLSDR_FOUND)
if(CODEC2_FOUND)
include_directories(SYSTEM ${CODEC2_INCLUDE_DIRS})
list(APPEND LIBS ${CODEC2_LIBRARIES})
add_definitions(-DUSE_CODEC2)
endif(CODEC2_FOUND)
FILE(GLOB SRCS src/*.c src/*.cpp)
FILE(GLOB HEADERS include/*.h include/*.hpp)
if(NOT RTLSDR_FOUND)
list(REMOVE_ITEM SRCS ${CMAKE_CURRENT_SOURCE_DIR}/src/rtl_sdr_fm.cpp)
list(REMOVE_ITEM SRCS ${CMAKE_CURRENT_SOURCE_DIR}/src/rtl_sdr_tcp.c)
endif(NOT RTLSDR_FOUND)
configure_file("src/git_ver.c.in" "${CMAKE_CURRENT_BINARY_DIR}/git_ver.c" @ONLY)
list(APPEND SRCS "${CMAKE_CURRENT_BINARY_DIR}/git_ver.c")
include_directories("${PROJECT_SOURCE_DIR}/include")
ADD_EXECUTABLE(dsd-fme ${SRCS} ${HEADERS})
TARGET_LINK_LIBRARIES(dsd-fme ${LIBS})
target_compile_options(dsd-fme PRIVATE -Wunused-but-set-variable -Wunused-variable -Wunused-parameter
-Wempty-body -Wunused-label $<$<COMPILE_LANGUAGE:C>:-Wpointer-sign>
-Wmisleading-indentation -Wparentheses -Wunused-value -Wreturn-type
-Wtautological-compare)
include(GNUInstallDirs)
install(TARGETS dsd-fme DESTINATION ${CMAKE_INSTALL_BINDIR})
# man page
find_program(HELP2MAN_FOUND help2man)
if (HELP2MAN_FOUND)
add_custom_command(TARGET dsd-fme POST_BUILD
COMMAND help2man
ARGS -n "Digital Speech Decoder"
--version-string=${GIT_TAG}
-o ${CMAKE_CURRENT_BINARY_DIR}/dsd-fme.1
--no-info
$<TARGET_FILE:dsd-fme>
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dsd-fme.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif()
# uninstall target
configure_file(
"cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)

View File

@@ -1,3 +1,18 @@
dstar_header.c/h, descramble.h, and fcs.h are under the following license:
dstar_header.c/h and fcs.h: Copyright (C) 2010 by Kristoff Bonne, ON1ARF
descramble.h: Copyright (C) 2011 by Jonathan Naylor, G4KLX
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
All other code is under the following license:
Copyright (C) 2010 DSD Author
GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
@@ -12,3 +27,7 @@ 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.
# Digital Speech Decoder - Florida Man Edition
This version of DSD is a flavor blend of [szechyjs](https://github.com/szechyjs/dsd "szechyjs") RTL branch and some of my own additions, along with portions of DMR and NXDN code from the [LouisErigHerve](https://github.com/LouisErigHerve/dsd "LouisErigHerve") branch. This code also borrows snippets, inspiration, and ideas from other open source works including [Boatbod OP25](https://github.com/boatbod/op25 "Boatbod OP25"), [DSDcc](https://github.com/f4exb/dsdcc "DSDcc"), [SDTRunk](https://github.com/DSheirer/sdrtrunk "SDRTrunk"), [MMDVMHost](https://github.com/g4klx/MMDVMHost "MMDVMHost"), [LFSR](https://github.com/mattames/LFSR "LFSR"), and [EZPWD-Reed-Solomon](https://github.com/pjkundert/ezpwd-reed-solomon "EZPWD"). 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 and hrh17 for the many hours of wav samples submitted by them.

View File

@@ -1,30 +1,30 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.10
mQENBEufusYBCADN1SNkRkQzdLM02MCjen8KQmfuA38MrQIV0dZLpPJcn1+hsvZZ
KWvpUiWCNw1ClGRsJAT5cjonndi1PV7tpzQz+CyMqSP5OwR40eTJBoZhl74hdmU8
QvcKkJ32khSsOXMo60NHk5iIMDELzOGqq57NHhbunj6NtYog2mR5+WT37JLCvF/q
dvYl2KkRwEHD76/b/O1CyheiiqNMGBb13zPN0qO/PRlENSgViLcDh9qVj4ETNNS6
zMlP4D4pa07iED4Ua31wiXI04ReznnmvMqzQb8uFbg7d98F3bZpsbNURbmsFHMhj
c9qw65nzaMa3OHfZ3Qwl4XRlNqEzZrclIZADABEBAAG0DW1iZWxpYiBBdXRob3KJ
ATgEEwECACIFAkufusYCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEE+Y
6GPqXv4sI/4H/RsumInT5GtDdBTgxt3lERqc5GF8tI5CAQX9DUMMkKxQ306Fgb4M
ISYdepgL6BlbtSyMdKpKsDLScNA6YXER4gMU1nhhyBulqj41kAfsVbG8hiTBy5Ri
FTo36HrC//Zj1MlaTCB8Rl6B6IftAHIb1U+Gda3WnLDe+R5Pym/76TqeYx23PnJl
V+qfrkjbNyOb2bttyko2iccm9DSq/I1OF0Ufz3P60ssUwHW/b2S6WOXRxiZIq0sz
8pAweUFCxIMWo+XYlSpRtwpebfx+JoHJKdW1cSCgY9jwVsOZO1zxc8P+jr3ByiIR
ZPd0PfBt/AHuC6Hmw9nC12e49+4qsHkj50S5AQ0ES5+6xgEIALf60WjqHm552FIX
KqmG0TIrXpCsYoTWzDdO5j0Ro6fmg9U48BqDH5aS4YRvuyPE7q6DGYEnXF5EIPtU
FhUk4FMmez5eMg91UW4Qjqx8M3reoBROYocM5Nfbc9w7St8+3oRS6rUBIh/B6o4O
kEjkoW3R7O3uFpC53Oi9IVhx/joWxhi430RrUTig5CQzuPFTAHd3xJVE6Pv44nsY
/PsOhBLu2Z3kRkvjcGbsGDlAl2bDEobzQdsqXDD8gJkF5W4IeBKvRC54SE0FSm57
G1gadhZ7vT4DWQZvYYKXR+AE7FTcopoAFHdapYokOGLHCguabyeZ5q7+s7J4nddL
p5yq8ikAEQEAAYkBHwQYAQIACQUCS5+6xgIbDAAKCRBPmOhj6l7+LPi6B/sEkDkm
Qs/aTz9HDANBAbTuDZTY4WBbkPdFos3xxC2Z/TH5m4bfHEkvNk5WD+j+vYB3exAc
uBi7ZiqibRpap4kiAiKKCRXOyvmEmrjKB5wOWbRpkdTeEdPcpsQ4dDDw1ZUKwzjN
1jI/9GOgq49nAGdlU59f3IdPut6oQNq9vrtanTq2xHVN/rOhV9GLE6gLX1YWkpIH
zYSUheGPsnv4sWRsQDTB7xmF+6RZzjmauKNwsGFscX1TenOWtUbYb9qFCwvNMOSk
51sEaD6PK6wWTXMqQlgjaoGqh1ZaePgT0QTh1W/bvOD0fL5NEToJl2h/lBSvO+ez
R9B++dt5JX9BMxAH
=puA7
mQENBEufuqsBCADAtWFE1qE3xqJE4xggUn6id0fVulM7y+rSH1VPxo7Ps9duc/O9
VegEx8+N5KphDROS4RgHxMiS1O8Qy5Hpq4gEp6RvLNj3s+0DMwqRZoA0tBCkNmvF
K7sF+GncrOu/NZkDIZ8emN9NWWeWynWJvuM2H5HQA9yCq+YTFae5sgyr3APC3xh4
OkTuVMcclGTJdVrISlNBDpo/AZLJ/nV0SgITpiZVsI4RSNiQPP1kX+2fIDEAwtxN
3HIDyegDoX36cOItsb05zHkLxoUoZnWoxMvV3rwnqXg5cr6PWfiwgqWd0avl1sg6
abpR6MKV68OCpTkqMrDIXJJrM2sTz+ZB2bBtABEBAAG0CkRTRCBBdXRob3KJATgE
EwECACIFAkufuqsCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEPqiY10/
HX/Q11UH/0ZutGQWLZyZD5ZqVdBeYEf6IKhKhaC2vD/+5zUJ2cIgT5xJVTPCKN7X
sygBANJc9GyPRYRvQecdcTHR5B+wUKCPeibv9iQuU3v7Uqb5edXEh2b4jOMWNvHJ
l3lqBdUefuQdbc2xXCPgn+GkyexXEBsVF3hCzWV9r4bCpY57iWUYZZT0wAbN81hz
jPKCCRmF+gZUUufxyhUGq/+eAKeUll6lgG5Ms2YKOlUMphfMav45qgWZHj1DASOV
wPsiIVUaC6+GtHTTzHYRL05ydxxduX+yyKDO1emCE4fx1n3jdwToHLRrC1ui+AJM
Q1s+bp+bGmMYaYaKc/JtNHcN8mbWyCK5AQ0ES5+6qwEIAJvPrnv2QO5Be3FRsnYL
qbA1h/Lj0SjnuimaiNOzCYFIYtusLpyWjwWUnOEXdw5FoExqUStOHJ557SDG/zFB
qy+DsNC9ncSRZ5U2tUQUtt50m2lpYvoy/sVf3oN+IsyZ5hZpiAwrxlyMC/aoGR3C
6ZlLkZ42azNCmEmoBniIxQ+XwhwkLMRsOnqLoFyXB9CcDFIXeEhZkVWZT0B5+20f
yGSBDJ6VcIAASoaIyvSwU9l/DT7D/s0J8WnZQZmRdrsZ3Ikj0Sv/4D2MJnCVJTSw
DHq5Sf7DmUq/WD0iWRLEXWmPt9w3WxP4imhtmIpICxCDoeQUTkqFpOTf29sVcpPt
838AEQEAAYkBHwQYAQIACQUCS5+6qwIbDAAKCRD6omNdPx1/0O8ECADAcPORjGFl
RnIrsgiVMp82GQ7hnZZxktU1WVVx8EsPTT1DD79nIoeKI+UcenzuOGyTX7DGcy+P
rWntUbt2ZygPTbP5Wu6zd845y9EzjxQ5q0vDF4oAefQptwqGDVeO/KBv9cZLbnih
VEjQELgC/rVB7nd5p83EL5vb8qL/Eiu65stxwZ3QOT9pp2bsAPk6LJWWnVqJroKI
Pc6KWG7n6mMJPbhFmE8Ld2lcNlSKQwLHIxDocL2GAqh5S5hJeGg2oLMFpy0g2Ron
643w0zPfpKC15TlnkJDCIgtRlHovrs42Qkypz9y3e8yOL9O0RLYIKbuKw4mNR3cT
OdeV+TjfiZ5I
=2oe6
-----END PGP PUBLIC KEY BLOCK-----

109
Makefile
View File

@@ -1,109 +0,0 @@
# 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.
CC = gcc
CFLAGS = -O2
INCLUDES = -I. -I/usr/local/include -I/usr/include
LIBS = -L/usr/local/lib -lm -lmbe
INSTALL=install
AR=ar
RANLIB=ranlib
DEST_BASE=/usr/local
DEST_INC=${DEST_BASE}/include
DEST_LIB=${DEST_BASE}/lib
DEST_BIN=${DEST_BASE}/bin
OBJS = dsd_main.o dsd_symbol.o dsd_dibit.o dsd_frame_sync.o dsd_file.o dsd_audio.o dsd_serial.o dsd_frame.o dsd_mbe.o dsd_upsample.o p25p1_hdu.o p25p1_ldu1.o p25p1_ldu2.o p25p1_tdulc.o p25_lcw.o x2tdma_voice.o x2tdma_data.o dstar.o nxdn96.o dmr_voice.o dmr_data.o provoice.o
all: dsd
build: all
dsd_main.o: dsd_main.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_main.c -o dsd_main.o
dsd_symbol.o: dsd_symbol.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_symbol.c -o dsd_symbol.o
dsd_dibit.o: dsd_dibit.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_dibit.c -o dsd_dibit.o
dsd_frame_sync.o: dsd_frame_sync.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_frame_sync.c -o dsd_frame_sync.o
dsd_file.o: dsd_file.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_file.c -o dsd_file.o
dsd_audio.o: dsd_audio.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_audio.c -o dsd_audio.o
dsd_serial.o: dsd_serial.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_serial.c -o dsd_serial.o
dsd_frame.o: dsd_frame.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_frame.c -o dsd_frame.o
dsd_mbe.o: dsd_mbe.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_mbe.c -o dsd_mbe.o
dsd_upsample.o: dsd_upsample.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dsd_upsample.c -o dsd_upsample.o
p25p1_hdu.o: p25p1_hdu.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c p25p1_hdu.c -o p25p1_hdu.o
p25p1_ldu1.o: p25p1_ldu1.c p25p1_const.h dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c p25p1_ldu1.c -o p25p1_ldu1.o
p25p1_ldu2.o: p25p1_ldu2.c p25p1_const.h dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c p25p1_ldu2.c -o p25p1_ldu2.o
p25p1_tdulc.o: p25p1_tdulc.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c p25p1_tdulc.c -o p25p1_tdulc.o
p25_lcw.o: p25_lcw.c dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c p25_lcw.c -o p25_lcw.o
x2tdma_voice.o: x2tdma_voice.c x2tdma_const.h dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c x2tdma_voice.c -o x2tdma_voice.o
x2tdma_data.o: x2tdma_data.c x2tdma_const.h dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c x2tdma_data.c -o x2tdma_data.o
dstar.o: dstar.c dstar_const.h dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dstar.c -o dstar.o
nxdn96.o: nxdn96.c nxdn96_const.h dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c nxdn96.c -o nxdn96.o
dmr_voice.o: dmr_voice.c dmr_const.h dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dmr_voice.c -o dmr_voice.o
dmr_data.o: dmr_data.c dmr_const.h dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c dmr_data.c -o dmr_data.o
provoice.o: provoice.c provoice_const.h dsd.h config.h
$(CC) $(CFLAGS) $(INCLUDES) -c provoice.c -o provoice.o
dsd: $(OBJS) dsd.h config.h
$(CC) $(CFLAGS) $(LIBS) -o dsd $(OBJS)
clean:
rm -f *.o
rm -f dsd
install: dsd
$(INSTALL) dsd $(DEST_BIN)
chgrp uucp $(DEST_BIN)/dsd
chmod g+s $(DEST_BIN)/dsd

520
README
View File

@@ -1,520 +0,0 @@
Digital Speech Decoder 1.3
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 is able to decode several digital voice formats from discriminator
tap audio and synthesize the decoded speech. Speech
synthesis requires mbelib, which is a separate package. DSD 1.3
requires mbelib 1.1 or later.
Supported formats in version 1.3:
P25 Phase 1 Widely deployed radio standard used in public safety
and amateur radio.
Support includes decoding and synthesis of speech,
display of all link control info, and the ability to save
and replay .imb data files
ProVoice EDACS Digital voice format used by public safety and
amateur radio.
Support includes decoding and synthesis of speech and
the ability to save and replay .imb data files.
Note: not enabled by default, use -fp to enable.
X2-TDMA Two slot TDMA system currently being deployed by several
public safety organizations. Based on the DMR
standard with extensions for P25 style signaling.
Support includes decoding and synthesis of speech,
display of all link control info, and the ability to save
and replay .amb data files
DMR/MOTOTRBO "Digital Mobile Radio" Eurpoean two slot TDMA standard.
MOTOTRBO is a popular implementation of this standard.
Support includes decoding and synthesis of speech and
the ability to save and replay .amb data files.
Development (no speech) support only:
NXDN (9600) Digital radio standard used by NEXEDGE and IDAS brands.
Development support only. DSD recognizes frames and can
extract the voice bits but speech is not yet decoded.
The issue is likely either an unusual interleave pattern
or a pseudo-random bit mask initialized by a "color code"
Note: not enabled by default, use -fn to enable.
D-STAR Amateur radio digital voice standard
Development support only. DSD recognized frames and can
extract the voice bits but speech is not yet decoded.
D-STAR likely uses a version of AMBE not yet supported by
mbelib. The voice bit interleave pattern also needs to be
determined.
Note: not enabled by default, use -fn to enable.
Unsupported formats in version 1.3 considered for future development:
P25 Phase 2 This is not yet a published standard. Full support is
expected once the standard is published and there are
systems operating to test against. Phase 2 will use
a vocoder supported by mbelib.
OpenSKY It is possible that the four slot version uses a vocoder
supported by mbelib. The two slot version does not.
NXDN (4800) This should be supportable as soon as we have .wav files
or access to a radio programmed in this format.
Supported demodulation optimizations in version 1.3:
C4FM Continuous envelope 2 or 4 level FSK with relatively
sharp transitions between symbols. Used by most P25
systems.
Optimizations include calibrating decision points only
during sync, 4/10 sample window per symbol, and symbol
edge timing calibration.
GFSK Continuous envelope 2 or 4 level FSK with a narrower
Gaussian/"raised cosine" filter that affects transitions
between symbols. Used by DMR/MOTOTRBO, NXDN and many
others. Noisy C4FM signals may be detected as GFSK
but this is ok, the optimization changes will help with
noisy signals.
Optimizations are similar to C4FM except symbol transitions
are only kept out of the middle 4 samples and only the
middle two samples are used.
QPSK Quadrature Phase Shift Keying (and variants) used in
some P25 systems and all known X2-TDMA systems. May be
advertised under the marketing term "LSM"
Optimizations include continuous decision point
calibration, using middle two samples, and using the
symbol midpoint "spike" for symbol timing.
Installation
DSD should easily compile on any Linux or *BSD system with gcc.
Just untar and run "make" or "make install". There are some debugging/
development options in config.h that normal users will want to leave
disabled as they can severely impact performance.
Operation
There are two main operating modes, "Live scanner" and "Play files"
Usage: dsd [options] Live scanner mode
Live Scanner mode takes 48KHz/16 bit mono audio samples from a
sound card input and decodes speech in real time. Options are provided
for controling information display and saving mbe data files.
The synthesized speech can be output to a soundcard and/or a
.wav file.
Usage: dsd [options] -r <files> Read/Play saved mbe data from file(s)
Play files mode reads mbe data from files specified on the command
line (including wildcards) and synthesizes speech from those files.
The synthesized speech can be output to a soundcard and/or a
.wav file. The -r command line options is used to activate Play files
mode.
Display modes
There are two main display modes in Live scanner mode. "Errorbars"
and "Datascope".
Errorbars mode output for P25 Phase 1 looks like this:
Sync: -p25p1 mod: C4FM input: 39% nac: 5C2 src: 0 tg: 32464 TDULC
Sync: -p25p1 mod: C4FM input: 39% nac: 5C2 src: 0 tg: 32464 TDULC
Sync: -p25p1 mod: C4FM input: 39% nac: 5C2 src: 0 tg: 32464 TDULC
Sync: -p25p1 mod: C4FM input: 39% nac: 5C2 src: 0 tg: 32464 TDULC
Sync: -p25p1 mod: C4FM input: 38% nac: 5C2 src: 0 tg: 32464 TDU
Sync: -p25p1 mod: C4FM input: 38% nac: 5C2 src: 0 tg: 32464 HDU
Sync: -p25p1 mod: C4FM input: 42% nac: 5C2 src: 0 tg: 32464 LDU1 e:
Sync: (-p25p1) mod: C4FM input: 39% nac: 5C2 src: 52610 tg: 32464 (LDU2) e:
Sync: -p25p1 mod: C4FM input: 38% nac: 5C2 src: 52610 tg: 32464 LDU1 e:
Sync: -p25p1 mod: C4FM input: 39% nac: 5C2 src: 52610 tg: 32464 LDU2 e:
Sync: -p25p1 mod: C4FM input: 39% nac: 5C2 src: 52610 tg: 32464 LDU1 e:
Sync: -p25p1 mod: C4FM input: 39% nac: 5C2 src: 52610 tg: 32464 LDU2 e:
Sync: -p25p1 mod: C4FM input: 39% nac: 5C2 src: 52610 tg: 32464 LDU1 e:
"Sync" indicates the frame type detected and whether the polarity is
positive or negative. DSD automatically detects and handles either
polarity except for DMR/MOTOTRBO/X2-TDMA which unfortunatley use both
sync polarities.
Most combinations of transmitter, receiver and soundcard show netagive
(-) polarity for X2-TDMA signals and (+) polarity for DMR/MOTOTRBO so
those are the defaults.
********
You may need to use the -x option to select non-inverted polarity if
you are not getting usable X2-TDMA/MOTOTRBO/DMR speech. As they use both
normal and inverted sync it is not possible to detect polariy
automatically.
********
"mod" indicates the current demodulation optimizations.
"input" indicates the audio input level. QPSK signals tend to appear
much "wider" than C4FM from a discriminator tap so it is important
to set your input gain using a QPSK signal if you plan to montir them.
It is not necessary nor desirable to get to 100%, in fact your sound
card may max out below 100%. It is best to use the Datascope mode for
setting input gain (see below). Typical values with good results are
40% for C4FM and 66% for QPSK.
"nac" is the P25 Phase 1 Network Access Code. This is a 12 bit field
in each P25 Phase 1 header. It should not be confused with the 16
bit System ID used in non-p25 trunking control channels.
"src" is the radio id of the trasmitting subscriber unit.
"tg" is the talkgroup derived from link control information.
"HDU/LDU1/LDU2/TDU/TDULC" are P25 Phase 1 frame types, referred to as
frame subtype within DSD.
"e:" is the beginning of the errorbars display. Each "=" indicates a
detected error within the voice data. "R" and "M" indicat that a voice
frame was repeated or muted due to excessive errors.
Values in parentheses () indicate an assumption (soft decision) was
made based on the previous frame.
Errorbars mode output for X2-TDMA looks like this:
Sync: -X2-TDMA mod: QPSK input: 59% src: 17211 tg: 197 [SLOT0] slot1 VOICE e:
Sync: -X2-TDMA mod: QPSK input: 47% src: 17211 tg: 197 [SLOT0] slot1 VOICE e:
Sync: -X2-TDMA mod: QPSK input: 43% src: 17211 tg: 197 [SLOT0] slot1 VOICE e:
Sync: (-X2-TDMA) mod: QPSK input: 28% src: 17211 tg: 197 [SLOT0] slot1 VOICE e:
DMR/MOTOTRBO display is similar except it does not yet show source
and talkgroup information.
As of version 1.2 DSD shows which specific TDMA slots are active (with
capital SLOT letters) and which slot is currently being monitored (with
square brackets []. Noisy/degraded signals will affect the accuracy
of this display.
The frame subtypes (Voice/LC etc) are shown based on the DMR standard
types.
Datascope mode output looks like this:
Demod mode: C4FM Nac: 8C3
Frame Type: P25 Phase 1 Talkgroup: 16528
Frame Subtype: LDU1 Source: 0
TDMA activity: slot0 slot1 Voice errors:
+----------------------------------------------------------------+
| # ^ !| ^ # |
| * | * |
| * | * |
| * | * * |
| * * | * * |
| * * | ** * |
| * ** | ** * |
| ** ** | ** * |
| ** ** | ** * |
| ** ** | ** * |
+----------------------------------------------------------------+
C4FM Example
Demod mode: C4FM Nac: 126
Frame Type: P25 Phase 1 Talkgroup: 25283
Frame Subtype: LDU2 Source: 0
TDMA activity: slot0 slot1 Voice errors:
+----------------------------------------------------------------+
| # ^ ! ^ # |
| * | |
| * | |
| ** | |
| ** | * |
| * ** | * * |
| ** ** | * * |
| *** ** | ** * |
| *** ** | *** * |
| *** **** | **** * * |
+----------------------------------------------------------------+
QPSK Example
At the top is various information about the signal, similar to the
information provided in Errorbars mode. The large box is similar to
a spectrum analyzer viewing the channel bandwidth.
The horizontal axis is the input audio level, minimum on the left and
maximum on the right. The vertical axis is the number of samples
seend at each audio level.
The "*" symbols represent the number of audio
samples that were at each level during the aggregation period.
(default = 36 symbols) The -S options controls the aggregation period
as well as the QPSK tracking symbol buffer, so changing that will affect
QPSK performance as well as the Datascope display.
As you can see from the figures above, clean C4FM signals tend to have
four very sharply defined audio levels. The datascope pattern also
tends to be faily stable with minor shifts left and right as the
receiver tries to frequency track any DC offset.
QPSK signals on the other hand tend to appear much broader (and artifact
of how they are distored by FM PLL discriminators). They also tend
to vary wildly in width and centering. This is especially true when
monitoring simulcast systems. Muliple QPSK signals interfere much more
dramatically with an FM discriminator than C4FM signals.
*******
For this reason it is important to isolate your receiver to one
transmitter tower, _especially_ for QPSK signals.
*******
The "#" symbols indicate the detected min/max values that are used
to calibrate the symbol decision points. These are indicated by
"!" for the center decision point and "^" for the mid decision points.
Display Options
There are several options to control the type and quantity of
information displayed in Errorbars mode:
-e Show Frame Info and errorbars (default)
-pe Show p25 encryption sync bits
-pl Show p25 link control bits
-ps Show p25 status bits and low speed data
-pt Show p25 talkgroup info
-q Don't show Frame Info/errorbars
-s Datascope (disables other display options)
-t Show symbol timing during sync
-v <num> Frame information Verbosity
-z <num> Frame rate for datascope
Most of these options are self explanitory. Symbol timing is a noisy
option that allows you to view the quality of the frame sync samples
and accuracy of the symbol timing adjustments.
Symbol Timing display looks like this:
Symbol Timing:
----------
----------
----------
----------
----------
-+++++++++ 1
+---------- 0
----------
++++++++++ 0
++++++++++
---------- 0
----------
++++++++++ 0
++++++++++
++++++++++
++++++++++
---------- 0
++++++++++ 0
---------- 0
++++++++++ 0
++++++++++
++++++++++
++++++++++
++++++++++
C4FM example
Symbol Timing:
+---------
----------
----------
----------
-----X---- 5
--+++O++++- 4
----------
----X----- 4
++++O++--- 4
--++O++++- 4
----X----- 4
----------
++++O+++-- 4
-+++O+++-- 4
--++O+++-- 4
--++O+++-- 4
----------
++++O++++- 4
----------
++++O+++-- 4
-+++O++++- 4
-+++O+++++ 4
-+++O++--- 4
--++O+++-- 4
QPSK example
Symbol timing is only displayed for symbols during the frame sync
period. Each horizontal line represents the 10 audio samples for each
symbol. "-" indicates an audio sample below the center reference level
and "+" represents a sample above center. "X" indicates a low spike
below a reference threshold (reference minimum for C4FM and 80%
of reference minimum for QPSK). "O" represents a high spike above
the high reference threshold. The numbers to the right indicate which
sample position the targeted transition occurred (+/- for C4FM or
spike high/low for QPSK). The number of audio samples for the next
symbol are adjusted to get this value closer to the target (0 for
C4FM and 4 for QPSK). This shows how DSD maintains accurate symbol
timing. Symbol timing adjustments are only made during sync, which
is the only time reliable transitions can be observed.
In both examples above the symbol timing was off by one sample at
the beginning of the frame sync period and was adjusted. Generally
if you see any spike values "X/O" in C4FM mode, or lots of them in
QPSK mode it indicates noise on the input signal.
Input/Output Options
-i <device> Audio input device (default is /dev/audio)
-o <device> Audio output device (default is /dev/audio)
-d <dir> Create mbe data files, use this directory
-g <num> Audio output gain (default = 0 = auto)
-n Do not send synthesized speech to audio output device
-w <file> Output synthesized speech to a .wav file
The audio in device can be a sound card OR a .wav file if the file
is in the exact format 48k/16bits/mono/pcm. Audio in should be an
unfilterd discriminator tap signal.
The audio out device should be a sound card (use the -w options to
output to a .wav file).
If the audio in device is the same as the audio out device, the
synthesized speech has to be upsampled to the 48k sample rate required
for input. A fast upsample function is provided but still leaves some
artifacts.
********
The best sound and minimum cpu usage is achieved with separate sound
cards for input and output
********
if you specify different input/output devices DSD will use 8k as the
output sample rate and the lack of resampling results in much better
audio as well as lowe cpu consumption.
If you are using onboard "AC97" sound device you may find that DSD uses
much more cpu than expected, in some cases more than is available.
This is because many AC97 sound devices are designed to rely on CPU
processing power instead of hardware. You may also find that 8k sample
rate output is upsampled in the driver using a very basic algorithim
resulting in severe distortion. The solution is to use a real hardware
sound device (pci card, usb device etc).
As of version 1.2 DSD now automatically levels the output audio. This
greately improves readability and eliminates the painful effects of
noise bursts. You can specify a fixed audio output gain with the -g
option.
Scanner control options:
-B <num> Serial port baud rate (default=115200)
-C <device> Serial port for scanner control (default=/dev/ttyUSB0)
-R <num> Resume scan after <num> TDULC frames or any PDU
On some P25 systems Packet Data Units (PDU) are sent on the same
frequencies used for voice traffic. If done constantly this can
be a severe hinderance to scanning the system in conventional
mode. The -R option enables sending a "resume scan" command to
a scanner connected to a serial port. Use -B and -C to set the baud
rate and serial port device if necessary.
Decoder options
-fa Auto-detect frame type (default)
-f1 Decode only P25 Phase 1
-fd Decode only D-STAR* (no audio)
-fn Decode only NXDN96* (no audio)
-fp Decode only ProVoice*
-fr Decode only DMR/MOTOTRBO
-fx Decode only X2-TDMA
-ma Auto-select modulation optimizations (default)
-mc Use only C4FM modulation optimizations
-mg Use only GFSK modulation optimizations
-mq Use only QPSK modulation optimizations
-u <num> Unvoiced speech quality (default=3)
-xx Expect non-inverted X2-TDMA signal
-xr Expect inverted DMR/MOTOTRBO signal
NXDN and D-STAR are not enabled by default as they are for development
testing only and have shorter frame sync patterns that are prone to
false triggering.
MBE speech synthesis is broken down into two main types of sounds,
"Voiced" and "Unvoiced". Voiced speech bands are synthesized with
a single sine wave centered in the frequency band with the appropriate
phase and amplitude.
Unvoiced speech is supposed to be generated with a noise source, 256
point DFT a number of band filters, followed by a 256 point inverse DFT.
For computational simplicity mbelib uses a different method. For each
unvoiced speech band, a number of sine waves are generated, each with a
different random initial phase. The number of waves used per band is
controlled by the -u option. A setting of 4 would approximate the
performance of the 256 point DFT method as the maximum number of voice
bands is 56, and very low frequencies are not synthesized. Values less
than 3 have a noticable lack of unvoiced speech and/or artifacts. The
defualt of 3 provides good speech quality with reasonable cpu use.
Increasing the quality above the default rapidly consumes more CPU for
increasingly diminishing returns.
Advanced decoder options
-A <num> QPSK modulation auto detection threshold (default=26)
-S <num> Symbol buffer size for QPSK decision point tracking
(default=36)
-M <num> Min/Max buffer size for QPSK decision point tracking
(default=15)
Encryption
********
Decryption of speech is NOT supported, even if you lawfully posess the
encryption keys. Decryption support will not be added in the future as
the authors wish to steer as far away from the legal issues associated
with encryption as possible.
********
We realize that there are many legitemate and lawful uses of decryption
software including system/interoperability testing and lawful monitoring.
This software is distributed under a liberal BSD license so there is
nothing to stop others from supplying patches, forking this project or
incorporating it into a commercial product and adding decryption support.
There is support for displaying the encryption sync bits transmitted in
the clear on P25 Phase 1 systems. These bits do not allow for the
decryption of signals without the secret encryption keys. The
encryption sync bits are useful for determining whether a signal is
encrypted vs merely noisy or degraded. As the encryption sync bits
typically include long strings of zeros when a transmission is not
encrypted they can also be used to visually estimate bit error rates.

31
README.md Normal file
View File

@@ -0,0 +1,31 @@
# 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](https://github.com/szechyjs/dsd "szechyjs"), some code and ideas from [LouisErigHerve](https://github.com/LouisErigHerve/dsd "LouisErigHerve"), [Boatbod OP25](https://github.com/boatbod/op25 "Boatbod OP25") and [Osmocom OP25](https://gitea.osmocom.org/op25/op25 "Osmocom OP25"), along with other snippets of code, information, and inspirations from other projects including [DSDcc](https://github.com/f4exb/dsdcc "DSDcc"), [SDRTRunk](https://github.com/DSheirer/sdrtrunk "SDRTrunk"), [MMDVMHost](https://github.com/g4klx/MMDVMHost "MMDVMHost"), [LFSR](https://github.com/mattames/LFSR "LFSR"), [OK-DMRlib](https://github.com/OK-DMR/ok-dmrlib "OK-DMRlib"), and [EZPWD-Reed-Solomon](https://github.com/pjkundert/ezpwd-reed-solomon "EZPWD"), Eric Cottrell, SP5WWP, ilyacodes, Phillipw1084 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, 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](https://github.com/lwvmobile/dsd-fme/blob/audio_work/dsd-fme2.png)
![DSD-FME](https://github.com/lwvmobile/dsd-fme/blob/audio_work/dsd-fme3.png)
## Information
See the [examples](https://github.com/lwvmobile/dsd-fme/tree/audio_work/examples "examples") folder for information on [cloning and installing](https://github.com/lwvmobile/dsd-fme/blob/audio_work/examples/Install_Notes.md "cloning and installing"), [example usage](https://github.com/lwvmobile/dsd-fme/blob/audio_work/examples/Example_Usage.md "example usage"), and [trunking examples](https://github.com/lwvmobile/dsd-fme/blob/audio_work/examples/trunking.sh "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.

31
cmake/FindCODEC2.cmake Normal file
View File

@@ -0,0 +1,31 @@
# - Try to find CODEC2
# Once done this will define
#Seems to work on Cygwin as well now -- more testing for may be required
# Not sure what causes the 'Package 'codec2', required by 'virtual:world', not found' message, but seems to work anyways
# -- Checking for module 'codec2'
# -- Package 'codec2', required by 'virtual:world', not found
# -- Found CODEC2: /usr/local/lib/libcodec2.dll.a
if (NOT CODEC2_FOUND)
find_package(PkgConfig)
pkg_check_modules(CODEC2_PKG codec2)
set(CODEC2_DEFINITIONS ${PC_CODEC2_CFLAGS_OTHER})
find_path(CODEC2_INCLUDE_DIR
NAMES codec2/codec2.h codec2.h
HINTS ${CODEC2_PKG_INCLUDE_DIRS})
find_library(CODEC2_LIBRARY
NAMES codec2/codec2 codec2
HINTS ${CODEC2_PKG_LIBRARY_DIRS})
set(CODEC2_LIBRARIES ${CODEC2_LIBRARY})
set(CODEC2_INCLUDE_DIRS ${CODEC2_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CODEC2 DEFAULT_MSG CODEC2_LIBRARY CODEC2_INCLUDE_DIR)
mark_as_advanced(CODEC2_INCLUDE_DIR CODEC2_LIBRARY)
endif (NOT CODEC2_FOUND)

View File

@@ -0,0 +1,16 @@
# - Try to find Libsndfile
# Once done this will define
#
# LIBSNDFILE_FOUND - System has LIBSNDFILE
# LIBSNDFILE_INCLUDE_DIR - The SNDFILE include directory
# LIBSNDFILE_LIBRARY - The library needed to use SNDFILE
#
find_path(LIBSNDFILE_INCLUDE_DIR sndfile.h)
SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile libsndfile)
FIND_LIBRARY(LIBSNDFILE_LIBRARY NAMES ${LIBSNDFILE_NAMES})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibSndFile DEFAULT_MSG LIBSNDFILE_LIBRARY
LIBSNDFILE_INCLUDE_DIR)

15
cmake/FindMBE.cmake Normal file
View File

@@ -0,0 +1,15 @@
# - Try to find MBE
# Once done this will define
#
# MBE_FOUND - System has MBE
# MBE_INCLUDE_DIR - The MBE include directory
# MBE_LIBRARY - The library needed to use MBE
#
find_path(MBE_INCLUDE_DIR mbelib.h)
set(MBE_NAMES ${MBE_NAMES} mbe libmbe)
find_library(MBE_LIBRARY NAMES ${MBE_NAMES})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MBE DEFAULT_MSG MBE_LIBRARY MBE_INCLUDE_DIR)

View File

@@ -0,0 +1,68 @@
#.rst:
# FindPulseAudio
# --------------
# Finds the PulseAudio library
#
# This will define the following variables::
#
# PULSEAUDIO_FOUND - system has the PulseAudio library
# PULSEAUDIO_INCLUDE_DIRS - the PulseAudio include directory
# PULSEAUDIO_LIBRARIES - the libraries needed to use PulseAudio
# PULSEAUDIO_DEFINITIONS - the definitions needed to use PulseAudio
#
# and the following imported targets::
#
# PulseAudio::PulseAudio - The PulseAudio library
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_PULSEAUDIO libpulse>=11.0.0 QUIET)
pkg_check_modules(PC_PULSEAUDIO_MAINLOOP libpulse-mainloop-glib>=11.0.0 QUIET)
pkg_check_modules(PC_PULSEAUDIO_SIMPLE libpulse-simple>=11.0.0 QUIET)
endif()
find_path(PULSEAUDIO_INCLUDE_DIR NAMES pulse/pulseaudio.h pulse/simple.h
PATHS ${PC_PULSEAUDIO_INCLUDEDIR} ${PC_PULSEAUDIO_INCLUDE_DIRS})
find_library(PULSEAUDIO_LIBRARY NAMES pulse libpulse
PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS})
find_library(PULSEAUDIO_SIMPLE_LIBRARY NAMES pulse-simple libpulse-simple
PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS})
find_library(PULSEAUDIO_MAINLOOP_LIBRARY NAMES pulse-mainloop pulse-mainloop-glib libpulse-mainloop-glib
PATHS ${PC_PULSEAUDIO_LIBDIR} ${PC_PULSEAUDIO_LIBRARY_DIRS})
if(PC_PULSEAUDIO_VERSION)
set(PULSEAUDIO_VERSION_STRING ${PC_PULSEAUDIO_VERSION})
elseif(PULSEAUDIO_INCLUDE_DIR AND EXISTS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h")
file(STRINGS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h" pulseaudio_version_str REGEX "^#define[\t ]+pa_get_headers_version\\(\\)[\t ]+\\(\".*\"\\).*")
string(REGEX REPLACE "^#define[\t ]+pa_get_headers_version\\(\\)[\t ]+\\(\"([^\"]+)\"\\).*" "\\1" PULSEAUDIO_VERSION_STRING "${pulseaudio_version_str}")
unset(pulseaudio_version_str)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PulseAudio
REQUIRED_VARS PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_SIMPLE_LIBRARY PULSEAUDIO_INCLUDE_DIR
VERSION_VAR PULSEAUDIO_VERSION_STRING)
if(PULSEAUDIO_FOUND)
set(PULSEAUDIO_INCLUDE_DIRS ${PULSEAUDIO_INCLUDE_DIR})
set(PULSEAUDIO_LIBRARIES ${PULSEAUDIO_LIBRARY} ${PULSEAUDIO_MAINLOOP_LIBRARY} ${PULSEAUDIO_SIMPLE_LIBRARY})
set(PULSEAUDIO_DEFINITIONS -DHAS_PULSEAUDIO=1)
if(NOT TARGET PulseAudio::PulseAudioMainloop)
add_library(PulseAudio::PulseAudioMainloop UNKNOWN IMPORTED)
set_target_properties(PulseAudio::PulseAudioMainloop PROPERTIES
IMPORTED_LOCATION "${PULSEAUDIO_MAINLOOP_LIBRARY}")
endif()
if(NOT TARGET PulseAudio::PulseAudio)
add_library(PulseAudio::PulseAudio UNKNOWN IMPORTED)
set_target_properties(PulseAudio::PulseAudio PROPERTIES
IMPORTED_LOCATION "${PULSEAUDIO_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${PULSEAUDIO_INCLUDE_DIR}"
INTERFACE_COMPILE_DEFINITIONS HAVE_LIBPULSE=1
INTERFACE_LINK_LIBRARIES PulseAudio::PulseAudioMainloop)
endif()
endif()
mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_SIMPLE_LIBRARY)

29
cmake/FindRTLSDR.cmake Normal file
View File

@@ -0,0 +1,29 @@
# - Try to find rtlsdr - the hardware driver for the realtek chip in the dvb receivers
# Once done this will define
# RTLSDR_FOUND - System has rtlsdr
# RTLSDR_LIBRARIES - The rtlsdr libraries
# RTLSDR_INCLUDE_DIRS - The rtlsdr include directories
# RTLSDR_LIB_DIRS - The rtlsdr library directories
if (NOT RTLSDR_FOUND)
find_package(PkgConfig)
pkg_check_modules(RTLSDR_PKG librtlsdr)
set(RTLSDR_DEFINITIONS ${PC_RTLSDR_CFLAGS_OTHER})
find_path(RTLSDR_INCLUDE_DIR
NAMES rtl-sdr.h
HINTS ${RTLSDR_PKG_INCLUDE_DIRS})
find_library(RTLSDR_LIBRARY
NAMES rtlsdr
HINTS ${RTLSDR_PKG_LIBRARY_DIRS})
set(RTLSDR_LIBRARIES ${RTLSDR_LIBRARY})
set(RTLSDR_INCLUDE_DIRS ${RTLSDR_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(RTLSDR DEFAULT_MSG RTLSDR_LIBRARY RTLSDR_INCLUDE_DIR)
mark_as_advanced(RTLSDR_INCLUDE_DIR RTLSDR_LIBRARY)
endif (NOT RTLSDR_FOUND)

View File

@@ -0,0 +1,23 @@
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
cmake_policy(SET CMP0007 OLD)
list(REVERSE files)
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}")
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif (NOT ${rm_retval} EQUAL 0)
else (EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif (EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)

130
cmake/git_revision.cmake Normal file
View File

@@ -0,0 +1,130 @@
# - Returns a version string from Git
#
# These functions force a re-configure on each git commit so that you can
# trust the values of the variables in your build system.
#
# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
#
# Returns the refspec and sha hash of the current head revision
#
# git_describe(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe on the source tree, and adjusting
# the output so that it tests false if an error occurs.
#
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe --exact-match on the source tree,
# and adjusting the output so that it tests false if there was no exact
# matching tag.
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
if(__get_git_revision_description)
return()
endif()
set(__get_git_revision_description YES)
# We must run the following at "include" time, not at function call time,
# to find the path to this module rather than the path to a calling list file
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
function(get_git_head_revision _refspecvar _hashvar)
set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories
set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
# We have reached the root directory, we are not in git
set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
return()
endif()
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
endwhile()
# check if this is a submodule
if(NOT IS_DIRECTORY ${GIT_DIR})
file(READ ${GIT_DIR} submodule)
string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
endif()
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
if(NOT EXISTS "${GIT_DATA}")
file(MAKE_DIRECTORY "${GIT_DATA}")
endif()
if(NOT EXISTS "${GIT_DIR}/HEAD")
return()
endif()
set(HEAD_FILE "${GIT_DATA}/HEAD")
configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
configure_file("cmake/git_revision.cmake.in"
"${GIT_DATA}/grabRef.cmake"
@ONLY)
include("${GIT_DATA}/grabRef.cmake")
set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
endfunction()
function(git_describe _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
get_git_head_revision(refspec hash)
if(NOT GIT_FOUND)
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
return()
endif()
if(NOT hash)
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
return()
endif()
# TODO sanitize
#if((${ARGN}" MATCHES "&&") OR
# (ARGN MATCHES "||") OR
# (ARGN MATCHES "\\;"))
# message("Please report the following error to the project!")
# message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
#endif()
#message(STATUS "Arguments to execute_process: ${ARGN}")
execute_process(COMMAND
"${GIT_EXECUTABLE}"
describe
${hash}
${ARGN}
WORKING_DIRECTORY
"${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE
res
OUTPUT_VARIABLE
out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res EQUAL 0)
set(out "${out}-${res}-NOTFOUND")
endif()
set(${_var} "${out}" PARENT_SCOPE)
endfunction()
function(git_get_exact_tag _var)
git_describe(out --exact-match ${ARGN})
set(${_var} "${out}" PARENT_SCOPE)
endfunction()

View File

@@ -0,0 +1,38 @@
#
# Internal file for GetGitRevisionDescription.cmake
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2009-2010.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
set(HEAD_HASH)
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
if(HEAD_CONTENTS MATCHES "ref")
# named branch
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}")
configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
set(HEAD_HASH "${HEAD_REF}")
endif()
else()
# detached HEAD
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
endif()
if(NOT HEAD_HASH)
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
endif()

3
configure vendored
View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "There is no configure script, just run make"

244
cyg_portable.sh Normal file
View File

@@ -0,0 +1,244 @@
#! /bin/bash
#
cdir=$(pwd)
clear
printf "DSD-FME Digital Speech Decoder - Florida Man Edition Portable Cygwin Creator\n"
printf "Only use this in a Cygwin64 Environment. Will not work in a Linux Environment!\n"
read -p "Do you want to make a portable copy? y/N " RELEASE
RELEASE=$(printf "$RELEASE"|tr '[:upper:]' '[:lower:]')
if [ "$RELEASE" = "y" ]; then
printf "Copying files to dsd-fme-portable folder and making zip file. Please wait!\n"
cd ~
#create a dsd-fme-portable folder and copy all the needed items for a portable release version
mkdir dsd-fme-portable
cd dsd-fme-portable
#all of these folders may not be necessary
mkdir sourcecode
mkdir bin
mkdir dev
cd dev
mkdir shm
cd ..
mkdir dsd-fme
mkdir logs
mkdir WAV
mkdir etc
mkdir home
mkdir lib
mkdir tmp
mkdir usr
cd usr
mkdir share
cd share
mkdir terminfo
cd ~
#start copying things
#terminfo is needed for ncurses
cp -r /usr/share/terminfo/* dsd-fme-portable/usr/share/terminfo
#copy required items from the root bin folder to release bin folder
cp /bin/ls.exe dsd-fme-portable/bin/
cp /bin/bash.exe dsd-fme-portable/bin/
cp /bin/ncurses6-config dsd-fme-portable/bin/
cp /bin/ncursesw6-config dsd-fme-portable/bin/
cp /bin/pacat.exe dsd-fme-portable/bin/
cp /bin/pactl.exe dsd-fme-portable/bin/
cp /bin/padsp dsd-fme-portable/bin/
cp /bin/pamon dsd-fme-portable/bin/
cp /bin/paplay dsd-fme-portable/bin/
cp /bin/parec dsd-fme-portable/bin/
cp /bin/parecord dsd-fme-portable/bin/
cp /bin/pulseaudio.exe dsd-fme-portable/bin/
cp /bin/tty.exe dsd-fme-portable/bin/
#start copying things from the etc folder
cp -r /etc/pulse/ dsd-fme-portable/etc/
#start copying things to the lib folder
cp -r /lib/pulseaudio/ dsd-fme-portable/lib/
#start copying things into the dsd-fme folder
cp dsd-fme/build/dsd-fme.exe dsd-fme-portable/dsd-fme/
cp -r dsd-fme/examples dsd-fme-portable/dsd-fme/
cp .bash_profile dsd-fme-portable/dsd-fme/
cp .bashrc dsd-fme-portable/dsd-fme/
cp .inputrc dsd-fme-portable/dsd-fme/
cp .profile dsd-fme-portable/dsd-fme/
#move (cut) the bat files to the portable folder root and delete the other ones so users won't get confused
mv dsd-fme-portable/dsd-fme/examples/cygwin_bat/*.bat dsd-fme-portable/
mv dsd-fme-portable/dsd-fme/examples/cygwin_bat/example_options.txt dsd-fme-portable/
mv dsd-fme-portable/dsd-fme/examples/cygwin_bat/complete_usage_options.txt dsd-fme-portable/
rm -rf dsd-fme-portable/dsd-fme/examples/cygwin_bat
#change .bat files permissions to be read/write/executable by all users (for some reason, this is not preserved)
chmod 777 dsd-fme-portable/*.bat
#copy the license, copyright, source code, and things that should be included in all portable releases
cp dsd-fme/COPYRIGHT dsd-fme-portable/sourcecode/
cp dsd-fme/DSD_Author.pgp dsd-fme-portable/sourcecode/
cp dsd-fme/dsd-fme-qgis-map.qgz dsd-fme-portable/sourcecode/
cp dsd-fme/README.md dsd-fme-portable/sourcecode/
cp dsd-fme/dsd-fme2.png dsd-fme-portable/sourcecode/
cp dsd-fme/dsd-fme3.png dsd-fme-portable/sourcecode/
cp dsd-fme/CMakeLists.txt dsd-fme-portable/sourcecode/
cp -r dsd-fme/src dsd-fme-portable/sourcecode/
cp -r dsd-fme/include dsd-fme-portable/sourcecode/
cp -r dsd-fme/cmake dsd-fme-portable/sourcecode/
cp -r dsd-fme/patch dsd-fme-portable/sourcecode/
#compiled items into release dsd-fme folder
cp codec2/build/src/cygcodec2* dsd-fme-portable/dsd-fme/
cp rtl-sdr/build/src/cyg* dsd-fme-portable/dsd-fme/
cp mbelib/build/cygmbe* dsd-fme-portable/dsd-fme/
#bin items into release dsd-fme folder (uisng * where version numbering may exist, those may be upgraded if hard coded)
cp /bin/bash.exe dsd-fme-portable/dsd-fme/
cp /bin/cut.exe dsd-fme-portable/dsd-fme/
cp /bin/cygao* dsd-fme-portable/dsd-fme/
cp /bin/cygarchive* dsd-fme-portable/dsd-fme/
cp /bin/cygargp* dsd-fme-portable/dsd-fme/
cp /bin/cygassuan* dsd-fme-portable/dsd-fme/
cp /bin/cygasyncns* dsd-fme-portable/dsd-fme/
cp /bin/cygatomic* dsd-fme-portable/dsd-fme/
cp /bin/cygattr* dsd-fme-portable/dsd-fme/
cp /bin/cygavahi-client* dsd-fme-portable/dsd-fme/
cp /bin/cygavahi-common* dsd-fme-portable/dsd-fme/
cp /bin/cygavahi-wrap* dsd-fme-portable/dsd-fme/
cp /bin/cygblkid* dsd-fme-portable/dsd-fme/
cp /bin/cygbrotlicommon* dsd-fme-portable/dsd-fme/
cp /bin/cygbrotlidec* dsd-fme-portable/dsd-fme/
cp /bin/cygbz2* dsd-fme-portable/dsd-fme/
cp /bin/cygcares* dsd-fme-portable/dsd-fme/
cp /bin/cygcheck.exe dsd-fme-portable/dsd-fme/
cp /bin/cygcli.dll dsd-fme-portable/dsd-fme/
cp /bin/cygcom_err* dsd-fme-portable/dsd-fme/
cp /bin/cygcrypt* dsd-fme-portable/dsd-fme/
cp /bin/cygcrypto* dsd-fme-portable/dsd-fme/
cp /bin/cygcurl* dsd-fme-portable/dsd-fme/
cp /bin/cygdb_cxx* dsd-fme-portable/dsd-fme/
cp /bin/cygdb_sql* dsd-fme-portable/dsd-fme/
cp /bin/cygdb* dsd-fme-portable/dsd-fme/
cp /bin/cygdbus* dsd-fme-portable/dsd-fme/
cp /bin/cygedit* dsd-fme-portable/dsd-fme/
cp /bin/cygexpat* dsd-fme-portable/dsd-fme/
cp /bin/cygfdisk* dsd-fme-portable/dsd-fme/
cp /bin/cygffi* dsd-fme-portable/dsd-fme/
cp /bin/cygfftw3_threads* dsd-fme-portable/dsd-fme/
cp /bin/cygfftw3* dsd-fme-portable/dsd-fme/
cp /bin/cygfftw3f_threads* dsd-fme-portable/dsd-fme/
cp /bin/cygfftw3f* dsd-fme-portable/dsd-fme/
cp /bin/cygfftw3l_threads* dsd-fme-portable/dsd-fme/
cp /bin/cygfftw3l* dsd-fme-portable/dsd-fme/
cp /bin/cygfido2* dsd-fme-portable/dsd-fme/
cp /bin/cygFLAC* dsd-fme-portable/dsd-fme/
cp /bin/cygformw* dsd-fme-portable/dsd-fme/
cp /bin/cyggc* dsd-fme-portable/dsd-fme/
cp /bin/cyggdbm_compat* dsd-fme-portable/dsd-fme/
cp /bin/cyggdbm*.dll dsd-fme-portable/dsd-fme/
cp /bin/cyggio* dsd-fme-portable/dsd-fme/
cp /bin/cygglib* dsd-fme-portable/dsd-fme/
cp /bin/cyggmodule* dsd-fme-portable/dsd-fme/
cp /bin/cyggmp* dsd-fme-portable/dsd-fme/
cp /bin/cyggnutls* dsd-fme-portable/dsd-fme/
cp /bin/cyggobject* dsd-fme-portable/dsd-fme/
cp /bin/cyggomp* dsd-fme-portable/dsd-fme/
cp /bin/cyggpg-error* dsd-fme-portable/dsd-fme/
cp /bin/cyggpgme* dsd-fme-portable/dsd-fme/
cp /bin/cyggsm* dsd-fme-portable/dsd-fme/
cp /bin/cyggssapi_krb5* dsd-fme-portable/dsd-fme/
cp /bin/cyggthread* dsd-fme-portable/dsd-fme/
cp /bin/cygguile* dsd-fme-portable/dsd-fme/
cp /bin/cyghistory* dsd-fme-portable/dsd-fme/
cp /bin/cyghogweed* dsd-fme-portable/dsd-fme/
cp /bin/cygICE* dsd-fme-portable/dsd-fme/
cp /bin/cygiconv* dsd-fme-portable/dsd-fme/
cp /bin/cygid3tag* dsd-fme-portable/dsd-fme/
cp /bin/cygidn* dsd-fme-portable/dsd-fme/
cp /bin/cygintl* dsd-fme-portable/dsd-fme/
cp /bin/cygisl* dsd-fme-portable/dsd-fme/
cp /bin/cygjsoncpp* dsd-fme-portable/dsd-fme/
cp /bin/cygk5crypto* dsd-fme-portable/dsd-fme/
cp /bin/cygkrb5* dsd-fme-portable/dsd-fme/
cp /bin/cyglber* dsd-fme-portable/dsd-fme/
cp /bin/cygldap* dsd-fme-portable/dsd-fme/
cp /bin/cygltdl* dsd-fme-portable/dsd-fme/
cp /bin/cyglz* dsd-fme-portable/dsd-fme/
cp /bin/cygma* dsd-fme-portable/dsd-fme/
cp /bin/cygmenuw* dsd-fme-portable/dsd-fme/
cp /bin/cygmeta* dsd-fme-portable/dsd-fme/
cp /bin/cygmp* dsd-fme-portable/dsd-fme/
cp /bin/cygncurses* dsd-fme-portable/dsd-fme/
cp /bin/cygnettle* dsd-fme-portable/dsd-fme/
cp /bin/cygnghttp* dsd-fme-portable/dsd-fme/
cp /bin/cygobjc* dsd-fme-portable/dsd-fme/
cp /bin/cygogg* dsd-fme-portable/dsd-fme/
cp /bin/cygopus* dsd-fme-portable/dsd-fme/
cp /bin/cygorc* dsd-fme-portable/dsd-fme/
cp /bin/cygp11* dsd-fme-portable/dsd-fme/
cp /bin/cygpanel* dsd-fme-portable/dsd-fme/
cp /bin/cygpath.exe dsd-fme-portable/dsd-fme/
cp /bin/cygpcre* dsd-fme-portable/dsd-fme/
cp /bin/cygperl* dsd-fme-portable/dsd-fme/
cp /bin/cygpipe* dsd-fme-portable/dsd-fme/
cp /bin/cygpkg* dsd-fme-portable/dsd-fme/
cp /bin/cygpng* dsd-fme-portable/dsd-fme/
cp /bin/cygpopt* dsd-fme-portable/dsd-fme/
cp /bin/cygprotocol* dsd-fme-portable/dsd-fme/
cp /bin/cygpsl* dsd-fme-portable/dsd-fme/
cp /bin/cygpulse* dsd-fme-portable/dsd-fme/
cp /bin/cygquadmath* dsd-fme-portable/dsd-fme/
cp /bin/cygreadline* dsd-fme-portable/dsd-fme/
cp /bin/cygrhash* dsd-fme-portable/dsd-fme/
cp /bin/cygrunsrv.exe dsd-fme-portable/dsd-fme/
cp /bin/cygsamplerate* dsd-fme-portable/dsd-fme/
cp /bin/cygsasl* dsd-fme-portable/dsd-fme/
cp /bin/cygserver* dsd-fme-portable/dsd-fme/
cp /bin/cygSM* dsd-fme-portable/dsd-fme/
cp /bin/cygsmart* dsd-fme-portable/dsd-fme/
cp /bin/cygsndfile* dsd-fme-portable/dsd-fme/
cp /bin/cygsox* dsd-fme-portable/dsd-fme/
cp /bin/cygspeex* dsd-fme-portable/dsd-fme/
cp /bin/cygsqlite* dsd-fme-portable/dsd-fme/
cp /bin/cygssh* dsd-fme-portable/dsd-fme/
cp /bin/cygssl* dsd-fme-portable/dsd-fme/
cp /bin/cygstart.exe dsd-fme-portable/dsd-fme/
cp /bin/cygstdc* dsd-fme-portable/dsd-fme/
cp /bin/cygtasn* dsd-fme-portable/dsd-fme/
cp /bin/cygtdb* dsd-fme-portable/dsd-fme/
cp /bin/cygticw* dsd-fme-portable/dsd-fme/
cp /bin/cygtwo* dsd-fme-portable/dsd-fme/
cp /bin/cygunistring* dsd-fme-portable/dsd-fme/
cp /bin/cygusb* dsd-fme-portable/dsd-fme/
cp /bin/cyguuid* dsd-fme-portable/dsd-fme/
cp /bin/cyguv* dsd-fme-portable/dsd-fme/
cp /bin/cygvorbis* dsd-fme-portable/dsd-fme/
cp /bin/cygwavpack* dsd-fme-portable/dsd-fme/
cp /bin/cygwin1.dll dsd-fme-portable/dsd-fme/
cp /bin/cygwrap* dsd-fme-portable/dsd-fme/
cp /bin/cygX* dsd-fme-portable/dsd-fme/
cp /bin/cygx* dsd-fme-portable/dsd-fme/
cp /bin/cygz* dsd-fme-portable/dsd-fme/
cp /bin/grep.exe dsd-fme-portable/dsd-fme/
cp /bin/ls.exe dsd-fme-portable/dsd-fme/
cp /bin/mintty.exe dsd-fme-portable/dsd-fme/
cp /bin/pacat.exe dsd-fme-portable/dsd-fme/
cp /bin/pacmd.exe dsd-fme-portable/dsd-fme/
cp /bin/pactl.exe dsd-fme-portable/dsd-fme/
cp /bin/padsp dsd-fme-portable/dsd-fme/
cp /bin/pamon dsd-fme-portable/dsd-fme/
cp /bin/paplay dsd-fme-portable/dsd-fme/
cp /bin/parec dsd-fme-portable/dsd-fme/
cp /bin/pulseaudio.exe dsd-fme-portable/dsd-fme/
cp /bin/tail.exe dsd-fme-portable/dsd-fme/
cp /bin/touch.exe dsd-fme-portable/dsd-fme/
cp /bin/tty.exe dsd-fme-portable/dsd-fme/
zip -r dsd-fme-x86-64-cygwin-portable.zip dsd-fme-portable
fi

14
cyg_rebuild.sh Normal file
View File

@@ -0,0 +1,14 @@
#! /bin/bash
#
clear
printf "DSD-FME Digital Speech Decoder - Florida Man Edition
Automatic Git Pull and Rebuild for Cygwin\n\n"
sleep 1
##Open your clone folder##
git pull
sleep 2
##cd into your build folder##
cd build
cmake ..
make -j $(nproc)
make install

View File

@@ -1,251 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
void
processDMRdata (dsd_opts * opts, dsd_state * state)
{
int i, dibit;
int *dibit_p;
char sync[25];
char syncdata[25];
char cachdata[13];
char cc[5];
char bursttype[5];
#ifdef DMR_DUMP
int k;
char syncbits[49];
char cachbits[25];
#endif
cc[4] = 0;
bursttype[4] = 0;
dibit_p = state->dibit_buf_p - 90;
// CACH
for (i = 0; i < 12; i++)
{
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
cachdata[i] = dibit;
if (i == 2)
{
state->currentslot = (1 & (dibit >> 1)); // bit 1
if (state->currentslot == 0)
{
state->slot0light[0] = '[';
state->slot0light[6] = ']';
state->slot1light[0] = ' ';
state->slot1light[6] = ' ';
}
else
{
state->slot1light[0] = '[';
state->slot1light[6] = ']';
state->slot0light[0] = ' ';
state->slot0light[6] = ' ';
}
}
}
cachdata[12] = 0;
#ifdef DMR_DUMP
k = 0;
for (i = 0; i < 12; i++)
{
dibit = cachdata[i];
cachbits[k] = (1 & (dibit >> 1)) + 48; // bit 1
k++;
cachbits[k] = (1 & dibit) + 48; // bit 0
k++;
}
cachbits[24] = 0;
printf ("%s ", cachbits);
#endif
// current slot
dibit_p += 49;
// slot type
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
cc[0] = (1 & (dibit >> 1)) + 48; // bit 1
cc[1] = (1 & dibit) + 48; // bit 0
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
cc[2] = (1 & (dibit >> 1)) + 48; // bit 1
cc[3] = (1 & dibit) + 48; // bit 0
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
bursttype[0] = (1 & (dibit >> 1)) + 48; // bit 1
bursttype[1] = (1 & dibit) + 48; // bit 0
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
bursttype[2] = (1 & (dibit >> 1)) + 48; // bit 1
bursttype[3] = (1 & dibit) + 48; // bit 0
// parity bit
dibit_p++;
if (strcmp (bursttype, "0000") == 0)
{
sprintf (state->fsubtype, " PI Header ");
}
else if (strcmp (bursttype, "0001") == 0)
{
sprintf (state->fsubtype, " VOICE Header ");
}
else if (strcmp (bursttype, "0010") == 0)
{
sprintf (state->fsubtype, " TLC ");
}
else if (strcmp (bursttype, "0011") == 0)
{
sprintf (state->fsubtype, " CSBK ");
}
else if (strcmp (bursttype, "0100") == 0)
{
sprintf (state->fsubtype, " MBC Header ");
}
else if (strcmp (bursttype, "0101") == 0)
{
sprintf (state->fsubtype, " MBC ");
}
else if (strcmp (bursttype, "0110") == 0)
{
sprintf (state->fsubtype, " DATA Header ");
}
else if (strcmp (bursttype, "0111") == 0)
{
sprintf (state->fsubtype, " RATE 1/2 DATA");
}
else if (strcmp (bursttype, "1000") == 0)
{
sprintf (state->fsubtype, " RATE 3/4 DATA");
}
else if (strcmp (bursttype, "1001") == 0)
{
sprintf (state->fsubtype, " Slot idle ");
}
else if (strcmp (bursttype, "1010") == 0)
{
sprintf (state->fsubtype, " Rate 1 DATA ");
}
else
{
sprintf (state->fsubtype, " ");
}
// signaling data or sync
for (i = 0; i < 24; i++)
{
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
syncdata[i] = dibit;
sync[i] = (dibit | 1) + 48;
}
sync[24] = 0;
syncdata[24] = 0;
#ifdef DMR_DUMP
k = 0;
for (i = 0; i < 24; i++)
{
dibit = syncdata[i];
syncbits[k] = (1 & (dibit >> 1)) + 48; // bit 1
k++;
syncbits[k] = (1 & dibit) + 48; // bit 0
k++;
}
syncbits[48] = 0;
printf ("%s ", syncbits);
#endif
if (strcmp (sync, DMR_DATA_SYNC) == 0)
{
if (state->currentslot == 0)
{
sprintf (state->slot0light, "[slot0]");
}
else
{
sprintf (state->slot1light, "[slot1]");
}
}
else if (strcmp (sync, DMR_VOICE_SYNC) == 0)
{
if (state->currentslot == 0)
{
sprintf (state->slot0light, "[SLOT0]");
}
else
{
sprintf (state->slot1light, "[SLOT1]");
}
}
if (opts->errorbars == 1)
{
printf ("%s %s ", state->slot0light, state->slot1light);
}
// current slot second half, cach, next slot 1st half
skipDibit (opts, state, 120);
if (opts->errorbars == 1)
{
if (strcmp (state->fsubtype, " ") == 0)
{
printf (" Unknown burst type: %s\n", bursttype);
}
else
{
printf ("%s\n", state->fsubtype);
}
}
}

View File

@@ -1,376 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
#include "dmr_const.h"
void
processDMRvoice (dsd_opts * opts, dsd_state * state)
{
// extracts AMBE frames from DMR frame
int i, j, dibit;
int *dibit_p;
char ambe_fr[4][24];
char ambe_fr2[4][24];
char ambe_fr3[4][24];
const int *w, *x, *y, *z;
char sync[25];
char syncdata[25];
char cachdata[13];
int mutecurrentslot;
#ifdef DMR_DUMP
int k;
char syncbits[49];
char cachbits[25];
#endif
mutecurrentslot = 0;
dibit_p = state->dibit_buf_p - 144;
for (j = 0; j < 6; j++)
{
// 2nd half of previous slot
for (i = 0; i < 54; i++)
{
if (j > 0)
{
dibit = getDibit (opts, state);
}
else
{
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
}
}
// CACH
for (i = 0; i < 12; i++)
{
if (j > 0)
{
dibit = getDibit (opts, state);
}
else
{
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
}
cachdata[i] = dibit;
if (i == 2)
{
state->currentslot = (1 & (dibit >> 1)); // bit 1
if (state->currentslot == 0)
{
state->slot0light[0] = '[';
state->slot0light[6] = ']';
state->slot1light[0] = ' ';
state->slot1light[6] = ' ';
}
else
{
state->slot1light[0] = '[';
state->slot1light[6] = ']';
state->slot0light[0] = ' ';
state->slot0light[6] = ' ';
}
}
}
cachdata[12] = 0;
#ifdef DMR_DUMP
k = 0;
for (i = 0; i < 12; i++)
{
dibit = cachdata[i];
cachbits[k] = (1 & (dibit >> 1)) + 48; // bit 1
k++;
cachbits[k] = (1 & dibit) + 48; // bit 0
k++;
}
cachbits[24] = 0;
printf ("%s ", cachbits);
#endif
// current slot frame 1
w = rW;
x = rX;
y = rY;
z = rZ;
for (i = 0; i < 36; i++)
{
if (j > 0)
{
dibit = getDibit (opts, state);
}
else
{
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
}
ambe_fr[*w][*x] = (1 & (dibit >> 1)); // bit 1
ambe_fr[*y][*z] = (1 & dibit); // bit 0
w++;
x++;
y++;
z++;
}
// current slot frame 2 first half
w = rW;
x = rX;
y = rY;
z = rZ;
for (i = 0; i < 18; i++)
{
if (j > 0)
{
dibit = getDibit (opts, state);
}
else
{
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
}
ambe_fr2[*w][*x] = (1 & (dibit >> 1)); // bit 1
ambe_fr2[*y][*z] = (1 & dibit); // bit 0
w++;
x++;
y++;
z++;
}
// signaling data or sync
for (i = 0; i < 24; i++)
{
if (j > 0)
{
dibit = getDibit (opts, state);
}
else
{
dibit = *dibit_p;
dibit_p++;
if (opts->inverted_dmr == 1)
{
dibit = (dibit ^ 2);
}
}
syncdata[i] = dibit;
sync[i] = (dibit | 1) + 48;
}
sync[24] = 0;
syncdata[24] = 0;
if (strcmp (sync, DMR_DATA_SYNC) == 0)
{
mutecurrentslot = 1;
if (state->currentslot == 0)
{
sprintf (state->slot0light, "[slot0]");
}
else
{
sprintf (state->slot1light, "[slot1]");
}
}
else if (strcmp (sync, DMR_VOICE_SYNC) == 0)
{
mutecurrentslot = 0;
if (state->currentslot == 0)
{
sprintf (state->slot0light, "[SLOT0]");
}
else
{
sprintf (state->slot1light, "[SLOT1]");
}
}
if ((j == 0) && (opts->errorbars == 1))
{
printf ("%s %s VOICE e:", state->slot0light, state->slot1light);
}
#ifdef DMR_DUMP
k = 0;
for (i = 0; i < 24; i++)
{
dibit = syncdata[i];
syncbits[k] = (1 & (dibit >> 1)) + 48; // bit 1
k++;
syncbits[k] = (1 & dibit) + 48; // bit 0
k++;
}
syncbits[48] = 0;
printf ("%s ", syncbits);
#endif
// current slot frame 2 second half
for (i = 0; i < 18; i++)
{
dibit = getDibit (opts, state);
ambe_fr2[*w][*x] = (1 & (dibit >> 1)); // bit 1
ambe_fr2[*y][*z] = (1 & dibit); // bit 0
w++;
x++;
y++;
z++;
}
if (mutecurrentslot == 0)
{
if (state->firstframe == 1)
{ // we don't know if anything received before the first sync after no carrier is valid
state->firstframe = 0;
}
else
{
processMbeFrame (opts, state, NULL, ambe_fr, NULL);
processMbeFrame (opts, state, NULL, ambe_fr2, NULL);
}
}
// current slot frame 3
w = rW;
x = rX;
y = rY;
z = rZ;
for (i = 0; i < 36; i++)
{
dibit = getDibit (opts, state);
ambe_fr3[*w][*x] = (1 & (dibit >> 1)); // bit 1
ambe_fr3[*y][*z] = (1 & dibit); // bit 0
w++;
x++;
y++;
z++;
}
if (mutecurrentslot == 0)
{
processMbeFrame (opts, state, NULL, ambe_fr3, NULL);
}
// CACH
for (i = 0; i < 12; i++)
{
dibit = getDibit (opts, state);
cachdata[i] = dibit;
}
cachdata[12] = 0;
#ifdef DMR_DUMP
k = 0;
for (i = 0; i < 12; i++)
{
dibit = cachdata[i];
cachbits[k] = (1 & (dibit >> 1)) + 48; // bit 1
k++;
cachbits[k] = (1 & dibit) + 48; // bit 0
k++;
}
cachbits[24] = 0;
printf ("%s ", cachbits);
#endif
// next slot
skipDibit (opts, state, 54);
// signaling data or sync
for (i = 0; i < 24; i++)
{
dibit = getDibit (opts, state);
syncdata[i] = dibit;
sync[i] = (dibit | 1) + 48;
}
sync[24] = 0;
syncdata[24] = 0;
if (strcmp (sync, DMR_DATA_SYNC) == 0)
{
if (state->currentslot == 0)
{
sprintf (state->slot1light, " slot1 ");
}
else
{
sprintf (state->slot0light, " slot0 ");
}
}
else if (strcmp (sync, DMR_VOICE_SYNC) == 0)
{
if (state->currentslot == 0)
{
sprintf (state->slot1light, " SLOT1 ");
}
else
{
sprintf (state->slot0light, " SLOT0 ");
}
}
#ifdef DMR_DUMP
k = 0;
for (i = 0; i < 24; i++)
{
dibit = syncdata[i];
syncbits[k] = (1 & (dibit >> 1)) + 48; // bit 1
k++;
syncbits[k] = (1 & dibit) + 48; // bit 0
k++;
}
syncbits[48] = 0;
printf ("%s ", syncbits);
#endif
if (j == 5)
{
// 2nd half next slot
skipDibit (opts, state, 54);
// CACH
skipDibit (opts, state, 12);
// first half current slot
skipDibit (opts, state, 54);
}
}
if (opts->errorbars == 1)
{
printf ("\n");
}
}

View File

@@ -0,0 +1,47 @@
#! /bin/bash
#
cdir=$(pwd)
clear
printf "Digital Speech Decoder: Florida Man Edition - Auto Installer For Arch Linux\n
This will install the required packages, clone, build, and install DSD-FME only.
This has been tested on Arch 2023.08.01 and Manjaro XFCE 22.1.3 Minimal.\n
MBELib is considered a requirement on this build.
You must view the Patent Notice prior to continuing.
The Patent Notice can be found at the site below.
https://github.com/lwvmobile/mbelib#readme
Please confirm that you have viewed the patent notice by entering y below.\n\n"
read -p "Have you viewed the patent notice? y/N " ANSWER
ANSWER=$(printf "$ANSWER"|tr '[:upper:]' '[:lower:]')
if [ "$ANSWER" = "y" ]; then
sudo pacman -Syu #always run a full update first, partial upgrades aren't supported in Arch -- including downloading dependencies, that may require an updated dependency, and breaks same dependency on another package, a.k.a, dependency hell
sudo pacman -S libpulse cmake ncurses lapack perl fftw rtl-sdr codec2 base-devel libsndfile git wget
git clone https://github.com/lwvmobile/mbelib
cd mbelib
git checkout ambe_tones
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
sudo ldconfig
sudo cp /usr/local/lib/libmbe.so /usr/lib/libmbe.so
cd $cdir
git clone https://github.com/lwvmobile/dsd-fme
### For branch audio_work - git clone --branch audio_work https://github.com/lwvmobile/dsd-fme
cd dsd-fme
#git checkout audio_work
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
sudo ldconfig
printf "Any issues, Please report to either:\nhttps://github.com/lwvmobile/dsd-fme/issues or\nhttps://forums.radioreference.com/threads/dsd-fme.438137/\n\n"
else
printf "Sorry, you cannot build DSD-FME without acknowledging the Patent Notice.\n\n"
fi

View File

@@ -0,0 +1,77 @@
#! /bin/bash
#
cdir=$(pwd)
clear
printf "Digital Speech Decoder: Florida Man Edition - Auto Installer For Cygwin\n
This will install the required packages, clone, build, and install DSD-FME only.
This has been tested on Cygwin x86-64 as of 20250211. This may take a while!\n
MBELib is considered a requirement on this build.
You must view the Patent Notice prior to continuing.
The Patent Notice can be found at the site below.
https://github.com/lwvmobile/mbelib#readme
Please confirm that you have viewed the patent notice by entering y below.\n\n"
read -p "Have you viewed the patent notice? y/N " ANSWER
ANSWER=$(printf "$ANSWER"|tr '[:upper:]' '[:lower:]')
if [ "$ANSWER" = "y" ]; then
#is this needed?
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
#MBELIB
cd $cdir
printf "Installing mbelib\n Please wait!\n"
git clone https://github.com/lwvmobile/mbelib.git
cd mbelib
git checkout ambe_tones
mkdir build
cd build
cmake ..
make -j $(nproc)
make install
cp cygmbe-1.dll /bin
#CODEC2
cd $cdir
printf "Installing codec2\n Please wait!\n"
git clone https://github.com/drowe67/codec2.git
cd codec2
mkdir build
cd build
cmake ..
make -j $(nproc)
make install
#RTL-SDR
cd $cdir
printf "Installing RTL-SDR\n Please wait!\n"
git clone https://github.com/lwvmobile/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ..
make -j $(nproc)
make install
#DSD-FME
cd $cdir
printf "Installing DSD-FME\n Please wait!\n"
git clone https://github.com/lwvmobile/dsd-fme.git
cd dsd-fme
#git checkout aw_dev
mkdir build
cd build
cmake -DCOLORSLOGS=OFF ..
make -j $(nproc)
make install
cd $cdir
#call the cyg_portable script
sh dsd-fme/cyg_portable.sh
printf "Any issues, Please report to either:\nhttps://github.com/lwvmobile/dsd-fme/issues or\nhttps://forums.radioreference.com/threads/dsd-fme.438137/\n\n"
else
printf "Sorry, you cannot build DSD-FME without acknowledging the Patent Notice.\n\n"
fi

View File

@@ -0,0 +1,17 @@
#! /bin/bash
clear
printf "\nDigital Speech Decoder: Florida Man Edition - Auto Installer\n
This will clone, build, and install DSD-FME only.
If DSD-FME has never been installed on this machine,
then you will need to install the dependencies first!
Please run download-and-install.sh instead.\n\n"
read -p "Press Enter to continue..." x
git clone https://github.com/lwvmobile/dsd-fme
cd dsd-fme
#git checkout audio_work
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
sudo ldconfig

View File

@@ -0,0 +1,38 @@
#! /bin/bash
#
cdir=$(pwd)
clear
printf "Digital Speech Decoder: Florida Man Edition - Auto Installer\n
MBELib is considered a requirement on this build.
You must view the Patent Notice prior to continuing.
The Patent Notice can be found at the site below.
https://github.com/lwvmobile/mbelib#readme
Please confirm that you have viewed the patent notice by entering y below:\n\n"
read -p "Have you viewed the patent notice? y/N " ANSWER
ANSWER=$(printf "$ANSWER"|tr '[:upper:]' '[:lower:]')
if [ "$ANSWER" = "y" ]; then
sudo apt update
sudo apt install libpulse-dev libsndfile1-dev libfftw3-dev liblapack-dev socat libusb-1.0-0-dev rtl-sdr librtlsdr-dev libusb-1.0-0-dev cmake git wget make build-essential libncurses-dev libncurses6 libcodec2-dev
git clone https://github.com/lwvmobile/mbelib
cd mbelib
git checkout ambe_tones
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
sudo ldconfig
cd $cdir
git clone https://github.com/lwvmobile/dsd-fme
cd dsd-fme
#git checkout audio_work
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
sudo ldconfig
else
printf "\nSorry, you cannot build DSD-FME without acknowledging the Patent Notice.\nExiting...\n\n"
exit 2
fi

38
download-and-install.sh Normal file
View File

@@ -0,0 +1,38 @@
#! /bin/bash
#
cdir=$(pwd)
clear
printf "Digital Speech Decoder: Florida Man Edition - Auto Installer\n
MBELib is considered a requirement on this build.
You must view the Patent Notice prior to continuing.
The Patent Notice can be found at the site below.
https://github.com/lwvmobile/mbelib#readme
Please confirm that you have viewed the patent notice by entering y below:\n\n"
read -p "Have you viewed the patent notice? y/N " ANSWER
ANSWER=$(printf "$ANSWER"|tr '[:upper:]' '[:lower:]')
if [ "$ANSWER" = "y" ]; then
sudo apt update
sudo apt install libpulse-dev libsndfile1-dev libfftw3-dev liblapack-dev socat libusb-1.0-0-dev libncurses5 libncurses5-dev rtl-sdr librtlsdr-dev libusb-1.0-0-dev cmake git wget make build-essential libncursesw5-dev libcodec2-dev
git clone https://github.com/lwvmobile/mbelib
cd mbelib
git checkout ambe_tones
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
sudo ldconfig
cd $cdir
git clone https://github.com/lwvmobile/dsd-fme
cd dsd-fme
#git checkout audio_work
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
sudo ldconfig
else
printf "\nSorry, you cannot build DSD-FME without acknowledging the Patent Notice.\nExiting...\n\n"
exit 2
fi

BIN
dsd-fme-qgis-map.qgz Normal file

Binary file not shown.

BIN
dsd-fme2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 KiB

BIN
dsd-fme3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

218
dsd.h
View File

@@ -1,218 +0,0 @@
/*
* 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.
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define __USE_XOPEN
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#ifdef SOLARIS
#include <sys/audioio.h>
#endif
#ifdef BSD
#include <sys/soundcard.h>
#endif
#include <math.h>
#include <mbelib.h>
typedef struct
{
int onesymbol;
char mbe_in_file[1024];
FILE *mbe_in_f;
int errorbars;
int datascope;
int symboltiming;
int verbose;
int p25enc;
int p25lc;
int p25status;
int p25tg;
int scoperate;
char audio_in_dev[1024];
int audio_in_fd;
char audio_out_dev[1024];
int audio_out_fd;
int split;
int playoffset;
char mbe_out_dir[1024];
char mbe_out_file[1024];
FILE *mbe_out_f;
float audio_gain;
int audio_out;
char wav_out_file[1024];
FILE *wav_out_f;
int wav_out_fd;
int serial_baud;
char serial_dev[1024];
int serial_fd;
int resume;
int frame_dstar;
int frame_x2tdma;
int frame_p25p1;
int frame_nxdn;
int frame_dmr;
int frame_provoice;
int mod_c4fm;
int mod_qpsk;
int mod_gfsk;
int uvquality;
int inverted_x2tdma;
int inverted_dmr;
int mod_threshold;
int ssize;
int msize;
int playfiles;
int delay;
} dsd_opts;
typedef struct
{
int *dibit_buf;
int *dibit_buf_p;
int repeat;
short *audio_out_buf;
short *audio_out_buf_p;
float *audio_out_float_buf;
float *audio_out_float_buf_p;
float audio_out_temp_buf[160];
float *audio_out_temp_buf_p;
int audio_out_idx;
int audio_out_idx2;
int center;
int jitter;
int synctype;
int min;
int max;
int lmid;
int umid;
int minref;
int maxref;
int lastsample;
int sbuf[128];
int sidx;
int maxbuf[1024];
int minbuf[1024];
int midx;
char err_str[64];
char fsubtype[16];
char ftype[16];
int symbolcnt;
int rf_mod;
int numflips;
int lastsynctype;
int lastp25type;
int offset;
int carrier;
char tg[25][16];
int tgcount;
int lasttg;
int lastsrc;
int nac;
int errs;
int errs2;
int mbe_file_type;
int optind;
int numtdulc;
int firstframe;
char slot0light[8];
char slot1light[8];
float aout_gain;
float aout_max_buf[200];
float *aout_max_buf_p;
int aout_max_buf_idx;
int samplesPerSymbol;
int symbolCenter;
char algid[9];
char keyid[17];
int currentslot;
mbe_parms *cur_mp;
mbe_parms *prev_mp;
mbe_parms *prev_mp_enhanced;
} dsd_state;
/*
* Frame sync patterns
*/
#define INV_FRAME_SYNC "333331331133111131311111"
#define FRAME_SYNC "111113113311333313133333"
#define X2TDMA_VOICE_SYNC "113131333331313331113311"
#define X2TDMA_DATA_SYNC "331313111113131113331133"
#define DSTAR_SYNC "313131313133131113313111"
#define INV_DSTAR_SYNC "131313131311313331131333"
#define INV_NXDN96_SYNC "313133113131111333"
#define NXDN96_SYNC "131311331313333111"
#define DMR_DATA_SYNC "313333111331131131331131"
#define DMR_VOICE_SYNC "131111333113313313113313"
#define INV_PROVOICE_SYNC "31313111333133133311331133113311"
#define PROVOICE_SYNC "13131333111311311133113311331133"
/*
* function prototypes
*/
void processDMRdata (dsd_opts * opts, dsd_state * state);
void processDMRvoice (dsd_opts * opts, dsd_state * state);
void processAudio (dsd_opts * opts, dsd_state * state);
void writeSynthesizedVoice (dsd_opts * opts, dsd_state * state);
void playSynthesizedVoice (dsd_opts * opts, dsd_state * state);
void openAudioOutDevice (dsd_opts * opts, int speed);
void openAudioInDevice (dsd_opts * opts);
int getDibit (dsd_opts * opts, dsd_state * state);
void skipDibit (dsd_opts * opts, dsd_state * state, int count);
void saveImbe4400Data (dsd_opts * opts, dsd_state * state, char *imbe_d);
void saveAmbe2250Data (dsd_opts * opts, dsd_state * state, char *ambe_d);
int readImbe4400Data (dsd_opts * opts, dsd_state * state, char *imbe_d);
int readAmbe2250Data (dsd_opts * opts, dsd_state * state, char *ambe_d);
void openMbeInFile (dsd_opts * opts, dsd_state * state);
void closeMbeOutFile (dsd_opts * opts, dsd_state * state);
void openMbeOutFile (dsd_opts * opts, dsd_state * state);
void openWavOutFile (dsd_opts * opts, dsd_state * state);
void printFrameInfo (dsd_opts * opts, dsd_state * state);
void processFrame (dsd_opts * opts, dsd_state * state);
void printFrameSync (dsd_opts * opts, dsd_state * state, char *frametype, int offset, char *modulation);
int getFrameSync (dsd_opts * opts, dsd_state * state);
int comp (const void *a, const void *b);
void noCarrier (dsd_opts * opts, dsd_state * state);
void initOpts (dsd_opts * opts);
void initState (dsd_state * state);
void usage ();
void liveScanner (dsd_opts * opts, dsd_state * state);
int main (int argc, char **argv);
void playMbeFiles (dsd_opts * opts, dsd_state * state, int argc, char **argv);
void processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char ambe_fr[4][24], char imbe7100_fr[7][24]);
void openSerial (dsd_opts * opts, dsd_state * state);
void resumeScan (dsd_opts * opts, dsd_state * state);
int getSymbol (dsd_opts * opts, dsd_state * state, int have_sync);
void upsample (dsd_state * state, float invalue);
void processDSTAR (dsd_opts * opts, dsd_state * state);
void processNXDN96 (dsd_opts * opts, dsd_state * state);
void processP25lcw (dsd_opts * opts, dsd_state * state, char *lcformat, char *mfid, char *lcinfo);
void processHDU (dsd_opts * opts, dsd_state * state);
void processLDU1 (dsd_opts * opts, dsd_state * state);
void processLDU2 (dsd_opts * opts, dsd_state * state);
void processTDULC (dsd_opts * opts, dsd_state * state);
void processProVoice (dsd_opts * opts, dsd_state * state);
void processX2TDMAdata (dsd_opts * opts, dsd_state * state);
void processX2TDMAvoice (dsd_opts * opts, dsd_state * state);

View File

@@ -1,365 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
void
processAudio (dsd_opts * opts, dsd_state * state)
{
int i, n;
float aout_abs, max, gainfactor, gaindelta, maxbuf;
if (opts->audio_gain == (float) 0)
{
// detect max level
max = 0;
state->audio_out_temp_buf_p = state->audio_out_temp_buf;
for (n = 0; n < 160; n++)
{
aout_abs = fabsf (*state->audio_out_temp_buf_p);
if (aout_abs > max)
{
max = aout_abs;
}
state->audio_out_temp_buf_p++;
}
*state->aout_max_buf_p = max;
state->aout_max_buf_p++;
state->aout_max_buf_idx++;
if (state->aout_max_buf_idx > 74)
{
state->aout_max_buf_idx = 0;
state->aout_max_buf_p = state->aout_max_buf;
}
// lookup max history
for (i = 0; i < 75; i++)
{
maxbuf = state->aout_max_buf[i];
if (maxbuf > max)
{
max = maxbuf;
}
}
// determine optimal gain level
if (max > (float) 0)
{
gainfactor = ((float) 30000 / max);
}
else
{
gainfactor = (float) 50;
}
if (gainfactor < state->aout_gain)
{
state->aout_gain = gainfactor;
gaindelta = (float) 0;
}
else
{
if (gainfactor > (float) 50)
{
gainfactor = (float) 50;
}
gaindelta = gainfactor - state->aout_gain;
if (gaindelta > ((float) 0.05 * state->aout_gain))
{
gaindelta = ((float) 0.05 * state->aout_gain);
}
}
gaindelta /= (float) 160;
}
else
{
gaindelta = (float) 0;
}
// adjust output gain
state->audio_out_temp_buf_p = state->audio_out_temp_buf;
for (n = 0; n < 160; n++)
{
*state->audio_out_temp_buf_p = (state->aout_gain + ((float) n * gaindelta)) * (*state->audio_out_temp_buf_p);
state->audio_out_temp_buf_p++;
}
state->aout_gain += ((float) 160 * gaindelta);
// copy audio datat to output buffer and upsample if necessary
state->audio_out_temp_buf_p = state->audio_out_temp_buf;
if (opts->split == 0)
{
for (n = 0; n < 160; n++)
{
upsample (state, *state->audio_out_temp_buf_p);
state->audio_out_temp_buf_p++;
state->audio_out_float_buf_p += 6;
state->audio_out_idx += 6;
state->audio_out_idx2 += 6;
}
state->audio_out_float_buf_p -= (960 + opts->playoffset);
// copy to output (short) buffer
for (n = 0; n < 960; n++)
{
if (*state->audio_out_float_buf_p > (float) 32760)
{
*state->audio_out_float_buf_p = (float) 32760;
}
else if (*state->audio_out_float_buf_p < (float) -32760)
{
*state->audio_out_float_buf_p = (float) -32760;
}
*state->audio_out_buf_p = (short) *state->audio_out_float_buf_p;
state->audio_out_buf_p++;
state->audio_out_float_buf_p++;
}
state->audio_out_float_buf_p += opts->playoffset;
}
else
{
for (n = 0; n < 160; n++)
{
if (*state->audio_out_temp_buf_p > (float) 32760)
{
*state->audio_out_temp_buf_p = (float) 32760;
}
else if (*state->audio_out_temp_buf_p < (float) -32760)
{
*state->audio_out_temp_buf_p = (float) -32760;
}
*state->audio_out_buf_p = (short) *state->audio_out_temp_buf_p;
state->audio_out_buf_p++;
state->audio_out_temp_buf_p++;
state->audio_out_idx++;
state->audio_out_idx2++;
}
}
}
void
writeSynthesizedVoice (dsd_opts * opts, dsd_state * state)
{
int n;
short aout_buf[160];
short *aout_buf_p;
aout_buf_p = aout_buf;
state->audio_out_temp_buf_p = state->audio_out_temp_buf;
for (n = 0; n < 160; n++)
{
if (*state->audio_out_temp_buf_p > (float) 32760)
{
*state->audio_out_temp_buf_p = (float) 32760;
}
else if (*state->audio_out_temp_buf_p < (float) -32760)
{
*state->audio_out_temp_buf_p = (float) -32760;
}
*aout_buf_p = (short) *state->audio_out_temp_buf_p;
aout_buf_p++;
state->audio_out_temp_buf_p++;
}
write (opts->wav_out_fd, aout_buf, 320);
fflush (opts->wav_out_f);
}
void
playSynthesizedVoice (dsd_opts * opts, dsd_state * state)
{
if (state->audio_out_idx > opts->delay)
{
// output synthesized speech to sound card
write (opts->audio_out_fd, (state->audio_out_buf_p - state->audio_out_idx), (state->audio_out_idx * 2));
state->audio_out_idx = 0;
}
if (state->audio_out_idx2 >= 800000)
{
state->audio_out_float_buf_p = state->audio_out_float_buf + 100;
state->audio_out_buf_p = state->audio_out_buf + 100;
memset (state->audio_out_float_buf, 0, 100 * sizeof (float));
memset (state->audio_out_buf, 0, 100 * sizeof (short));
state->audio_out_idx2 = 0;
}
}
void
openAudioOutDevice (dsd_opts * opts, int speed)
{
#ifdef SOLARIS
sample_info_t aset, aget;
opts->audio_out_fd = open (opts->audio_out_dev, O_WRONLY);
if (opts->audio_out_fd == -1)
{
printf ("Error, couldn't open %s\n", opts->audio_out_dev);
exit (1);
}
// get current
ioctl (opts->audio_out_fd, AUDIO_GETINFO, &aset);
aset.record.sample_rate = speed;
aset.play.sample_rate = speed;
aset.record.channels = 1;
aset.play.channels = 1;
aset.record.precision = 16;
aset.play.precision = 16;
aset.record.encoding = AUDIO_ENCODING_LINEAR;
aset.play.encoding = AUDIO_ENCODING_LINEAR;
if (ioctl (opts->audio_out_fd, AUDIO_SETINFO, &aset) == -1)
{
printf ("Error setting sample device parameters\n");
exit (1);
}
#endif
#ifdef BSD
int fmt;
opts->audio_out_fd = open (opts->audio_out_dev, O_WRONLY);
if (opts->audio_out_fd == -1)
{
printf ("Error, couldn't open %s\n", opts->audio_out_dev);
opts->audio_out = 0;
}
fmt = 0;
if (ioctl (opts->audio_out_fd, SNDCTL_DSP_RESET) < 0)
{
printf ("ioctl reset error \n");
}
fmt = speed;
if (ioctl (opts->audio_out_fd, SNDCTL_DSP_SPEED, &fmt) < 0)
{
printf ("ioctl speed error \n");
}
fmt = 0;
if (ioctl (opts->audio_out_fd, SNDCTL_DSP_STEREO, &fmt) < 0)
{
printf ("ioctl stereo error \n");
}
fmt = AFMT_S16_LE;
if (ioctl (opts->audio_out_fd, SNDCTL_DSP_SETFMT, &fmt) < 0)
{
printf ("ioctl setfmt error \n");
}
#endif
printf ("Audio Out Device: %s\n", opts->audio_out_dev);
}
void
openAudioInDevice (dsd_opts * opts)
{
#ifdef SOLARIS
sample_info_t aset, aget;
int rgain;
rgain = 64;
if (opts->split == 1)
{
opts->audio_in_fd = open (opts->audio_in_dev, O_RDONLY);
}
else
{
opts->audio_in_fd = open (opts->audio_in_dev, O_RDWR);
}
if (opts->audio_in_fd == -1)
{
printf ("Error, couldn't open /dev/audio\n");
}
// get current
ioctl (opts->audio_in_fd, AUDIO_GETINFO, &aset);
aset.record.sample_rate = 48000;
aset.play.sample_rate = 48000;
aset.record.channels = 1;
aset.play.channels = 1;
aset.record.precision = 16;
aset.play.precision = 16;
aset.record.encoding = AUDIO_ENCODING_LINEAR;
aset.play.encoding = AUDIO_ENCODING_LINEAR;
aset.record.port = AUDIO_LINE_IN;
aset.record.gain = rgain;
if (ioctl (opts->audio_in_fd, AUDIO_SETINFO, &aset) == -1)
{
printf ("Error setting sample device parameters\n");
exit (1);
}
#endif
#ifdef BSD
int fmt;
if (opts->split == 1)
{
opts->audio_in_fd = open (opts->audio_in_dev, O_RDONLY);
}
else
{
opts->audio_in_fd = open (opts->audio_in_dev, O_RDWR);
}
if (opts->audio_in_fd == -1)
{
printf ("Error, couldn't open %s\n", opts->audio_in_dev);
opts->audio_out = 0;
}
fmt = 0;
if (ioctl (opts->audio_in_fd, SNDCTL_DSP_RESET) < 0)
{
printf ("ioctl reset error \n");
}
fmt = 48000;
if (ioctl (opts->audio_in_fd, SNDCTL_DSP_SPEED, &fmt) < 0)
{
printf ("ioctl speed error \n");
}
fmt = 0;
if (ioctl (opts->audio_in_fd, SNDCTL_DSP_STEREO, &fmt) < 0)
{
printf ("ioctl stereo error \n");
}
fmt = AFMT_S16_LE;
if (ioctl (opts->audio_in_fd, SNDCTL_DSP_SETFMT, &fmt) < 0)
{
printf ("ioctl setfmt error \n");
}
#endif
if (opts->split == 1)
{
printf ("Audio In Device: %s\n", opts->audio_in_dev);
}
else
{
printf ("Audio In/Out Device: %s\n", opts->audio_in_dev);
}
}

View File

@@ -1,290 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
int
getDibit (dsd_opts * opts, dsd_state * state)
{
// returns one dibit value
int i, j, o, symbol;
int sbuf2[128];
int spectrum[64];
char modulation[8];
int lmin, lmax, lsum;
state->numflips = 0;
symbol = getSymbol (opts, state, 1);
state->sbuf[state->sidx] = symbol;
for (i = 0; i < opts->ssize; i++)
{
sbuf2[i] = state->sbuf[i];
}
qsort (sbuf2, opts->ssize, sizeof (int), comp);
// continuous update of min/max in rf_mod=1 (QPSK) mode
// in c4fm min/max must only be updated during sync
if (state->rf_mod == 1)
{
lmin = (sbuf2[0] + sbuf2[1]) / 2;
lmax = (sbuf2[(opts->ssize - 1)] + sbuf2[(opts->ssize - 2)]) / 2;
state->minbuf[state->midx] = lmin;
state->maxbuf[state->midx] = lmax;
if (state->midx == (opts->msize - 1))
{
state->midx = 0;
}
else
{
state->midx++;
}
lsum = 0;
for (i = 0; i < opts->msize; i++)
{
lsum += state->minbuf[i];
}
state->min = lsum / opts->msize;
lsum = 0;
for (i = 0; i < opts->msize; i++)
{
lsum += state->maxbuf[i];
}
state->max = lsum / opts->msize;
state->center = ((state->max) + (state->min)) / 2;
state->umid = (((state->max) - state->center) * 5 / 8) + state->center;
state->lmid = (((state->min) - state->center) * 5 / 8) + state->center;
state->maxref = ((state->max) * 0.80);
state->minref = ((state->min) * 0.80);
}
else
{
state->maxref = state->max;
state->minref = state->min;
}
if (state->sidx == (opts->ssize - 1))
{
state->sidx = 0;
if (opts->datascope == 1)
{
if (state->rf_mod == 0)
{
sprintf (modulation, "C4FM");
}
else if (state->rf_mod == 1)
{
sprintf (modulation, "QPSK");
}
else if (state->rf_mod == 2)
{
sprintf (modulation, "GFSK");
}
for (i = 0; i < 64; i++)
{
spectrum[i] = 0;
}
for (i = 0; i < opts->ssize; i++)
{
o = (sbuf2[i] + 32768) / 1024;
spectrum[o]++;
}
if (state->symbolcnt > (4800 / opts->scoperate))
{
state->symbolcnt = 0;
printf ("\n");
printf ("Demod mode: %s Nac: %4X\n", modulation, state->nac);
printf ("Frame Type: %s Talkgroup: %7i\n", state->ftype, state->lasttg);
printf ("Frame Subtype: %s Source: %12i\n", state->fsubtype, state->lastsrc);
printf ("TDMA activity: %s %s Voice errors: %s\n", state->slot0light, state->slot1light, state->err_str);
printf ("+----------------------------------------------------------------+\n");
for (i = 0; i < 10; i++)
{
printf ("|");
for (j = 0; j < 64; j++)
{
if (i == 0)
{
if ((j == ((state->min) + 32768) / 1024) || (j == ((state->max) + 32768) / 1024))
{
printf ("#");
}
else if ((j == ((state->lmid) + 32768) / 1024) || (j == ((state->umid) + 32768) / 1024))
{
printf ("^");
}
else if (j == (state->center + 32768) / 1024)
{
printf ("!");
}
else
{
if (j == 32)
{
printf ("|");
}
else
{
printf (" ");
}
}
}
else
{
if (spectrum[j] > 9 - i)
{
printf ("*");
}
else
{
if (j == 32)
{
printf ("|");
}
else
{
printf (" ");
}
}
}
}
printf ("|\n");
}
printf ("+----------------------------------------------------------------+\n");
}
}
}
else
{
state->sidx++;
}
// determine dibit state
if ((state->synctype == 6) || (state->synctype == 14))
{
if (symbol > state->center)
{
*state->dibit_buf_p = 1;
state->dibit_buf_p++;
return (0);
}
else
{
*state->dibit_buf_p = 3;
state->dibit_buf_p++;
return (1);
}
}
else if ((state->synctype == 7) || (state->synctype == 15))
{
if (symbol > state->center)
{
*state->dibit_buf_p = 1;
state->dibit_buf_p++;
return (1);
}
else
{
*state->dibit_buf_p = 3;
state->dibit_buf_p++;
return (0);
}
}
else if ((state->synctype == 1) || (state->synctype == 3) || (state->synctype == 5) || (state->synctype == 9) || (state->synctype == 11) || (state->synctype == 13))
{
if (symbol > state->center)
{
if (symbol > state->umid)
{
*state->dibit_buf_p = 1; // store non-inverted values in dibit_buf
state->dibit_buf_p++;
return (3);
}
else
{
*state->dibit_buf_p = 0;
state->dibit_buf_p++;
return (2);
}
}
else
{
if (symbol < state->lmid)
{
*state->dibit_buf_p = 3;
state->dibit_buf_p++;
return (1);
}
else
{
*state->dibit_buf_p = 2;
state->dibit_buf_p++;
return (0);
}
}
}
else
{
if (symbol > state->center)
{
if (symbol > state->umid)
{
*state->dibit_buf_p = 1;
state->dibit_buf_p++;
return (1);
}
else
{
*state->dibit_buf_p = 0;
state->dibit_buf_p++;
return (0);
}
}
else
{
if (symbol < state->lmid)
{
*state->dibit_buf_p = 3;
state->dibit_buf_p++;
return (3);
}
else
{
*state->dibit_buf_p = 2;
state->dibit_buf_p++;
return (2);
}
}
}
}
void
skipDibit (dsd_opts * opts, dsd_state * state, int count)
{
short sample;
int i;
for (i = 0; i < (count); i++)
{
sample = getDibit (opts, state);
}
}

View File

@@ -1,331 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
void
saveImbe4400Data (dsd_opts * opts, dsd_state * state, char *imbe_d)
{
int i, j, k;
unsigned char b;
unsigned char err;
err = (unsigned char) state->errs2;
fputc (err, opts->mbe_out_f);
k = 0;
for (i = 0; i < 11; i++)
{
b = 0;
for (j = 0; j < 8; j++)
{
b = b << 1;
b = b + imbe_d[k];
k++;
}
fputc (b, opts->mbe_out_f);
}
fflush (opts->mbe_out_f);
}
void
saveAmbe2250Data (dsd_opts * opts, dsd_state * state, char *ambe_d)
{
int i, j, k;
unsigned char b;
unsigned char err;
err = (unsigned char) state->errs2;
fputc (err, opts->mbe_out_f);
k = 0;
for (i = 0; i < 6; i++)
{
b = 0;
for (j = 0; j < 8; j++)
{
b = b << 1;
b = b + ambe_d[k];
k++;
}
fputc (b, opts->mbe_out_f);
}
b = ambe_d[48];
fputc (b, opts->mbe_out_f);
fflush (opts->mbe_out_f);
}
int
readImbe4400Data (dsd_opts * opts, dsd_state * state, char *imbe_d)
{
int i, j, k;
unsigned char b;
state->errs2 = fgetc (opts->mbe_in_f);
state->errs = state->errs2;
k = 0;
for (i = 0; i < 11; i++)
{
b = fgetc (opts->mbe_in_f);
if (feof (opts->mbe_in_f))
{
return (1);
}
for (j = 0; j < 8; j++)
{
imbe_d[k] = (b & 128) >> 7;
b = b << 1;
b = b & 255;
k++;
}
}
return (0);
}
int
readAmbe2250Data (dsd_opts * opts, dsd_state * state, char *ambe_d)
{
int i, j, k;
unsigned char b;
state->errs2 = fgetc (opts->mbe_in_f);
state->errs = state->errs2;
k = 0;
for (i = 0; i < 6; i++)
{
b = fgetc (opts->mbe_in_f);
if (feof (opts->mbe_in_f))
{
return (1);
}
for (j = 0; j < 8; j++)
{
ambe_d[k] = (b & 128) >> 7;
b = b << 1;
b = b & 255;
k++;
}
}
b = fgetc (opts->mbe_in_f);
ambe_d[48] = b;
return (0);
}
void
openMbeInFile (dsd_opts * opts, dsd_state * state)
{
char cookie[5];
opts->mbe_in_f = fopen (opts->mbe_in_file, "ro");
if (opts->mbe_in_f == NULL)
{
printf ("Error: could not open %s\n", opts->mbe_in_file);
}
// read cookie
cookie[0] = fgetc (opts->mbe_in_f);
cookie[1] = fgetc (opts->mbe_in_f);
cookie[2] = fgetc (opts->mbe_in_f);
cookie[3] = fgetc (opts->mbe_in_f);
cookie[4] = 0;
if (strstr (cookie, ".amb") != NULL)
{
state->mbe_file_type = 1;
}
else if (strstr (cookie, ".imb") != NULL)
{
state->mbe_file_type = 0;
}
else
{
state->mbe_file_type = -1;
printf ("Error - unrecognized file type\n");
}
}
void
closeMbeOutFile (dsd_opts * opts, dsd_state * state)
{
char shell[255], newfilename[64], ext[5], datestr[32];
char tgid[17];
int sum, i, j;
int talkgroup;
struct tm timep;
if (opts->mbe_out_f != NULL)
{
if ((state->synctype == 0) || (state->synctype == 1) || (state->synctype == 14) || (state->synctype == 15))
{
sprintf (ext, ".imb");
strptime (opts->mbe_out_file, "%s.imb", &timep);
}
else
{
sprintf (ext, ".amb");
strptime (opts->mbe_out_file, "%s.amb", &timep);
}
for (i = 0; i < 17; i++)
{
tgid[i] = 0;
}
if (state->tgcount > 0)
{
for (i = 0; i < 16; i++)
{
sum = 0;
for (j = 0; j < state->tgcount; j++)
{
sum = sum + state->tg[j][i] - 48;
}
tgid[i] = (char) (((float) sum / (float) state->tgcount) + 48.5);
}
talkgroup = (int) strtol (tgid, NULL, 2);
}
else
{
talkgroup = 0;
}
fflush (opts->mbe_out_f);
fclose (opts->mbe_out_f);
opts->mbe_out_f = NULL;
strftime (datestr, 31, "%Y-%m-%d-%H%M%S", &timep);
sprintf (newfilename, "nac%X-%s-tg%i%s", state->nac, datestr, talkgroup, ext);
sprintf (shell, "mv %s %s", opts->mbe_out_file, newfilename);
system (shell);
}
}
void
openMbeOutFile (dsd_opts * opts, dsd_state * state)
{
struct timeval tv;
int i, j;
char ext[5];
if ((state->synctype == 0) || (state->synctype == 1) || (state->synctype == 14) || (state->synctype == 15))
{
sprintf (ext, ".imb");
}
else
{
sprintf (ext, ".amb");
}
// reset talkgroup id buffer
for (i = 0; i < 12; i++)
{
for (j = 0; j < 25; j++)
{
state->tg[j][i] = 0;
}
}
state->tgcount = 0;
gettimeofday (&tv, NULL);
sprintf (opts->mbe_out_file, "%i%s", (int) tv.tv_sec, ext);
opts->mbe_out_f = fopen (opts->mbe_out_file, "w");
if (opts->mbe_out_f == NULL)
{
printf ("Error, couldn't open %s\n", opts->mbe_out_file);
}
// write magic
fprintf (opts->mbe_out_f, "%s", ext);
fflush (opts->mbe_out_f);
}
void
openWavOutFile (dsd_opts * opts, dsd_state * state)
{
opts->wav_out_f = fopen (opts->wav_out_file, "w");
if (opts->wav_out_f == NULL)
{
printf ("Error - could not open wav output file %s\n", opts->wav_out_file);
return;
}
opts->wav_out_fd = fileno (opts->wav_out_f);
fprintf (opts->wav_out_f, "RIFF");
// total length
fputc (0, opts->wav_out_f);
fputc (0, opts->wav_out_f);
fputc (0, opts->wav_out_f);
fputc (0, opts->wav_out_f);
fprintf (opts->wav_out_f, "WAVE");
fprintf (opts->wav_out_f, "fmt ");
// length of format chunk
fputc (16, opts->wav_out_f);
fputc (0, opts->wav_out_f);
fputc (0, opts->wav_out_f);
fputc (0, opts->wav_out_f);
// always 0x1
fputc (1, opts->wav_out_f);
fputc (0, opts->wav_out_f);
// channels
fputc (1, opts->wav_out_f);
fputc (0, opts->wav_out_f);
// sample rate
fputc (64, opts->wav_out_f);
fputc (31, opts->wav_out_f);
fputc (0, opts->wav_out_f);
fputc (0, opts->wav_out_f);
// bytes per second
fputc (176, opts->wav_out_f);
fputc (62, opts->wav_out_f);
fputc (0, opts->wav_out_f);
fputc (0, opts->wav_out_f);
// bytes/sample
fputc (2, opts->wav_out_f);
fputc (0, opts->wav_out_f);
// bits/sample
fputc (16, opts->wav_out_f);
fputc (0, opts->wav_out_f);
// data chunk header
fprintf (opts->wav_out_f, "data");
// length of data
fputc (0, opts->wav_out_f);
fputc (0, opts->wav_out_f);
fputc (0, opts->wav_out_f);
fputc (127, opts->wav_out_f);
fflush (opts->wav_out_f);
}

View File

@@ -1,421 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
void
printFrameInfo (dsd_opts * opts, dsd_state * state)
{
int level;
level = (int) (((float) state->max / (float) 32768) * (float) 100);
if (opts->verbose > 0)
{
printf ("input: %2i%% ", level);
}
if (state->nac != 0)
{
printf ("nac: %4X ", state->nac);
}
if (opts->verbose > 1)
{
printf ("src: %8i ", state->lastsrc);
}
printf ("tg: %5i ", state->lasttg);
}
void
processFrame (dsd_opts * opts, dsd_state * state)
{
int i, j, dibit;
char duid[3];
char nac[13];
int level;
duid[2] = 0;
j = 0;
if (state->rf_mod == 1)
{
state->maxref = (state->max * 0.80);
state->minref = (state->min * 0.80);
}
else
{
state->maxref = state->max;
state->minref = state->min;
}
if ((state->synctype == 8) || (state->synctype == 9))
{
state->nac = 0;
state->lastsrc = 0;
state->lasttg = 0;
if (opts->errorbars == 1)
{
if (opts->verbose > 0)
{
level = (int) (((float) state->max / (float) 32768) * (float) 100);
printf ("input: %2i%% ", level);
}
}
state->nac = 0;
if ((opts->mbe_out_dir[0] != 0) && (opts->mbe_out_f == NULL))
{
openMbeOutFile (opts, state);
}
sprintf (state->fsubtype, " VOICE ");
processNXDN96 (opts, state);
return;
}
else if ((state->synctype == 6) || (state->synctype == 7))
{
state->nac = 0;
state->lastsrc = 0;
state->lasttg = 0;
if (opts->errorbars == 1)
{
if (opts->verbose > 0)
{
level = (int) (((float) state->max / (float) 32768) * (float) 100);
printf ("input: %2i%% ", level);
}
}
state->nac = 0;
if ((opts->mbe_out_dir[0] != 0) && (opts->mbe_out_f == NULL))
{
openMbeOutFile (opts, state);
}
sprintf (state->fsubtype, " VOICE ");
processDSTAR (opts, state);
return;
}
else if ((state->synctype >= 10) && (state->synctype <= 13))
{
state->nac = 0;
state->lastsrc = 0;
state->lasttg = 0;
if (opts->errorbars == 1)
{
if (opts->verbose > 0)
{
level = (int) (((float) state->max / (float) 32768) * (float) 100);
printf ("input: %2i%% ", level);
}
}
if ((state->synctype == 11) || (state->synctype == 12))
{
if ((opts->mbe_out_dir[0] != 0) && (opts->mbe_out_f == NULL))
{
openMbeOutFile (opts, state);
}
sprintf (state->fsubtype, " VOICE ");
processDMRvoice (opts, state);
}
else
{
closeMbeOutFile (opts, state);
state->err_str[0] = 0;
processDMRdata (opts, state);
}
return;
}
else if ((state->synctype >= 2) && (state->synctype <= 5))
{
state->nac = 0;
state->lastsrc = 0;
state->lasttg = 0;
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
}
if ((state->synctype == 3) || (state->synctype == 4))
{
if ((opts->mbe_out_dir[0] != 0) && (opts->mbe_out_f == NULL))
{
openMbeOutFile (opts, state);
}
sprintf (state->fsubtype, " VOICE ");
processX2TDMAvoice (opts, state);
}
else
{
closeMbeOutFile (opts, state);
state->err_str[0] = 0;
processX2TDMAdata (opts, state);
}
return;
}
else if ((state->synctype == 14) || (state->synctype == 15))
{
state->nac = 0;
state->lastsrc = 0;
state->lasttg = 0;
if (opts->errorbars == 1)
{
if (opts->verbose > 0)
{
level = (int) (((float) state->max / (float) 32768) * (float) 100);
printf ("input: %2i%% ", level);
}
}
if ((opts->mbe_out_dir[0] != 0) && (opts->mbe_out_f == NULL))
{
openMbeOutFile (opts, state);
}
sprintf (state->fsubtype, " VOICE ");
processProVoice (opts, state);
return;
}
else
{
j = 0;
for (i = 0; i < 6; i++)
{
dibit = getDibit (opts, state);
nac[j] = (1 & (dibit >> 1)) + 48; // bit 1
j++;
nac[j] = (1 & dibit) + 48; // bit 0
j++;
}
nac[12] = 0;
state->nac = strtol (nac, NULL, 2);
for (i = 0; i < 2; i++)
{
duid[i] = getDibit (opts, state) + 48;
}
}
if (strcmp (duid, "00") == 0)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" HDU\n");
}
state->cur_mp->repeat = 0;
if (opts->mbe_out_dir[0] != 0)
{
closeMbeOutFile (opts, state);
openMbeOutFile (opts, state);
}
mbe_initMbeParms (state->cur_mp, state->prev_mp, state->prev_mp_enhanced);
state->lastp25type = 2;
sprintf (state->fsubtype, " HDU ");
processHDU (opts, state);
}
else if (strcmp (duid, "11") == 0)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" LDU1 ");
}
if (opts->mbe_out_dir[0] != 0)
{
if (opts->mbe_out_f == NULL)
{
openMbeOutFile (opts, state);
}
}
state->lastp25type = 1;
sprintf (state->fsubtype, " LDU1 ");
state->numtdulc = 0;
processLDU1 (opts, state);
}
else if (strcmp (duid, "22") == 0)
{
if (state->lastp25type != 1)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" Ignoring LDU2 not preceeded by LDU1\n");
}
state->lastp25type = 0;
sprintf (state->fsubtype, " ");
}
else
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" LDU2 ");
}
if (opts->mbe_out_dir[0] != 0)
{
if (opts->mbe_out_f == NULL)
{
openMbeOutFile (opts, state);
}
}
state->lastp25type = 2;
sprintf (state->fsubtype, " LDU2 ");
state->numtdulc = 0;
processLDU2 (opts, state);
}
}
else if (strcmp (duid, "33") == 0)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" TDULC\n");
}
state->cur_mp->repeat = 0;
if (opts->mbe_out_dir[0] != 0)
{
closeMbeOutFile (opts, state);
}
mbe_initMbeParms (state->cur_mp, state->prev_mp, state->prev_mp_enhanced);
state->tgcount = 0;
state->lastp25type = 0;
sprintf (state->fsubtype, " TDULC ");
state->numtdulc++;
if ((opts->resume > 0) && (state->numtdulc > opts->resume))
{
resumeScan (opts, state);
}
processTDULC (opts, state);
state->err_str[0] = 0;
}
else if (strcmp (duid, "03") == 0)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" TDU\n");
}
state->cur_mp->repeat = 0;
if (opts->mbe_out_dir[0] != 0)
{
closeMbeOutFile (opts, state);
}
mbe_initMbeParms (state->cur_mp, state->prev_mp, state->prev_mp_enhanced);
state->tgcount = 0;
state->lastp25type = 0;
state->err_str[0] = 0;
sprintf (state->fsubtype, " TDU ");
skipDibit (opts, state, 40);
}
else if (strcmp (duid, "13") == 0)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" TSDU\n");
}
state->lastp25type = 3;
sprintf (state->fsubtype, " TSDU ");
skipDibit (opts, state, 328);
}
else if (strcmp (duid, "30") == 0)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" PDU\n");
if (opts->resume > 0)
{
resumeScan (opts, state);
}
}
if (opts->mbe_out_dir[0] != 0)
{
if (opts->mbe_out_f == NULL)
{
openMbeOutFile (opts, state);
}
}
state->lastp25type = 4;
sprintf (state->fsubtype, " PDU ");
}
// try to guess based on previous frame if unknown type
else if (state->lastp25type == 1)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf ("(LDU2) ");
}
if (opts->mbe_out_dir[0] != 0)
{
if (opts->mbe_out_f == NULL)
{
openMbeOutFile (opts, state);
}
}
state->lastp25type = 0;
sprintf (state->fsubtype, "(LDU2) ");
state->numtdulc = 0;
processLDU2 (opts, state);
}
else if (state->lastp25type == 2)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf ("(LDU1) ");
}
if (opts->mbe_out_dir[0] != 0)
{
if (opts->mbe_out_f == NULL)
{
openMbeOutFile (opts, state);
}
}
state->lastp25type = 0;
sprintf (state->fsubtype, "(LDU1) ");
state->numtdulc = 0;
processLDU1 (opts, state);
}
else if (state->lastp25type == 3)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" (TSDU)\n");
}
state->lastp25type = 0;
sprintf (state->fsubtype, "(TSDU) ");
skipDibit (opts, state, 328);
}
else if (state->lastp25type == 4)
{
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" (PDU)\n");
}
state->lastp25type = 0;
}
else
{
state->lastp25type = 0;
sprintf (state->fsubtype, " ");
if (opts->errorbars == 1)
{
printFrameInfo (opts, state);
printf (" duid:%s *Unknown DUID*\n", duid);
}
}
}

View File

@@ -1,691 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
void
printFrameSync (dsd_opts * opts, dsd_state * state, char *frametype, int offset, char *modulation)
{
if (opts->verbose > 0)
{
printf ("Sync: %s ", frametype);
}
if (opts->verbose > 2)
{
printf ("o: %4i ", offset);
}
if (opts->verbose > 1)
{
printf ("mod: %s ", modulation);
}
if (opts->verbose > 2)
{
printf ("g: %f ", state->aout_gain);
}
}
int
getFrameSync (dsd_opts * opts, dsd_state * state)
{
/* detects frame sync and returns frame type
* 0 = +p25p1
* 1 = -p25p1
* 2 = +X2-TDMA (non inverted signal data frame)
* 3 = +X2-TDMA (inverted signal voice frame)
* 4 = -X2-TDMA (non inverted signal voice frame)
* 5 = -X2-TDMA (inverted signal data frame)
* 6 = +D-STAR
* 7 = -D-STAR
* 8 = +NXDN96
* 9 = -NXDN96
* 10 = +DMR (non inverted singlan data frame)
* 11 = -DMR (inverted signal voice frame)
* 12 = +DMR (non inverted signal voice frame)
* 13 = -DMR (inverted signal data frame)
* 14 = +ProVoice
* 15 = -ProVoice
*/
int i, j, t, o, dibit, sync, symbol, synctest_pos, lastt;
char synctest[25];
char synctest18[19];
char synctest32[33];
char modulation[8];
char *synctest_p;
char synctest_buf[10240];
int lmin, lmax, lidx;
int lbuf[24], lbuf2[24];
int lsum;
char spectrum[64];
// detect frame sync
t = 0;
synctest[24] = 0;
synctest18[18] = 0;
synctest32[32] = 0;
synctest_pos = 0;
synctest_p = synctest_buf;
sync = 0;
lmin = 0;
lmax = 0;
lidx = 0;
lastt = 0;
state->numflips = 0;
if ((opts->symboltiming == 1) && (state->carrier == 1))
{
printf ("\nSymbol Timing:\n");
}
while (sync == 0)
{
t++;
symbol = getSymbol (opts, state, 0);
lbuf[lidx] = symbol;
state->sbuf[state->sidx] = symbol;
if (lidx == 23)
{
lidx = 0;
}
else
{
lidx++;
}
if (state->sidx == (opts->ssize - 1))
{
state->sidx = 0;
}
else
{
state->sidx++;
}
if (lastt == 23)
{
lastt = 0;
if (state->numflips > opts->mod_threshold)
{
if (opts->mod_qpsk == 1)
{
state->rf_mod = 1;
}
}
else if (state->numflips > 18)
{
if (opts->mod_gfsk == 1)
{
state->rf_mod = 2;
}
}
else
{
if (opts->mod_c4fm == 1)
{
state->rf_mod = 0;
}
}
state->numflips = 0;
}
else
{
lastt++;
}
//determine dibit state
if (symbol > 0)
{
*state->dibit_buf_p = 1;
state->dibit_buf_p++;
dibit = 49;
}
else
{
*state->dibit_buf_p = 3;
state->dibit_buf_p++;
dibit = 51;
}
/*
printf("%c", dibit);
if (t == 768)
{
printf("\n");
t=0;
}
*/
*synctest_p = dibit;
if (t >= 24)
{
for (i = 0; i < 24; i++)
{
lbuf2[i] = lbuf[i];
}
qsort (lbuf2, 24, sizeof (int), comp);
lmin = (lbuf2[2] + lbuf2[3] + lbuf2[4]) / 3;
lmax = (lbuf2[21] + lbuf2[20] + lbuf2[19]) / 3;
if (state->rf_mod == 1)
{
state->minbuf[state->midx] = lmin;
state->maxbuf[state->midx] = lmax;
if (state->midx == (opts->msize - 1))
{
state->midx = 0;
}
else
{
state->midx++;
}
lsum = 0;
for (i = 0; i < opts->msize; i++)
{
lsum += state->minbuf[i];
}
state->min = lsum / opts->msize;
lsum = 0;
for (i = 0; i < opts->msize; i++)
{
lsum += state->maxbuf[i];
}
state->max = lsum / opts->msize;
state->center = ((state->max) + (state->min)) / 2;
state->maxref = ((state->max) * 0.80);
state->minref = ((state->min) * 0.80);
}
else
{
state->maxref = state->max;
state->minref = state->min;
}
if (state->rf_mod == 0)
{
sprintf (modulation, "C4FM");
}
else if (state->rf_mod == 1)
{
sprintf (modulation, "QPSK");
}
else if (state->rf_mod == 2)
{
sprintf (modulation, "GFSK");
}
if (opts->datascope == 1)
{
if (lidx == 0)
{
for (i = 0; i < 64; i++)
{
spectrum[i] = 0;
}
for (i = 0; i < 24; i++)
{
o = (lbuf2[i] + 32768) / 1024;
spectrum[o]++;
}
if (state->symbolcnt > (4800 / opts->scoperate))
{
state->symbolcnt = 0;
printf ("\n");
printf ("Demod mode: %s Nac: %4X\n", modulation, state->nac);
printf ("Frame Type: %s Talkgroup: %7i\n", state->ftype, state->lasttg);
printf ("Frame Subtype: %s Source: %12i\n", state->fsubtype, state->lastsrc);
printf ("TDMA activity: %s %s Voice errors: %s\n", state->slot0light, state->slot1light, state->err_str);
printf ("+----------------------------------------------------------------+\n");
for (i = 0; i < 10; i++)
{
printf ("|");
for (j = 0; j < 64; j++)
{
if (i == 0)
{
if ((j == ((state->min) + 32768) / 1024) || (j == ((state->max) + 32768) / 1024))
{
printf ("#");
}
else if (j == (state->center + 32768) / 1024)
{
printf ("!");
}
else
{
if (j == 32)
{
printf ("|");
}
else
{
printf (" ");
}
}
}
else
{
if (spectrum[j] > 9 - i)
{
printf ("*");
}
else
{
if (j == 32)
{
printf ("|");
}
else
{
printf (" ");
}
}
}
}
printf ("|\n");
}
printf ("+----------------------------------------------------------------+\n");
}
}
}
strncpy (synctest, (synctest_p - 23), 24);
if (opts->frame_p25p1 == 1)
{
if (strcmp (synctest, FRAME_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, " P25 Phase 1 ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " +p25p1 ", synctest_pos + 1, modulation);
}
state->lastsynctype = 0;
return (0);
}
if (strcmp (synctest, INV_FRAME_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, " P25 Phase 1 ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " -p25p1 ", synctest_pos + 1, modulation);
}
state->lastsynctype = 1;
return (1);
}
}
if (opts->frame_x2tdma == 1)
{
if (strcmp (synctest, X2TDMA_DATA_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + (lmax)) / 2;
state->min = ((state->min) + (lmin)) / 2;
if (opts->inverted_x2tdma == 0)
{
// data frame
sprintf (state->ftype, " X2-TDMA ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " +X2-TDMA ", synctest_pos + 1, modulation);
}
state->lastsynctype = 2;
return (2);
}
else
{
// inverted voice frame
sprintf (state->ftype, " X2-TDMA ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " -X2-TDMA ", synctest_pos + 1, modulation);
}
if (state->lastsynctype != 3)
{
state->firstframe = 1;
}
state->lastsynctype = 3;
return (3);
}
}
if (strcmp (synctest, X2TDMA_VOICE_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
if (opts->inverted_x2tdma == 0)
{
// voice frame
sprintf (state->ftype, " X2-TDMA ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " +X2-TDMA ", synctest_pos + 1, modulation);
}
if (state->lastsynctype != 4)
{
state->firstframe = 1;
}
state->lastsynctype = 4;
return (4);
}
else
{
// inverted data frame
sprintf (state->ftype, " X2-TDMA ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " -X2-TDMA ", synctest_pos + 1, modulation);
}
state->lastsynctype = 5;
return (5);
}
}
}
if (opts->frame_dmr == 1)
{
if (strcmp (synctest, DMR_DATA_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + (lmax)) / 2;
state->min = ((state->min) + (lmin)) / 2;
if (opts->inverted_dmr == 0)
{
// data frame
sprintf (state->ftype, " DMR ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " +DMR ", synctest_pos + 1, modulation);
}
state->lastsynctype = 10;
return (10);
}
else
{
// inverted voice frame
sprintf (state->ftype, " DMR ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " -DMR ", synctest_pos + 1, modulation);
}
if (state->lastsynctype != 11)
{
state->firstframe = 1;
}
state->lastsynctype = 11;
return (11);
}
}
if (strcmp (synctest, DMR_VOICE_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
if (opts->inverted_dmr == 0)
{
// voice frame
sprintf (state->ftype, " DMR ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " +DMR ", synctest_pos + 1, modulation);
}
if (state->lastsynctype != 12)
{
state->firstframe = 1;
}
state->lastsynctype = 12;
return (12);
}
else
{
// inverted data frame
sprintf (state->ftype, " DMR ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " -DMR ", synctest_pos + 1, modulation);
}
state->lastsynctype = 13;
return (13);
}
}
}
if (opts->frame_provoice == 1)
{
strncpy (synctest32, (synctest_p - 31), 32);
if (strcmp (synctest32, PROVOICE_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, " ProVoice ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " -ProVoice ", synctest_pos + 1, modulation);
}
state->lastsynctype = 14;
return (14);
}
else if (strcmp (synctest32, INV_PROVOICE_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, " ProVoice ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " -ProVoice ", synctest_pos + 1, modulation);
}
state->lastsynctype = 15;
return (15);
}
}
if (opts->frame_nxdn == 1)
{
strncpy (synctest18, (synctest_p - 17), 18);
if (strcmp (synctest18, NXDN96_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, " NXDN96 ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " +NXDN96 ", synctest_pos + 1, modulation);
}
state->lastsynctype = 8;
return (8);
}
if (strcmp (synctest18, INV_NXDN96_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, " NXDN96 ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " -NXDN96 ", synctest_pos + 1, modulation);
}
state->lastsynctype = 9;
return (9);
}
}
if (opts->frame_dstar == 1)
{
if (strcmp (synctest, DSTAR_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, " D-STAR ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " +D-STAR ", synctest_pos + 1, modulation);
}
state->lastsynctype = 6;
return (6);
}
if (strcmp (synctest, INV_DSTAR_SYNC) == 0)
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, " D-STAR ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, " -D-STAR ", synctest_pos + 1, modulation);
}
state->lastsynctype = 7;
return (7);
}
}
if ((t == 24) && (state->lastsynctype != -1))
{
if ((state->lastsynctype == 0) && ((state->lastp25type == 1) || (state->lastp25type == 2)))
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + (lmax)) / 2;
state->min = ((state->min) + (lmin)) / 2;
sprintf (state->ftype, "(P25 Phase 1)");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, "(+p25p1) ", synctest_pos + 1, modulation);
}
state->lastsynctype = -1;
return (0);
}
else if ((state->lastsynctype == 1) && ((state->lastp25type == 1) || (state->lastp25type == 2)))
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, "(P25 Phase 1)");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, "(-p25p1) ", synctest_pos + 1, modulation);
}
state->lastsynctype = -1;
return (1);
}
else if ((state->lastsynctype == 3) && (strcmp (synctest, X2TDMA_VOICE_SYNC) != 0))
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, "(X2-TDMA) ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, "(-X2-TDMA) ", synctest_pos + 1, modulation);
}
state->lastsynctype = -1;
return (3);
}
else if ((state->lastsynctype == 4) && (strcmp (synctest, X2TDMA_DATA_SYNC) != 0))
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, "(X2-TDMA) ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, "(+X2-TDMA) ", synctest_pos + 1, modulation);
}
state->lastsynctype = -1;
return (4);
}
else if ((state->lastsynctype == 11) && (strcmp (synctest, DMR_VOICE_SYNC) != 0))
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, "(DMR) ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, "(-DMR) ", synctest_pos + 1, modulation);
}
state->lastsynctype = -1;
return (11);
}
else if ((state->lastsynctype == 12) && (strcmp (synctest, DMR_DATA_SYNC) != 0))
{
state->carrier = 1;
state->offset = synctest_pos;
state->max = ((state->max) + lmax) / 2;
state->min = ((state->min) + lmin) / 2;
sprintf (state->ftype, "(DMR) ");
if (opts->errorbars == 1)
{
printFrameSync (opts, state, "(+DMR) ", synctest_pos + 1, modulation);
}
state->lastsynctype = -1;
return (12);
}
}
}
if (synctest_pos < 10200)
{
synctest_pos++;
synctest_p++;
}
else
{
// buffer reset
synctest_pos = 0;
synctest_p = synctest_buf;
noCarrier (opts, state);
}
if (state->carrier == 1)
{
if (synctest_pos >= 1800)
{
if (opts->errorbars == 1)
{
if (opts->verbose > 1)
{
printf ("Sync: no sync\n");
}
}
noCarrier (opts, state);
return (-1);
}
}
}
return (-1);
}

View File

@@ -1,635 +0,0 @@
/*
* 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.
*/
#define _MAIN
#include "dsd.h"
#include "p25p1_const.h"
#include "x2tdma_const.h"
#include "dstar_const.h"
#include "nxdn96_const.h"
#include "dmr_const.h"
#include "provoice_const.h"
int
comp (const void *a, const void *b)
{
if (*((const int *) a) == *((const int *) b))
return 0;
else if (*((const int *) a) < *((const int *) b))
return -1;
else
return 1;
}
void
noCarrier (dsd_opts * opts, dsd_state * state)
{
state->dibit_buf_p = state->dibit_buf + 200;
memset (state->dibit_buf, 0, sizeof (int) * 200);
if (opts->mbe_out_f != NULL)
{
closeMbeOutFile (opts, state);
}
state->jitter = -1;
state->lastsynctype = -1;
state->carrier = 0;
state->max = 15000;
state->min = -15000;
state->center = 0;
state->err_str[0] = 0;
sprintf (state->fsubtype, " ");
sprintf (state->ftype, " ");
state->lasttg = 0;
state->lastsrc = 0;
state->lastp25type = 0;
state->repeat = 0;
state->nac = 0;
state->numtdulc = 0;
sprintf (state->slot0light, " slot0 ");
sprintf (state->slot1light, " slot1 ");
state->firstframe = 0;
if (opts->audio_gain == (float) 0)
{
state->aout_gain = 25;
}
memset (state->aout_max_buf, 0, sizeof (float) * 200);
state->aout_max_buf_p = state->aout_max_buf;
state->aout_max_buf_idx = 0;
sprintf (state->algid, "________");
sprintf (state->keyid, "________________");
mbe_initMbeParms (state->cur_mp, state->prev_mp, state->prev_mp_enhanced);
}
void
initOpts (dsd_opts * opts)
{
opts->onesymbol = 10;
opts->mbe_in_file[0] = 0;
opts->mbe_in_f = NULL;
opts->errorbars = 1;
opts->datascope = 0;
opts->symboltiming = 0;
opts->verbose = 2;
opts->p25enc = 0;
opts->p25lc = 0;
opts->p25status = 0;
opts->p25tg = 0;
opts->scoperate = 15;
sprintf (opts->audio_in_dev, "/dev/audio");
opts->audio_in_fd = -1;
sprintf (opts->audio_out_dev, "/dev/audio");
opts->audio_out_fd = -1;
opts->split = 0;
opts->playoffset = 0;
opts->mbe_out_dir[0] = 0;
opts->mbe_out_file[0] = 0;
opts->mbe_out_f = NULL;
opts->audio_gain = 0;
opts->audio_out = 1;
opts->wav_out_file[0] = 0;
opts->wav_out_f = NULL;
opts->wav_out_fd = -1;
opts->serial_baud = 115200;
sprintf (opts->serial_dev, "/dev/ttyUSB0");
opts->resume = 0;
opts->frame_dstar = 0;
opts->frame_x2tdma = 1;
opts->frame_p25p1 = 1;
opts->frame_nxdn = 0;
opts->frame_dmr = 1;
opts->frame_provoice = 0;
opts->mod_c4fm = 1;
opts->mod_qpsk = 1;
opts->mod_gfsk = 1;
opts->uvquality = 3;
opts->inverted_x2tdma = 1; // most transmitter + scanner + sound card combinations show inverted signals for this
opts->inverted_dmr = 0; // most transmitter + scanner + sound card combinations show non-inverted signals for this
opts->mod_threshold = 26;
opts->ssize = 36;
opts->msize = 15;
opts->playfiles = 0;
opts->delay = 0;
}
void
initState (dsd_state * state)
{
int i, j;
state->dibit_buf = malloc (sizeof (int) * 1000000);
state->dibit_buf_p = state->dibit_buf + 200;
memset (state->dibit_buf, 0, sizeof (int) * 200);
state->repeat = 0;
state->audio_out_buf = malloc (sizeof (short) * 1000000);
memset (state->audio_out_buf, 0, 100 * sizeof (short));
state->audio_out_buf_p = state->audio_out_buf + 100;
state->audio_out_float_buf = malloc (sizeof (float) * 1000000);
memset (state->audio_out_float_buf, 0, 100 * sizeof (float));
state->audio_out_float_buf_p = state->audio_out_float_buf + 100;
state->audio_out_idx = 0;
state->audio_out_idx2 = 0;
state->audio_out_temp_buf_p = state->audio_out_temp_buf;
state->center = 0;
state->jitter = -1;
state->synctype = -1;
state->min = -15000;
state->max = 15000;
state->lmid = 0;
state->umid = 0;
state->minref = -12000;
state->maxref = 12000;
state->lastsample = 0;
for (i = 0; i < 128; i++)
{
state->sbuf[i] = 0;
}
state->sidx = 0;
for (i = 0; i < 1024; i++)
{
state->maxbuf[i] = 15000;
}
for (i = 0; i < 1024; i++)
{
state->minbuf[i] = -15000;
}
state->midx = 0;
state->err_str[0] = 0;
sprintf (state->fsubtype, " ");
sprintf (state->ftype, " ");
state->symbolcnt = 0;
state->rf_mod = 0;
state->numflips = 0;
state->lastsynctype = -1;
state->lastp25type = 0;
state->offset = 0;
state->carrier = 0;
for (j = 0; i < 25; j++)
{
for (i = 0; j < 16; i++)
{
state->tg[i][j] = 0;
}
}
state->tgcount = 0;
state->lasttg = 0;
state->lastsrc = 0;
state->nac = 0;
state->errs = 0;
state->errs2 = 0;
state->mbe_file_type = -1;
state->optind = 0;
state->numtdulc = 0;
state->firstframe = 0;
sprintf (state->slot0light, " slot0 ");
sprintf (state->slot1light, " slot1 ");
state->aout_gain = 25;
memset (state->aout_max_buf, 0, sizeof (float) * 200);
state->aout_max_buf_p = state->aout_max_buf;
state->aout_max_buf_idx = 0;
state->samplesPerSymbol = 10;
state->symbolCenter = 4;
sprintf (state->algid, "________");
sprintf (state->keyid, "________________");
state->currentslot = 0;
state->cur_mp = malloc (sizeof (mbe_parms));
state->prev_mp = malloc (sizeof (mbe_parms));
state->prev_mp_enhanced = malloc (sizeof (mbe_parms));
mbe_initMbeParms (state->cur_mp, state->prev_mp, state->prev_mp_enhanced);
}
void
usage ()
{
printf ("Digital Speech Decoder 1.3\n");
printf ("\n");
printf ("Usage:\n");
printf (" dsd [options] Live scanner mode\n");
printf (" dsd [options] -r <files> Read/Play saved mbe data from file(s)\n");
printf (" dsd -h Show help\n");
printf ("\n");
printf ("Display Options:\n");
printf (" -e Show Frame Info and errorbars (default)\n");
printf (" -pe Show p25 encryption sync bits\n");
printf (" -pl Show p25 link control bits\n");
printf (" -ps Show p25 status bits and low speed data\n");
printf (" -pt Show p25 talkgroup info\n");
printf (" -q Don't show Frame Info/errorbars\n");
printf (" -s Datascope (disables other display options)\n");
printf (" -t Show symbol timing during sync\n");
printf (" -v <num> Frame information Verbosity\n");
printf (" -z <num> Frame rate for datascope\n");
printf ("\n");
printf ("Input/Output options:\n");
printf (" -i <device> Audio input device (default is /dev/audio)\n");
printf (" -o <device> Audio output device (default is /dev/audio)\n");
printf (" -d <dir> Create mbe data files, use this directory\n");
printf (" -g <num> Audio output gain (default = 0 = auto)\n");
printf (" -n Do not send synthesized speech to audio output device\n");
printf (" -w <file> Output synthesized speech to a .wav file\n");
printf ("\n");
printf ("Scanner control options:\n");
printf (" -B <num> Serial port baud rate (default=115200)\n");
printf (" -C <device> Serial port for scanner control (default=/dev/ttyUSB0)\n");
printf (" -R <num> Resume scan after <num> TDULC frames or any PDU\n");
printf ("\n");
printf ("Decoder options:\n");
printf (" -fa Auto-detect frame type (default)\n");
printf (" -f1 Decode only P25 Phase 1\n");
printf (" -fd Decode only D-STAR* (no audio)\n");
printf (" -fn Decode only NXDN96* (no audio)\n");
printf (" -fp Decode only ProVoice*\n");
printf (" -fr Decode only DMR/MOTOTRBO\n");
printf (" -fx Decode only X2-TDMA\n");
printf (" -ma Auto-select modulation optimizations (default)\n");
printf (" -mc Use only C4FM modulation optimizations\n");
printf (" -mg Use only GFSK modulation optimizations\n");
printf (" -mq Use only QPSK modulation optimizations\n");
printf (" -u <num> Unvoiced speech quality (default=3)\n");
printf (" -xx Expect non-inverted X2-TDMA signal\n");
printf (" -xr Expect inverted DMR/MOTOTRBO signal\n");
printf ("\n");
printf (" * denotes frame types that cannot be auto-detected.\n");
printf ("\n");
printf ("Advanced decoder options:\n");
printf (" -A <num> QPSK modulation auto detection threshold (default=26)\n");
printf (" -S <num> Symbol buffer size for QPSK decision point tracking\n");
printf (" (default=36)\n");
printf (" -M <num> Min/Max buffer size for QPSK decision point tracking\n");
printf (" (default=15)\n");
exit (0);
}
void
liveScanner (dsd_opts * opts, dsd_state * state)
{
while (1)
{
noCarrier (opts, state);
state->synctype = getFrameSync (opts, state);
// recalibrate center/umid/lmid
state->center = ((state->max) + (state->min)) / 2;
state->umid = (((state->max) - state->center) * 5 / 8) + state->center;
state->lmid = (((state->min) - state->center) * 5 / 8) + state->center;
while (state->synctype != -1)
{
processFrame (opts, state);
state->synctype = getFrameSync (opts, state);
// recalibrate center/umid/lmid
state->center = ((state->max) + (state->min)) / 2;
state->umid = (((state->max) - state->center) * 5 / 8) + state->center;
state->lmid = (((state->min) - state->center) * 5 / 8) + state->center;
}
}
}
int
main (int argc, char **argv)
{
int c;
extern char *optarg;
extern int optind, opterr, optopt;
dsd_opts opts;
dsd_state state;
initOpts (&opts);
initState (&state);
while ((c = getopt (argc, argv, "hep:qstv:z:i:o:d:g:nw:B:C:R:f:m:u:x:A:S:M:r")) != -1)
{
opterr = 0;
switch (c)
{
case 'h':
usage ();
exit (0);
case 'e':
opts.errorbars = 1;
opts.datascope = 0;
break;
case 'p':
if (optarg[0] == 'e')
{
opts.p25enc = 1;
}
else if (optarg[0] == 'l')
{
opts.p25lc = 1;
}
else if (optarg[0] == 's')
{
opts.p25status = 1;
}
else if (optarg[0] == 't')
{
opts.p25tg = 1;
}
break;
case 'q':
opts.errorbars = 0;
opts.verbose = 0;
break;
case 's':
opts.errorbars = 0;
opts.p25enc = 0;
opts.p25lc = 0;
opts.p25status = 0;
opts.p25tg = 0;
opts.datascope = 1;
opts.symboltiming = 0;
break;
case 't':
opts.symboltiming = 1;
opts.errorbars = 1;
opts.datascope = 0;
break;
case 'v':
sscanf (optarg, "%d", &opts.verbose);
break;
case 'z':
sscanf (optarg, "%d", &opts.scoperate);
opts.errorbars = 0;
opts.p25enc = 0;
opts.p25lc = 0;
opts.p25status = 0;
opts.p25tg = 0;
opts.datascope = 1;
opts.symboltiming = 0;
printf ("Setting datascope frame rate to %i frame per second.\n", opts.scoperate);
break;
case 'i':
sscanf (optarg, "%s", opts.audio_in_dev);
break;
case 'o':
sscanf (optarg, "%s", opts.audio_out_dev);
break;
case 'd':
sscanf (optarg, "%s", opts.mbe_out_dir);
printf ("Writing mbe data files to directory %s\n", opts.mbe_out_dir);
break;
case 'g':
sscanf (optarg, "%f", &opts.audio_gain);
if (opts.audio_gain <= (float) 0)
{
opts.audio_gain = (float) 0;
printf ("Enabling audio out auto-gain\n");
}
else
{
printf ("Setting audio out gain to %f\n", opts.audio_gain);
state.aout_gain = opts.audio_gain;
}
break;
case 'n':
opts.audio_out = 0;
printf ("Disabling audio output to soundcard.\n");
break;
case 'w':
sscanf (optarg, "%s", opts.wav_out_file);
printf ("Writing audio to file %s\n", opts.wav_out_file);
openWavOutFile (&opts, &state);
break;
case 'B':
sscanf (optarg, "%d", &opts.serial_baud);
break;
case 'C':
sscanf (optarg, "%s", opts.serial_dev);
break;
case 'R':
sscanf (optarg, "%d", &opts.resume);
printf ("Enabling scan resume after %i TDULC frames\n", opts.resume);
break;
case 'f':
if (optarg[0] == 'a')
{
opts.frame_dstar = 0;
opts.frame_x2tdma = 1;
opts.frame_p25p1 = 1;
opts.frame_nxdn = 0;
opts.frame_dmr = 1;
opts.frame_provoice = 0;
}
else if (optarg[0] == 'd')
{
opts.frame_dstar = 1;
opts.frame_x2tdma = 0;
opts.frame_p25p1 = 0;
opts.frame_nxdn = 0;
opts.frame_dmr = 0;
opts.frame_provoice = 0;
printf ("Decoding only D-STAR frames.\n");
}
else if (optarg[0] == 'x')
{
opts.frame_dstar = 0;
opts.frame_x2tdma = 1;
opts.frame_p25p1 = 0;
opts.frame_nxdn = 0;
opts.frame_dmr = 0;
opts.frame_provoice = 0;
printf ("Decoding only X2-TDMA frames.\n");
}
else if (optarg[0] == 'p')
{
opts.frame_dstar = 0;
opts.frame_x2tdma = 0;
opts.frame_p25p1 = 0;
opts.frame_nxdn = 0;
opts.frame_dmr = 0;
opts.frame_provoice = 1;
state.samplesPerSymbol = 5;
state.symbolCenter = 2;
opts.mod_c4fm = 0;
opts.mod_qpsk = 0;
opts.mod_gfsk = 1;
state.rf_mod = 2;
printf ("Enabling only GFSK modulation optimizations.\n");
printf ("Decoding only ProVoice frames.\n");
}
else if (optarg[0] == '1')
{
opts.frame_dstar = 0;
opts.frame_x2tdma = 0;
opts.frame_p25p1 = 1;
opts.frame_nxdn = 0;
opts.frame_dmr = 0;
opts.frame_provoice = 0;
printf ("Decoding only P25 Phase 1 frames.\n");
}
else if (optarg[0] == 'n')
{
opts.frame_dstar = 0;
opts.frame_x2tdma = 0;
opts.frame_p25p1 = 0;
opts.frame_nxdn = 1;
opts.frame_dmr = 0;
opts.frame_provoice = 0;
printf ("Decoding only NXDN 9600 baud frames.\n");
}
else if (optarg[0] == 'r')
{
opts.frame_dstar = 0;
opts.frame_x2tdma = 0;
opts.frame_p25p1 = 0;
opts.frame_nxdn = 0;
opts.frame_dmr = 1;
opts.frame_provoice = 0;
printf ("Decoding only DMR/MOTOTRBO frames.\n");
}
break;
case 'm':
if (optarg[0] == 'a')
{
opts.mod_c4fm = 1;
opts.mod_qpsk = 1;
opts.mod_gfsk = 1;
state.rf_mod = 0;
}
else if (optarg[0] == 'c')
{
opts.mod_c4fm = 1;
opts.mod_qpsk = 0;
opts.mod_gfsk = 0;
state.rf_mod = 0;
printf ("Enabling only C4FM modulation optimizations.\n");
}
else if (optarg[0] == 'g')
{
opts.mod_c4fm = 0;
opts.mod_qpsk = 0;
opts.mod_gfsk = 1;
state.rf_mod = 2;
printf ("Enabling only GFSK modulation optimizations.\n");
}
else if (optarg[0] == 'q')
{
opts.mod_c4fm = 0;
opts.mod_qpsk = 1;
opts.mod_gfsk = 0;
state.rf_mod = 1;
printf ("Enabling only QPSK modulation optimizations.\n");
}
break;
case 'u':
sscanf (optarg, "%i", &opts.uvquality);
if (opts.uvquality < 1)
{
opts.uvquality = 1;
}
else if (opts.uvquality > 64)
{
opts.uvquality = 64;
}
printf ("Setting unvoice speech quality to %i waves per band.\n", opts.uvquality);
break;
case 'x':
if (optarg[0] == 'x')
{
opts.inverted_x2tdma = 0;
printf ("Expecting non-inverted X2-TDMA signals.\n");
}
else if (optarg[0] == 'r')
{
opts.inverted_dmr = 1;
printf ("Expecting inverted DMR/MOTOTRBO signals.\n");
}
break;
case 'A':
sscanf (optarg, "%i", &opts.mod_threshold);
printf ("Setting C4FM/QPSK auto detection threshold to %i\n", opts.mod_threshold);
break;
case 'S':
sscanf (optarg, "%i", &opts.ssize);
if (opts.ssize > 128)
{
opts.ssize = 128;
}
else if (opts.ssize < 1)
{
opts.ssize = 1;
}
printf ("Setting QPSK symbol buffer to %i\n", opts.ssize);
break;
case 'M':
sscanf (optarg, "%i", &opts.msize);
if (opts.msize > 1024)
{
opts.msize = 1024;
}
else if (opts.msize < 1)
{
opts.msize = 1;
}
printf ("Setting QPSK Min/Max buffer to %i\n", opts.msize);
break;
case 'r':
opts.playfiles = 1;
opts.errorbars = 0;
opts.datascope = 0;
state.optind = optind;
break;
default:
usage ();
exit (0);
}
}
if (opts.resume > 0)
{
openSerial (&opts, &state);
}
if (opts.playfiles == 1)
{
opts.split = 1;
opts.playoffset = 0;
opts.delay = 0;
openAudioOutDevice (&opts, 8000);
}
else if (strcmp (opts.audio_in_dev, opts.audio_out_dev) != 0)
{
opts.split = 1;
opts.playoffset = 0;
opts.delay = 0;
openAudioOutDevice (&opts, 8000);
openAudioInDevice (&opts);
}
else
{
opts.split = 0;
opts.playoffset = 38;
opts.delay = 0;
openAudioInDevice (&opts);
opts.audio_out_fd = opts.audio_in_fd;
}
if (opts.playfiles == 1)
{
playMbeFiles (&opts, &state, argc, argv);
}
else
{
liveScanner (&opts, &state);
}
return (0);
}

122
dsd_mbe.c
View File

@@ -1,122 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
void
playMbeFiles (dsd_opts * opts, dsd_state * state, int argc, char **argv)
{
int i;
char imbe_d[88];
char ambe_d[49];
for (i = state->optind; i < argc; i++)
{
sprintf (opts->mbe_in_file, argv[i]);
openMbeInFile (opts, state);
mbe_initMbeParms (state->cur_mp, state->prev_mp, state->prev_mp_enhanced);
printf ("playing %s\n", opts->mbe_in_file);
while (feof (opts->mbe_in_f) == 0)
{
if (state->mbe_file_type == 0)
{
readImbe4400Data (opts, state, imbe_d);
mbe_processImbe4400Dataf (state->audio_out_temp_buf, &state->errs, &state->errs2, state->err_str, imbe_d, state->cur_mp, state->prev_mp, state->prev_mp_enhanced, opts->uvquality);
processAudio (opts, state);
if (opts->wav_out_fd != -1)
{
writeSynthesizedVoice (opts, state);
}
if (opts->audio_out == 1)
{
playSynthesizedVoice (opts, state);
}
}
else if (state->mbe_file_type == 1)
{
readAmbe2250Data (opts, state, ambe_d);
mbe_processAmbe2250Dataf (state->audio_out_temp_buf, &state->errs, &state->errs2, state->err_str, ambe_d, state->cur_mp, state->prev_mp, state->prev_mp_enhanced, opts->uvquality);
processAudio (opts, state);
if (opts->wav_out_fd != -1)
{
writeSynthesizedVoice (opts, state);
}
if (opts->audio_out == 1)
{
playSynthesizedVoice (opts, state);
}
}
}
}
}
void
processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char ambe_fr[4][24], char imbe7100_fr[7][24])
{
int i;
char imbe_d[88];
char ambe_d[49];
for (i = 0; i < 88; i++)
{
imbe_d[i] = 0;
}
if ((state->synctype == 0) || (state->synctype == 1))
{
mbe_processImbe7200x4400Framef (state->audio_out_temp_buf, &state->errs, &state->errs2, state->err_str, imbe_fr, imbe_d, state->cur_mp, state->prev_mp, state->prev_mp_enhanced, opts->uvquality);
if (opts->mbe_out_f != NULL)
{
saveImbe4400Data (opts, state, imbe_d);
}
}
else if ((state->synctype == 14) || (state->synctype == 15))
{
mbe_processImbe7100x4400Framef (state->audio_out_temp_buf, &state->errs, &state->errs2, state->err_str, imbe7100_fr, imbe_d, state->cur_mp, state->prev_mp, state->prev_mp_enhanced, opts->uvquality);
if (opts->mbe_out_f != NULL)
{
saveImbe4400Data (opts, state, imbe_d);
}
}
else
{
mbe_processAmbe3600x2250Framef (state->audio_out_temp_buf, &state->errs, &state->errs2, state->err_str, ambe_fr, ambe_d, state->cur_mp, state->prev_mp, state->prev_mp_enhanced, opts->uvquality);
if (opts->mbe_out_f != NULL)
{
saveAmbe2250Data (opts, state, ambe_d);
}
}
if (opts->errorbars == 1)
{
printf ("%s", state->err_str);
}
processAudio (opts, state);
if (opts->wav_out_fd != -1)
{
writeSynthesizedVoice (opts, state);
}
if (opts->audio_out == 1)
{
playSynthesizedVoice (opts, state);
}
}

View File

@@ -1,180 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
int
getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
{
short sample;
int i, sum, symbol, count;
sum = 0;
count = 0;
for (i = 0; i < state->samplesPerSymbol; i++)
{
// timing control
if ((i == 0) && (have_sync == 0))
{
if (state->rf_mod == 1)
{
if ((state->jitter >= 0) && (state->jitter < state->symbolCenter))
{
i++; // fall back
}
else if ((state->jitter > state->symbolCenter) && (state->jitter < 10))
{
i--; // catch up
}
}
else if (state->rf_mod == 2)
{
if ((state->jitter >= state->symbolCenter - 1) && (state->jitter <= state->symbolCenter))
{
i--;
}
else if ((state->jitter >= state->symbolCenter + 1) && (state->jitter <= state->symbolCenter + 2))
{
i++;
}
}
else if (state->rf_mod == 0)
{
if ((state->jitter > 0) && (state->jitter <= state->symbolCenter))
{
i--; // catch up
}
else if ((state->jitter > state->symbolCenter) && (state->jitter < state->samplesPerSymbol))
{
i++; // fall back
}
}
state->jitter = -1;
}
read (opts->audio_in_fd, &sample, 2);
if ((sample > state->max) && (have_sync == 1) && (state->rf_mod == 0))
{
sample = state->max;
}
else if ((sample < state->min) && (have_sync == 1) && (state->rf_mod == 0))
{
sample = state->min;
}
if (sample > state->center)
{
if (state->lastsample < state->center)
{
state->numflips += 1;
}
if (sample > (state->maxref * 1.25))
{
if (state->lastsample < (state->maxref * 1.25))
{
state->numflips += 1;
}
if ((state->jitter < 0) && (state->rf_mod == 1))
{ // first spike out of place
state->jitter = i;
}
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{
printf ("O");
}
}
else
{
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{
printf ("+");
}
if ((state->jitter < 0) && (state->lastsample < state->center) && (state->rf_mod != 1))
{ // first transition edge
state->jitter = i;
}
}
}
else
{ // sample < 0
if (state->lastsample > state->center)
{
state->numflips += 1;
}
if (sample < (state->minref * 1.25))
{
if (state->lastsample > (state->minref * 1.25))
{
state->numflips += 1;
}
if ((state->jitter < 0) && (state->rf_mod == 1))
{ // first spike out of place
state->jitter = i;
}
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{
printf ("X");
}
}
else
{
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{
printf ("-");
}
if ((state->jitter < 0) && (state->lastsample > state->center) && (state->rf_mod != 1))
{ // first transition edge
state->jitter = i;
}
}
}
if (state->samplesPerSymbol == 5)
{
if ((i >= 2) && (i <= 2))
{
sum += sample;
count++;
}
}
else
{
if (((i >= state->symbolCenter - 1) && (i <= state->symbolCenter + 2) && (state->rf_mod == 0)) || (((i == state->symbolCenter) || (i == state->symbolCenter + 1)) && (state->rf_mod != 0)))
{
sum += sample;
count++;
}
}
state->lastsample = sample;
}
symbol = (sum / count);
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{
if (state->jitter >= 0)
{
printf (" %i\n", state->jitter);
}
else
{
printf ("\n");
}
}
state->symbolcnt++;
return (symbol);
}

View File

@@ -1,171 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
void
upsample (dsd_state * state, float invalue)
{
int i, j, sum;
float *outbuf1, a, b, c, d;
float phasestart, phaseend, resamplestart, resampleend, phasestep, resampleamp2;
float resamplemin, resamplemax;
if (state->audio_out_idx2 > 23)
{
outbuf1 = state->audio_out_float_buf_p;
outbuf1--;
c = *outbuf1;
outbuf1 -= 6;
b = *outbuf1;
outbuf1 -= 6;
a = *outbuf1;
d = (invalue);
resamplemin = 32767;
resamplemax = -32768;
if (a < resamplemin)
{
resamplemin = a;
}
if (a > resamplemax)
{
resamplemax = a;
}
if (b < resamplemin)
{
resamplemin = b;
}
if (b > resamplemax)
{
resamplemax = b;
}
if (c < resamplemin)
{
resamplemin = c;
}
if (c > resamplemax)
{
resamplemax = c;
}
if (d < resamplemin)
{
resamplemin = d;
}
if (d > resamplemax)
{
resamplemax = d;
}
resampleamp2 = ((float) resamplemax - (float) resamplemin) / (float) 2;
#ifdef UPSAMPLE_DEBUG
printf ("a:%f b:%f c:%f d:%f resamplemin:%f resamplemax:%f resampleamp2:%f\n", a, b, c, d, resamplemin, resamplemax, resampleamp2);
#endif
if (resampleamp2 == 0)
{
resamplestart = (float) 0;
resampleend = (float) 0;
}
else
{
resamplestart = (((float) b - (float) resamplemin) / resampleamp2) - (float) 1.0;
resampleend = (((float) c - (float) resamplemin) / resampleamp2) - (float) 1.0;
}
if (resamplestart < -1)
{
resamplestart = (float) -1;
}
else if (resamplestart > (float) 1)
{
resamplestart = (float) 1;
}
if (resampleend < -1)
{
resampleend = (float) -1;
}
else if (resampleend > (float) 1)
{
resampleend = (float) 1;
}
phasestart = asinf (resamplestart);
phaseend = asinf (resampleend);
phasestep = (phaseend - phasestart) / 6;
#ifdef UPSAMPLE_DEBUG
printf ("resamplestart:%f, resampleend:%f, phasestart:%f, phaseend:%f, phasestep:%f\n", resamplestart, resampleend, phasestart, phaseend, phasestep);
#endif
// rewrite samples between b and c
outbuf1 = state->audio_out_float_buf_p;
outbuf1 -= 6;
for (i = 1; i < 6; i++)
{
*outbuf1 = (resamplemin + resampleamp2 + (resampleamp2 * sin (phasestart + (phasestep * (float) i))));
#ifdef UPSAMPLE_DEBUG
printf ("audio_out_idx2:%i outbuf:%f\n", state->audio_out_idx2, *outbuf1);
#endif
outbuf1++;
}
#ifdef UPSAMPLE_DEBUG
printf ("(c):%f\n", *outbuf1);
#endif
// write d
outbuf1 += 6;
*outbuf1 = d;
#ifdef UPSAMPLE_DEBUG
printf ("audio_out_idx2:%i outbuf(d):%f\n", state->audio_out_idx2, *outbuf1);
#endif
outbuf1++;
// smooth
outbuf1 -= 36;
for (j = 0; j < 12; j++)
{
for (i = 0; i < 12; i++)
{
sum = 0;
outbuf1--;
sum += *outbuf1;
outbuf1++;
sum += *outbuf1;
outbuf1++;
sum += *outbuf1;
outbuf1--;
*outbuf1 = (sum / (float) 3);
outbuf1++;
}
outbuf1 -= 11;
}
}
else
{
outbuf1 = state->audio_out_float_buf_p;
outbuf1--;
c = *outbuf1;
*outbuf1 = ((invalue * (float) 0.166) + (c * (float) 0.834));
outbuf1++;
*outbuf1 = ((invalue * (float) 0.332) + (c * (float) 0.668));
outbuf1++;
*outbuf1 = ((invalue * (float) 0.5) + (c * (float) 0.5));
outbuf1++;
*outbuf1 = ((invalue * (float) 0.668) + (c * (float) 0.332));
outbuf1++;
*outbuf1 = ((invalue * (float) 0.834) + (c * (float) 0.166));
outbuf1++;
*outbuf1 = invalue;
}
}

79
dstar.c
View File

@@ -1,79 +0,0 @@
/*
* 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.
*/
/*
* Note: D-STAR support is very incomplete and does not work yet
* It is unknown if the ambe3600x2250 decoder is even compatible with D-STAR
* voice frames. If it is then the interleave pattern needs to be determined.
* GMSK modulation optimizations will also required to get a usable bit error
* rate. This was included mainly as an example of how other systmes might
* be supported.
*/
#include "dsd.h"
#include "dstar_const.h"
void
processDSTAR (dsd_opts * opts, dsd_state * state)
{
// extracts AMBE frames from D-STAR voice frame
int i, j, dibit;
char ambe_fr[4][24];
char dstar[300];
const int *w, *x;
if (opts->errorbars == 1)
{
printf ("e:");
}
#ifdef DSTAR_DUMP
printf ("\n");
#endif
for (j = 0; j < 210; j++) // 210 is very long but used for debugging
{
// voice frame
w = dW;
x = dX;
for (i = 0; i < 72; i++)
{
dibit = getDibit (opts, state);
dstar[i] = dibit + 48;
ambe_fr[*w][*x] = (1 & dibit);
w++;
x++;
}
dstar[i] = 32;
processMbeFrame (opts, state, NULL, ambe_fr, NULL);
// data frame
for (i = 73; i < 97; i++)
{
dstar[i] = getDibit (opts, state) + 48;
}
dstar[i] = 0;
#ifdef DSTAR_DUMP
printf ("%s\n", dstar);
#endif
}
if (opts->errorbars == 1)
{
printf ("\n");
}
}

View File

@@ -1,311 +0,0 @@
/*
* 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.
*/
/*
* dstar interleave experiments
*/
#ifndef _MAIN
extern const int dW[72];
extern const int dX[72];
#else
/*
* 4x18
*/
/*
const int dW[72] = {
0,0,1,2,
0,0,1,2,
0,0,1,2,
0,0,1,2,
0,0,1,3,
0,0,1,3,
0,1,1,3,
0,1,1,3,
0,1,1,3,
0,1,1,3,
0,1,1,3,
0,1,2,3,
0,1,2,3,
0,1,2,3,
0,1,2,3,
0,1,2,3,
0,1,2,3,
0,1,2,3
};
const int dX[72] = {
23,5,10,3,
22,4,9,2,
21,3,8,1,
20,2,7,0,
19,1,6,13,
18,0,5,12,
17,22,4,11,
16,21,3,10,
15,20,2,9,
14,19,1,8,
13,18,0,7,
12,17,10,6,
11,16,9,5,
10,15,8,4,
9,14,7,3,
8,13,6,2,
7,12,5,1,
6,11,4,0
};
*/
/*
* 3x24 alt
*/
const int dW[72] = {
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 3,
1, 0, 2,
1, 0, 2,
1, 0, 2,
1, 0, 2,
1, 0, 2,
1, 0, 2,
1, 0, 2,
1, 0, 2,
1, 0, 2,
1, 0, 2,
0, 3, 2,
};
const int dX[72] = {
22, 22, 12,
21, 21, 11,
20, 20, 10,
19, 19, 9,
18, 18, 8,
17, 17, 7,
16, 16, 6,
15, 15, 5,
14, 14, 4,
13, 13, 3,
12, 12, 2,
11, 11, 1,
10, 10, 0,
9, 9, 10,
8, 8, 9,
7, 7, 8,
6, 6, 7,
5, 5, 6,
4, 4, 5,
3, 3, 4,
2, 2, 3,
1, 1, 2,
0, 0, 1,
23, 13, 0
};
/*
* 3x24
*/
/*
const int dW[72] = {
0,1,2,
0,1,2,
0,1,2,
0,1,2,
0,1,2,
0,1,2,
0,1,2,
0,1,2,
0,1,2,
0,1,2,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,1,3,
0,2,3,
};
const int dX[72] = {
23,22,9,
22,21,8,
21,20,7,
20,19,6,
19,18,5,
18,17,4,
17,16,3,
16,15,2,
15,14,1,
14,13,0,
13,12,13,
12,11,12,
11,10,11,
10,9,10,
9,8,9,
8,7,8,
7,6,7,
6,5,6,
5,4,5,
4,3,4,
3,2,3,
2,1,2,
1,0,1,
0,10,0
};
*/
/*
* 2x36
*/
/*
const int dW[72] = {
0,1,
0,1,
0,1,
0,1,
0,1,
0,1,
0,1,
0,1,
0,1,
0,1,
0,1,
0,2,
0,2,
0,2,
0,2,
0,2,
0,2,
0,2,
0,2,
0,2,
0,2,
0,2,
0,3,
0,3,
1,3,
1,3,
1,3,
1,3,
1,3,
1,3,
1,3,
1,3,
1,3,
1,3,
1,3,
1,3
};
const int dX[72] = {
23,10,
22,9,
21,8,
20,7,
19,6,
18,5,
17,4,
16,3,
15,2,
14,1,
13,0,
12,10,
11,9,
10,8,
9,7,
8,6,
7,5,
6,4,
5,3,
4,2,
3,1,
2,0,
1,13,
0,12,
22,11,
21,10,
20,9,
19,8,
18,7,
17,6,
16,5,
15,4,
14,3,
13,2,
12,1,
11,0
};
*/
/*
* non-interleaved
*/
/*
const int dW[72] = {
0,0,0,0,0,0,
0,0,0,0,0,0,
0,0,0,0,0,0,
0,0,0,0,0,0,
1,1,1,1,1,1,
1,1,1,1,1,1,
1,1,1,1,1,1,
1,1,1,1,1,2,
2,2,2,2,2,2,
2,2,2,2,3,3,
3,3,3,3,3,3,
3,3,3,3,3,3
};
const int dX[72] = {
23,22,21,20,19,18,
17,16,15,14,13,12,
11,10,9,8,7,6,
5,4,3,2,1,0,
22,21,20,19,18,17,
16,15,14,13,12,11,
10,9,8,7,6,5,
4,3,2,1,0,10,
9,8,7,6,5,4,
3,2,1,0,13,12,
11,10,9,8,7,6,
5,4,3,2,1,0
};
*/
#endif

View File

@@ -0,0 +1,74 @@
## Audio Plumbing
While using DSD-FME to demodulate and decode RF Audio, you will find it necessary to properly plumb (or route) audio from each input source and output sink properly. This mini tutorial aims to help you do such when using Pulse Audio.
You will first want to locate and run the virtualsink.sh script file via `sh virtualsink.sh` command. This will create two null-sink, or 'virtual sinks' for us to plumb audio from point A to point B.
Here are screenshots of a proper setup using pavucontrol, or "Pulse Audio Volume Control", having voice input from the encoder listening to your microphone, the RF Output going into the "Virtual_Sink" null-sink, and on the playback side, playing back voice to our speakers, with RF modulated audio being monitored on "Virtual-Sink" null-sink.
![Audio 1](https://github.com/lwvmobile/dsd-fme/blob/aw_dev/examples/pavucontrol_plumbing1.png)
![Audio 2](https://github.com/lwvmobile/dsd-fme/blob/aw_dev/examples/pavucontrol_plumbing2.png)
The general idea is that we want to route RF modulated audio into our Virtual_Sink and have our decoder listen to the same sink. Voice Output should always be to Audio Hardware (speakers, headphones, etc).
Note, that using the virtualsink.sh will create these sinks for us for the duration of your computers boot. If you reboot, they will not persist. Configuration files can be modified to always have these sinks available, or the `virtualsink.sh` script can be executed on login, but you must do so at your own risk and own research, it is out of the scope of this tutorial to create persistent sinks.
In case of the usage of a headless environment and pavucontrol is not viable, you may use alternatives such as pulsemixer which is similar in functionality, just as a CLI tool and not a GUI tool.
Users can now use the `-O` CLI argument to list out all pulse audio input sources and output sinks and pass an optional argument alongside `pulse`, appending the name or index number to select the device each time. This method will work in both Linux environments as well as Cygwin builds (making sure to start the pulseaudio.exe server in the back first with the specified .bat file or command, see below).
For Example:
The Output (truncated) of `dsd-fme -O`
```
=======[ Output Device #1 ]=======
Description: Family 17h (Models 00h-0fh) HD Audio Controller Analog Stereo
Name: alsa_output.pci-0000_0d_00.3.analog-stereo
Index: 1
=======[ Output Device #4 ]=======
Description: Virtual_Sink1
Name: virtual_sink1
Index: 4
=======[ Output Device #5 ]=======
Description: Virtual_Sink2
Name: virtual_sink2
Index: 5
=======[ Input Device #2 ]=======
Description: Family 17h (Models 00h-0fh) HD Audio Controller Analog Stereo
Name: alsa_input.pci-0000_0d_00.3.analog-stereo
Index: 2
=======[ Input Device #5 ]=======
Description: Monitor of Virtual_Sink1
Name: virtual_sink1.monitor
Index: 5
=======[ Input Device #6 ]=======
Description: Monitor of Virtual_Sink2
Name: virtual_sink2.monitor
Index: 6
```
You might use any of the following for input and output options:
```
-i pulse
-i pulse:6
-i pulse:virtual_sink2.monitor
-o pulse
-o pulse:1
-o pulse:alsa_output.pci-0000_0d_00.3.analog-stereo
```
Something to keep in mind is that often times, you only need to set these values once, as a pulse audio server (or plugin) can often times remember these settings, even across reboots, as long as the same hardware is present for future use (real or null-sink).
<!-- TODO: Add This later -->
<!-- Cygwin Note: Running the supplied `0p - start-pulse-audio-backend.bat` file will not only start up the pulse audio server for you, but also setup your null-sinks, and enumerate all devices for you to use, making it an easy selection for your start up .bat files. See any notes in the precomplied .zip file for more information. -->

319
examples/Example_Usage.md Normal file
View File

@@ -0,0 +1,319 @@
### Example Usage and Notes!
`dsd-fme` is all you need to run for pulse input, pulse output, and auto detect for DMR BS/MS, and P25. To use other decoding methods which cannot be auto detected, please use the following command line switches.
```
-ft XDMA decoder class (P25p1 and p2, YSF, and DMR Stereo)
-fs DMR Stereo, also may need to use -xr if inverted DMR
-fa Legacy Auto (not recommended)
-fi NXDN48
-fn NXDN96
-fp Provoice
-fh EDACS Standard / Network
-fH EDACS Standard / Network with ESK
-fe EDACS Extended Addresssing
-fE EDACS Extended Addressing with ESK
-fm dPMR, also may need to use -xd if inverted dPMR.
-f1 P25P1
-f2 P25P2 (may need to specify wacn/sys/nac manually if traffic channel)
-fx X2-TDMA
-fy YSF
-fz M17 Stream
```
## Conventional Frequency Scanner
This feature is used to allow DSD-FME to use RIGCTL or RTL input and cycle through frequencies to attain a frame sync.
This works almost identically to how the trunkng methods work, but instead of locking onto a control channel and tuning based on its decoding, it tunes through all loaded frequencies in a CSV file and stops when it finds a frame sync. This method is meant for loading a bunch of conventional non-trunking frequencies that signal only when voice or short data bursts are present (DMR T2, Conventional P25 P1, Conventional NXDN, etc) and decode them until the frame sync stops and then resume its scan. This method uses SDR++ RIGCTL, or RTL internal handling to go through signal. -Y is the scan switch. Note: This method will NOT perform at a level similar to a real hardware scanner, SDR tuning is not nearly as fast or reliable at locking onto signal.
To scan through a mixture of DMR and P25 Conventional, use:
`dsd-fme -i tcp -C channel_map.csv -G group.csv -Y -U 4532 -N 2> log.ans`
To scan through NXDN48 only conventional, use:
`dsd-fme -fi -i tcp -C channel_map.csv -Y -U 4532 -N 2> log.ans`
To scan through NXDN96 only conventional, use:
`dsd-fme -fn -i tcp -C channel_map.csv -Y -U 4532 -N 2> log.ans`
The Channel Map setup will be identical to any of the channel maps found for trunking systems, channel numbers do not matter and can be arbitrarily organized, and frequencies can be duplicated to be 'scanned' more frequently in larger CSV files. Scan speed by default is 1 second, and is most stable at that speed. This can be adjusted by using the `-t 2` option, for example, to specify 2 seconds of hang time per frequency. ~~If activity occurs on a frequency, an additional 2 seconds of 'hangtime' will occur on that frequency for any follow up voice activity.~~ Using `-t 0` will forego the one second wait time, and this can work in some situations, but is not advised as it may skip during the middle of transmissions, or skip over them entirely without a framesync.
Please Note: DMR Simplex may not behave well on scan, I have not been able to test it as such, but given the nature of the on-off timeslot signalling on DMR Simplex, missed frame syncs and skipping/resuming scan may occur.
## Trunking Examples
Please see trunking.sh for sample start up scripts or scroll down to the bottom for more explanation.
## Example Usage - Default Decoder, Ncurses Terminal, Pulse Input/Output, and Log Console to file
`dsd-fme -N 2> voice.log`
and in a second terminal tab, same folder, run
`tail -n 40 -f voice.log`
### Audio Plumbing
Please see [Audio Plumbing](https://github.com/lwvmobile/dsd-fme/blob/aw_dev/examples/Audio_Plumbing.md "Audio Plumbing") for general help with audio plumbing (routing from A to B).
### Input ###
--TCP Direct Audio Link with SDR++
`dsd-fme -i tcp` Currently defaults to localhost:7355 (SDR++ defaults)
`dsd-fme -i tcp:192.168.7.5:7356` (remote host and custom port)
--48000/9600 Mono Wav File Input
`dsd-fme -i filename.wav` 48k/1 Audio (SDR++, GQRX wav recordings)
`dsd-fme -i filename.wav -s 96000` 96k/1 (DSDPlus Raw Signal Wav Files)
Wav File Input Note: Due to 96000 rate audio requiring me to double the symbol rate and center, be sure to use the -s 96000 at the very end of the startup command. Also, some NXDN48/96 may have difficulties decoding properly with wav file input.
## Example Usage - RTL2832 Dongle Input
Short Setup (all default values):
`dsd-fme -i rtl`
Detailed Setup:
`dsd-fme -ft -i rtl:0:154.9875M:26:-2:8:0:6020 `
```
RTL-SDR options:
Usage: rtl:dev:freq:gain:ppm:bw:sq:vol
NOTE: all arguments after rtl are optional now for trunking, but user configuration is recommended
dev <num> RTL-SDR Device Index Number
freq <num> RTL-SDR Frequency (851800000 or 851.8M)
gain <num> RTL-SDR Device Gain (0-49)(default = 0; Hardware AGC recommended)
ppm <num> RTL-SDR PPM Error (default = 0)
bw <num> RTL-SDR Bandwidth kHz (default = 12)(8, 12, 16, 24)
sq <num> RTL-SDR Squelch Level vs RMS Value (Optional)
vol <num> RTL-SDR Sample 'Volume' Multiplier (default = 2)(1,2,3)
Example: dsd-fme -fs -i rtl -C cap_plus_channel.csv -T
Example: dsd-fme -fp -i rtl:0:851.375M:22:-2:24:0:2
```
## Example Usage - Extra Payload/PDU Logging
`dsd-fme -Z -N 2> log.ans`
and in a second terminal tab, same folder, run
`tail -n 40 -f log.ans`
### EDACS/P25/NXDN/DMR Simple/Single VFO Trunking ###
EDACS Trunking (w/ channel map import)
--EDACS/PV Trunking using RIGCTL and TCP Direct Link Audio inside of SDR++ (see switches above for STD/NET, EA, and ESK modes)
`dsd-fme -i tcp -fE -C channel_map.csv -G group.csv -T -U 4532 -N 2> log.ans`
--NXDN48 Trunking (Direct Frequency Assignment) with SDR++ (untested for frequency accuracy)
`dsd-fme -fi -i tcp -T -U 4532 -N 2> log.ans`
--NXDN48 Trunking (w/ channel map import) with SDR++ (put control channel frequency at channel 0 in channel_map.csv)
`dsd-fme -fi -i tcp -T -U 4532 -C channel_map.csv -N 2> log.ans`
--DMR Trunking (w/ channel map import) with SDR++ (put control channel frequency at channel 0 (TIII and Con+) in channel_map.csv)
`dsd-fme -fs -i tcp -T -U 4532 -C channel_map.csv -N 2> log.ans`
--P25 Trunking P1 and P2 (C4FM) with SDR++
`dsd-fme -i tcp -T -U 4532 -N 2> log.ans`
--P25 Trunking (QPSK) with P1 Control Channel (Should switch symbol rate and center on Phase 2 audio channels)
`dsd-fme -i tcp -T -U 4532 -N -mq 2> log.ans`
--P25 Trunking Phase 2 TDMA Control Channel systems with QPSK (non Phase 1 systems)
`dsd-fme -i tcp -T -U 4532 -N -f2 -m2 2> log.ans`
Trunking Note1: All samples above can also be run with the RTL input method and setting of RTL UDP remote port. In terms of performance, however, SDR++ will do a much better job on weaker/marginal signal compared to the RTL input. RTL input should only be used on strong signal.
`dsd-fme -fp -i rtl:0:851.8M:22:-2:24:0:6020 -T -C channel_map.csv -G group.csv -N 2> log.ans`
Trunking Note2: QPSK Phase 1 and Phase 2 Systems may be subceptible to LSM distortion issues, but seem to do okay, but require really good signal. Some CRC issues still occur with Phase 2 TDMA LCCH Mac Signal that can affect reliability, I believe this issue is ultimately caused by the PSK demodulation inside of FME. I also don't believe this will work on 8-level PSK, but I cannot determine that at the moment. Update: I have improved the LCCH Mac Signal decoding my increasing the QPSK decision point buffers to their maximum values.
Trunking Note3: DMR Trunking has been coded, and some testing and tweaks have been carried out. Cap+, Con+, and TIII systems seem to do well with trunking now. Placing the frequency for the control channel at channel map 0 in your channel_map.csv file is not required now if using RIGCTL or the RTL Input, both can poll the VFO for the current frequency if it believes its on a control channel, but setting a fake channel number (i.e. 999) first with the CC frequency will result in finding the CC faster on startup if desired. If you need to map out your channels for TIII, you can observe the console output and look for channel numbers. For conveniece I have included the DSDPlus style LSN-esque numbering into the console print so it will make it easier for users from DSDPlus to map frequencies into the channel_map.csv file. Make sure your channel numbers are the lpcn (12-bit logical physical channel number - decimal format) values from the log, and not the LPCN+TS (13-bit DSDPlus LSN) values. Notice: TIII Site ID value needs work to determine proper DMRLA values for system area and sub area.
```
00:43:00 Sync: +DMR [slot1] slot2 | Color Code=00 | CSBK
Talkgroup Voice Channel Grant (TV_GRANT) - Logical
LPCN: 0075; TS: 2; LPCN+TS: 0152; Target: 16518173 - Source: 16533625
```
Use channel 75 in your import file, which would correspond to dsdplus channels 151 and 152 (151 = TS1 / 152 = TS2).
For Connect Plus, enumerate your list from 1 to the last channel and add the frequency. For Capacity Plus, LSN 1 and 2 will share the same frequency, 3 and 4 will share, 5 and 6 will share, and 7-8 will share, as Capacity Plus counts each 'channel' as two seperate channels (LSN), one for each time slot. Capacity Plus Quirk: DSD-FME makes its best effort to follow the rest channel in the event that the sync is lost for longer than the hangtime, but occassionally, DSD-FME may lose the rest channel and will have to hunt through all frequencies to find it again.
Trunking Note4: NXDN Trunking v1 will require a channel map. Please see the example folder for an appropriate channel map. NOTICE: NXDN trunking has been fixed on the RTL (rtl_fm) input method and works correctly now using a soft squelch value to determine when to look for frame sync. Tests show this works very well, but squelch adjustments may be required to differentiate the noise floor from the signal.
NXDN Trunking Update: NXDN DFA (Direct Frequency Assignment) has been coded from the v2 documents, so using a channel map may not be required, as long as the DFA is configured with standard values, and not 'system definable' values. This will only work on trunking systems that use DFA (newer systems) in accordance to the v2 CAI document NXDN TS 1-A Version 2.0 September 2016. If the system uses 'system definable' values, then make sure to put the channels in a channel map csv file as as the 16-bit OFN values for proper tuning.
NXDN Type-D/IDAS Update: Type-D or IDAS decoding/trunking has been coded now and tested on a small two channel system. Set up a channel map much like Type-C trunking. If preferred, insert channel 31 at the top of your channel map for the 'home repeater' or go to channel of choice during a TX_REL or DISC message. Extensive testing of Type-D has not been conducted. Some cavaets may currently include iffy per call wav file saving and potentially shifting SRC and TGT ID values due to how SCCH messages are handled and how Busy Repeater Messages are handled. Private calls will need to be enabled by enabling 'data calls', if desired. During testing, only data calls came on private calls, so this was set to disabled by default, but can be enabled with data calls enabled. Also, note that some home repeater channels may or may not carry calls from all systems.
Channel Map and Group CSV Note: Leave the top line of the channel_map.csv and group.csv as the label, do not delete the line, if no line is there, dsd_import skips the first line so it will not import the first channel or first group in those files if there is something there that isn't a label.
Hytera XPT: Code has been added for XPT system slco/flco/csbk decoding and trunking. The setup will be similar to Capacity Plus trunking in the csv file, listing each LSN channel to a frequency (see examples/hytera_xpt_chan.csv). Currently, this set up is working with smaller XPT systems that I have been able to test with.
## NCurses Keyboard Shortcuts ##
Some Keyboard Shortcuts have been implemented for testing to see how users like them. Just hope nobody pushes a key on accident and doesn't know which one it was or what it does. The current list of keyboard shortcuts include:
```
esc or arrow keys - ncurses menu
q - quit
c - toggle compact mode
h - cycle event history short, long, or off
z - toggle console payloads
a - toggle call alert beep
4 - force privacy/scrambler key assertion over enc identifiers (dmr and nxdn)
6 - force rc4 key assertion over missing pi header/le enc identifiers (dmr)
i - toggle signal inversion on types that can't auto detect (dmr, dpmr)
m - toggle c4fm/qpsk 10/4 (everything but phase 2 signal)
M - toggle c4fm/qpsk 8/3 (phase 2 tdma control channel)
R - start capturing symbol capture bin (date/time name file)
r - stop capturing symbol capture bin
spacebar - replay last symbol capture bin (captures must be stopped first)
s - stop playing symbol capture bin or wav input file (lower s)
P - start per call decoded wav files (Capital P)
p - stop per call decoded wav files (lower p)
t - toggle trunking (needs either rtl input, or rigctl connection)
y - toggle scanner (needs either rtl input, or rigctl connection)
1 - Toggle Voice Synthesis in TDMA Slot 1 or FDMA Conventional Voice
2 - Toggle Voice Synthesis in TDMA Slot 2
w - Toggle Trunking/Playback White List (Allow A Groups Only) / Black List (Block B or DE groups only) Mode
T - Toggle Trunking Tuning to Group Calls (DMR T3, Con+, Cap+, P25, NXDN)
u - Toggle Trunking Tuning to Private Calls (DMR T3, Cap+, P25)
d - Toggle Trunking Tuning to Data Calls (DMR T3, NXDN)
e - Toggle Trunking Tuning to Encrypted Calls (P25)
8 - Connect to SDR++ TCP Audio Sink with Defaults/Retry Sink Connection on Disconnect
9 - Connect to SDR++ RIGCTL Server with Defaults/Retry RIGCTL Connection
D - Reset DMR Site Parms/Call Strings, etc.
Z - Simulate NoCarrier/No VC/CC sync (capital Z)
! - Lockout Tuning/Playback of TG in Slot 1 or Conventional -- Current Session Only if no group.csv file specified
@ - Lockout Tuning/Playback of TG in Slot 2 -- Current Session Only if no group.csv file specified
k - Hold TG in Slot 1 or Conventional, or clear current hold
l - Hold TG in Slot 2 on TDMA Systems, or clear current hold
C - Drop Call and Return to CC during trunking operation
L - Manual Cycle Forward Channel Tuned when RIGCTL or using RTL input and channel csv loaded
S - Toggle between EDACS Standard/Network and Extended Addressing mode (Capital S)
A - Toggle EDACS ESK Mask (none vs A0)
H - Toggle High Pass Filter on Digital Sythesized Voice
V - Toggle Low Pass Filter on Analog Voice or Raw Signal Monitoring
B - Toggle High Pass Filter on Analog Voice or Raw Signal Monitoring
N - Toggle Passband Filter on Analog Voice or Raw Signal Monitoring
[ - Scroll backwards through Event History
] - Scroll forwards through Event History
\ - Switch between Slot 1 and Slot 2 Event History
v - Cycle RTL Input Volume Multiplier 1X, 2X, 3X (lower v)
g - Manually decrease RTL gain
G - Manually increase RTL gain
{ - Manually decrease PPM
} - Manually increase PPM
```
## Sending Audio to a Icecast 2 Server via FFmpeg (Windows)
Make sure to enable "Stereo Mix" from Volume Control Panel and then disable Windows Sounds.
```
ffmpeg -f dshow -i audio="Stereo Mix (Realtek High Definition Audio)" -c:a aac -b:a 64k -content_type 'audio/aac' -vn -f adts icecast://source:password@192.168.5.251:8844/DSDFME
```
## Sending Audio to a Icecast 2 Server via FFmpeg (Linux w/ Pulse Audio)
`pactl list short sources`
Choose Desired Device to Cast:
```
0 auto_null.monitor module-null-sink.c s16le 2ch 48000Hz IDLE
1 alsa_output.pci-0000_0d_00.3.analog-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz RUNNING
2 alsa_input.pci-0000_0d_00.3.analog-stereo module-alsa-card.c s16le 2ch 44100Hz RUNNING
3 virtual_sink.monitor module-null-sink.c s16le 2ch 44100Hz RUNNING
4 virtual_sink2.monitor module-null-sink.c s16le 2ch 44100Hz RUNNING
7 alsa_output.pci-0000_0b_00.1.hdmi-stereo-extra1.monitor module-alsa-card.c s16le 2ch 44100Hz RUNNING
```
Example:
```
francis@12cores:~$ pactl list short sources
0 auto_null.monitor module-null-sink.c s16le 2ch 48000Hz IDLE
francis@12coresx:~$ ffmpeg -f pulse -i 0 -c:a libmp3lame -ab 64k -f mp3 icecast://source:password@XXXXXXXXX:8000
```
Note: Do not run this command for ffmpeg/icecast piped to the main dsd-fme command, make sure these are running in seperate terminals.
## Sending Audio to UDP Target/Port
Audio can be sent to a target address on your local area network with the UDP blaster using the `-o udp:targetaddress:port` option.
Note: Any analog audio monitoring will not function properly over UDP port (rate difference issues)
Example (Short 8k/2):
`dsd-fme -fs -o udp:192.168.7.8:23470`
Receiving End (Short 8k/2):
`socat stdio udp-listen:23470 | play --buffer 640 -q -b 16 -r 8000 -c2 -t s16 -`
Example (Short 8k/1):
`dsd-fme -f1 -o udp:192.168.7.8:23469`
Receiving End (Short 8k/1):
`socat stdio udp-listen:23469 | play --buffer 320 -q -b 16 -r 8000 -c1 -t s16 -`
Example (Float 8k/2):
`dsd-fme -ft -y -o udp:192.168.7.8:23468`
Receiving End (Float 8k/2):
`socat stdio udp-listen:23468 | play --buffer 1280 -q -b 16 -r 8000 -c2 -t f32 -`
Example (Float 8k/1):
`dsd-fme -fi -y -o udp:192.168.7.8:23467`
Receiving End (Float 8k/1):
`socat stdio udp-listen:23467 | play --buffer 640 -q -b 16 -r 8000 -c1 -t f32 -`
Note: --buffer option in play is calculated by (channels * samples * sizeof(samples)),
where samples is 160 for mono, 320 for stereo, and short samples are 2 and float samples are 4.
This is vital to prevent 'lag' or cut-off audio when the UDP audio doesn't fill the default buffer size.
Note2: Be sure to start the receiving end AFTER starting DSD-FME. If DSD-FME is restarted, make sure to restart the receiving end as well, as socat/UDP closes the UDP port listening when DSD-FME closes the UDP socket.
Note3: socat version 1.8 may have a `E xioopen_ipdgram_listen(): unknown address family 0` problem, downgrading to 1.7.4 is recommended if this occurs. `sudo downgrade socat`.
## Record 48k/1 audio with rtl_fm
You can record suitable audio to feed as input to dsd-fme with `-i` using rtl_fm:
`rtl_fm -M nfm -f [FREQ] -s 48k -g 42 -l 20 > input.wav`
You can also combine that with `socat` to send the audio to a remote dsd-fme instance in real time while keeping a local copy on the host where the RTL-SDR dongle is:
`rtl_fm -M fm -f [FREQ] -s 48k -g 42 -l 20 | tee input.wav | socat -u - TCP-LISTEN:1234,forever,reuseaddr`
On the remote side where dsd-fme is, use the TCP input:
`dsd-fme -i tcp:192.168.7.8:1234 -N`
Note: As always, when using rtl_fm, play with `-l` and `-g` to find a good squelch and gain values for your environment - you will know if the squelch is the right value when `input.wav` does not increase in size in the absence of useful signal on the monitored frequency.

225
examples/Install_Notes.md Normal file
View File

@@ -0,0 +1,225 @@
## How to clone and build this branch
### Ubuntu 22.04/20.04/LM20/Debian Bullseye:
Using the included download-and-install.sh should make for a simple and painless clone, build, and install on newer Debian/Ubuntu/Mint/Pi systems. Simply acquire or copy the script, and run it. Update: Ubuntu 23.04 and RPi Bullseye 64-bit has been tested working with the installer script and functions appropriately.
If you need all dependencies build and installed first (only on Debian/Ubuntu/Mint/Pi), run:
```
wget https://raw.githubusercontent.com/lwvmobile/dsd-fme/audio_work/download-and-install.sh
sh download-and-install.sh
```
### Debian 12 (SID) / Ubuntu 24.04 LTS (Updated Ncurses Dependencies)
```
wget https://raw.githubusercontent.com/lwvmobile/dsd-fme/audio_work/download-and-install-ubuntu2404lts.sh
sh download-and-install-ubuntu2404lts.sh
```
### Arch Based Distros:
```
wget https://raw.githubusercontent.com/lwvmobile/dsd-fme/audio_work/download-and-install-Arch.sh
sh download-and-install-Arch.sh
```
### Other:
If you have dependencies already installed, please run this instead:
```
wget https://raw.githubusercontent.com/lwvmobile/dsd-fme/audio_work/download-and-install-nodeps.sh
sh download-and-install-nodeps.sh
```
## Manual Install
First, install dependency packages. This guide will assume you are using Debian/Ubuntu based distros. Check your package manager for equivalent packages if different.
Debian/Mint/Ubuntu/Pi
```
sudo apt update
#Ubuntu 22.04 lts / Debian 11 and lower
sudo apt install libpulse-dev pavucontrol libsndfile1-dev libfftw3-dev liblapack-dev socat libusb-1.0-0-dev libncurses5 libncurses5-dev rtl-sdr librtlsdr-dev libusb-1.0-0-dev cmake git wget make build-essential libcodec2-dev
#Ubuntu 24.04 lts / Debian 12
#sudo apt install libpulse-dev pavucontrol libsndfile1-dev libfftw3-dev liblapack-dev socat libusb-1.0-0-dev rtl-sdr librtlsdr-dev libusb-1.0-0-dev cmake git wget make build-essential libncurses-dev libncurses6 libcodec2-dev
```
Fedora 36/37 -- from https://github.com/lwvmobile/dsd-fme/issues/99
```
sudo dnf update
sudo dnf install libsndfile-devel fftw-devel lapack-devel rtl-sdr-devel pulseaudio-libs-devel libusb-devel cmake git ncurses ncurses-devel gcc wget pavucontrol gcc-c++ codec2-devel
```
Arch -- https://github.com/lwvmobile/dsd-fme/issues/153 and https://github.com/lwvmobile/dsd-fme/issues/153
```
sudo pacman -Syu
sudo pacman -S libpulse cmake ncurses lapack perl fftw rtl-sdr codec2 base-devel libsndfile git wget rtl-sdr
```
## Headless Ubuntu Server/Pi
If running headless, swap out pavucontrol for pulsemixer, and also install pulseaudio as well. Attempting to install pavucontrol in a headless environment may attempt to install a minimal desktop environment. Note: Default behavior of pulseaudio in a headless environment may be to be muted, so check by opening pulsemixer and unmuting and routing audio appropriately.
```
sudo apt install libpulse-dev libsndfile1-dev libfftw3-dev liblapack-dev socat libusb-1.0-0-dev libncurses5 libncurses5-dev rtl-sdr librtlsdr-dev libusb-1.0-0-dev cmake git wget make build-essential libncursesw5-dev pulsemixer pulseaudio libcodec2-dev
```
MBELib is considered a requirement in this build. You must read this notice prior to continuing. [MBElib Patent Notice](https://github.com/lwvmobile/mbelib#readme "MBElib Patent Notice")
```
git clone https://github.com/lwvmobile/mbelib
git checkout ambe_tones
cd mbelib
mkdir build
cd build
cmake ..
make -j `nproc`
sudo make install
sudo ldconfig
cd ..
cd ..
```
Finish by running these steps to clone and build DSD-FME.
```
git clone https://github.com/lwvmobile/dsd-fme
cd dsd-fme
mkdir build
cd build
cmake ..
make -j `nproc`
sudo make install
sudo ldconfig
```
### LD_PATH
Some environments may require an LD path to be set to /usr/local/lib, similar to:
```
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
```
### macOS Builds (Homebrew)
Building on macOS (Apple Silicon) using [Homebrew](https://brew.sh "Homebrew") for dependencies has been tested working, but keep in mind this project is primarily focused on Linux, so macOS support should be considered experimental. Unlike the Linux steps above, macOS has no `ldconfig`, so simply skip that step wherever it appears below.
Install dependencies first:
```
brew install cmake git libsndfile pulseaudio rtl-sdr codec2 ncurses pkg-config
```
Note: Homebrew's ncurses is keg-only (not symlinked into /opt/homebrew), so we will pass an extra CMake flag when configuring DSD-FME below so it can be found.
MBELib is considered a requirement in this build. You must read this notice prior to continuing. [MBElib Patent Notice](https://github.com/lwvmobile/mbelib#readme "MBElib Patent Notice")
```
git clone https://github.com/lwvmobile/mbelib
cd mbelib
git checkout ambe_tones
mkdir build
cd build
cmake ..
make -j `sysctl -n hw.ncpu`
sudo make install
cd ../..
```
Finish by cloning and building DSD-FME (note the added -DCMAKE_PREFIX_PATH flag for keg-only ncurses):
```
git clone https://github.com/lwvmobile/dsd-fme
cd dsd-fme
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix ncurses)
make -j `sysctl -n hw.ncpu`
sudo make install
```
Pulse Audio is still the default input/output in DSD-FME, so start the Homebrew Pulse Audio daemon before running dsd-fme (it will also restart at login): `brew services start pulseaudio`. To confirm your RTL-SDR dongle is detected, run `rtl_test` (ships with Homebrew's rtl-sdr package); unlike Linux, there is no driver blacklist to deal with on macOS.
### Windows Cygwin Builds
Cygwin builds now have an experimental semi-automatic installer, to run, follow steps below:
Open Windows PowerShell (not Command Prompt) and copy and paste all of this in all at once.
```
Invoke-WebRequest https://cygwin.com/setup-x86_64.exe -OutFile setup-x86_64.exe
.\setup-x86_64.exe --packages nano,libpulse-devel,libpulse-mainloop-glib0,libpulse-simple0,libpulse0,pulseaudio,pulseaudio-debuginfo,pulseaudio-equalizer,pulseaudio-module-x11,pulseaudio-module-zeroconf,pulseaudio-utils,sox-fmt-pulseaudio,libusb0,libusb1.0,libusb1.0-debuginfo,libusb1.0-devel,libncurses++w10,libncurses-devel,libncursesw10,ncurses,cmake,gcc-core,gcc-debuginfo,gcc-objc,git,make,socat,sox,sox-fmt-ao,zip,unzip,wget,gcc-g++,libsndfile-devel
```
Pick a Mirror. http://www.gtlib.gatech.edu mirror seems relatively fast. Nurse the Cygwin installer by clicking next and waiting for it to finish. Ignore the warning popup telling you to install libusb from sourceforge. Install the [Zadig](https://zadig.akeo.ie/ "Zadig") driver instead, if you haven't already and have an RTL Dongle. After Cygwin finishes installing, the installer sh script will download and run, be patient, it may also take a little while.
Then:
```
C:\cygwin64\bin\mintty.exe /bin/bash -l -c "wget https://raw.githubusercontent.com/lwvmobile/dsd-fme/refs/heads/audio_work/download-and-install-cygwin.sh; sh download-and-install-cygwin.sh; dsd-fme;"
```
After the sh script finishes, dsd-fme should open. If not, then double click on the Cygwin Terminal desktop shortcut, and try running `dsd-fme`. If you chose to create a portable version, you will find the folder and zip file in the `C:\cygwin64\home\username` directory if using the default cygwin64 folder location.
You can also update your versions by using the cyg_rebuild.sh script `sh cyg_rebuild.sh`.
### Virtual Sinks
You may wish to direct sound into DSD-FME via Virtual Sinks. You may set up a Virtual Sink or two on your machine for routing audio in and out of applications to other applications using the following command, and opening up pavucontrol "PulseAudio Volume Control" in the menu (or `pulsemixer` in headless mode) to change line out of application to virtual sink, and line in of DSD-FME to monitor of virtual sink. This command will not persist past a reboot, so you will need to invoke them each time you reboot, or search for how to add this to your conf files for persistency if desired. Note: This setup is completely optional if using TCP Network Sink Audio and/or RTL Input. You may need to manually install either of these programs manually, if desired, or find suitable alternatives for pipewire-pulse such as pwvucontrol, or similar.
```
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
```
Already have this branch, and just want to pull the latest build? You can run the rebuild.sh file in the dsd-fme folder, or manually do the pull with the commands:
```
##Open your clone folder##
git pull
##cd into your build folder##
cd build
cmake ..
make -j `nproc`
sudo make install
sudo ldconfig
```
### Applying Patches -- Recommended For Advanced Users Only
More experimental or potentially functionality changing or temperamental features may be included as seperate .patch files inside of the patch folder, and are not included in the source code by default.
If users wish to try or use these patches, then they can apply patches and build/rebuild with the following procedure. Make sure you have changed to the dsd-fme directory first, either by the top
command, or by otherwise opening the terminal to the clone folder.
```
cd dsd-fme
git apply patch/patchname.patch
cd build
make
sudo make install
```
If you later wish to update to the latest version via `git pull`, you may first need to reset any patches, perform the `git pull`, and then reapply patches.
A procedure for this is similar to, but not limited to:
```
cd dsd-fme
git reset --hard
git pull
git apply patch/xyz.patch
cd build
make
sudo make install
```
NOTE: Patches can potential break over time with further changes to code, requiring merge resolution or other manual intervention to re-apply patches.

View File

@@ -0,0 +1,10 @@
LSN(dec),frequency(Hz) (do not delete this line or won't import properly)
1,858606250
2,858606250
3,859606250
4,859606250
5,860606250
6,860606250
7,861606250
8,861606250
1 LSN(dec) frequency(Hz) (do not delete this line or won't import properly)
2 1 858606250
3 2 858606250
4 3 859606250
5 4 859606250
6 5 860606250
7 6 860606250
8 7 861606250
9 8 861606250

View File

@@ -0,0 +1,19 @@
ChannelNumber(dec),frequency(Hz) (do not delete this line or won't import properly)
999,862093750,default cc (come here first), optional use non-existent channel as first entry
1,863093750
2,862093750
3,861093750
4,860093750
5,859093750
6,863593750
7,862593750
8,861593750
9,860593750
10,859593750
11,863393750
12,862393750
13,861393750
14,860393750
15,859393750
1 ChannelNumber(dec),frequency(Hz) (do not delete this line or won't import properly)
2 999,862093750,default cc (come here first), optional use non-existent channel as first entry
3 1,863093750
4 2,862093750
5 3,861093750
6 4,860093750
7 5,859093750
8 6,863593750
9 7,862593750
10 8,861593750
11 9,860593750
12 10,859593750
13 11,863393750
14 12,862393750
15 13,861393750
16 14,860393750
17 15,859393750

View File

@@ -0,0 +1,14 @@
@REM Shutdown pulseaudio and clean out any remenants in /dev/shm if left behind
cd dsd-fme
pactl.exe exit
@REM now navigate to the /dev/shm folder and automatically remove any
@REM remnants from other times pulse wasn't shut down properly
cd ..
cd dev
cd shm
del pulse*
PAUSE

View File

@@ -0,0 +1,34 @@
@REM Set the console / terminal to 90 columns, 50 lines
@REM mode con: cols=90 lines=50
@ECHO OFF
@REM change directory into the dsd-fme folder
cd dsd-fme
@REM Start the Pulse Audio backend with a 10 minute time out
@REM start pulse audio server with 600 second idle time and no CPU limit (prevent closing while idle in menu)
@REM output from pulse server routed to NUL to supress "capabilities dropped, nag messages, etc" messages
pulseaudio.exe --start --no-cpu-limit=TRUE --exit-idle-time=600 2> NUL
@REM End pulse start up
ECHO The Pulse Audio Server should now be active!
@REM Setup Some null-sinks (if desired, remove @REM below)
@REM pactl load-module module-null-sink sink_name=virtual_sink1 sink_properties=device.description=Virtual_Sink1
@REM pactl load-module module-null-sink sink_name=virtual_sink2 sink_properties=device.description=Virtual_Sink2
@REM Setup Default Sink to device 0 (output)
pactl set-default-sink 0
@REM List Avaiable Pulse Audio Sinks and Sources
@ECHO ON
dsd-fme -O
PAUSE

View File

@@ -0,0 +1,258 @@
Build Version: AW 2026-47-ga6ea60b
MBElib Version: 1.3.4
CODEC2 Support Enabled
Usage: dsd-fme [options] Decoder/Trunking Mode
or: dsd-fme [options] -r <files> Read/Play saved mbe data from file(s)
or: dsd-fme -h Show help
Display Options:
-N Use NCurses Terminal
dsd-fme -N 2> console_log.txt
-Z Log MBE/PDU Payloads to console
Device Options:
-O List All Pulse Audio Input Sources and Output Sinks (devices).
Input/Output options:
-i <device> Audio input device (default is pulse)
/dev/dsp for OSS audio (Depreciated: Will require padsp wrapper in Linux)
pulse for pulse audio signal input
pulse:6 or pulse:virtual_sink2.monitor for pulse audio signal input on virtual_sink2 (see -O)
rtl for rtl dongle (Default Values -- see below)
rtl:dev:freq:gain:ppm:bw:sq:vol for rtl dongle (see below)
rtltcp:host:port:freq:gain:ppm:bw:sq:vol for rtl dongle on an rtl_tcp server (see below)
tcp for tcp client SDR++/GNURadio Companion/Other (Port 7355)
tcp:192.168.7.5:7355 for custom address and port
filename.bin for OP25/FME capture bin files
filename.wav for 48K/1 wav files (SDR++, GQRX)
filename.wav -s 96000 for 96K/1 wav files (DSDPlus)
(Use single quotes '/directory/audio file.wav' when directories/spaces are present)
-s <rate> Sample Rate of wav input files (48000 or 96000) Mono only!
-o <device> Audio output device (default is pulse)
/dev/dsp for OSS audio (Depreciated: Will require padsp wrapper in Linux)
pulse for pulse audio decoded voice or analog output
pulse:1 or pulse:alsa_output.pci-0000_0d_00.3.analog-stereo for pulse audio decoded voice or analog output on device (see -O)
null for no audio output
udp for UDP socket blaster output (default host 127.0.0.1; default port 23456)
udp:192.168.7.8:23470 for UDP socket blaster output (Target Address and Port
-d <dir> Create mbe data files, use this directory (TDMA version is experimental)
-r <files> Read/Play saved mbe data from file(s)
-g <float> Audio Digital Output Gain (Default: 0 = Auto; )
(Manual: 1 = 2%; 50 = 100%)
-n <float> Audio Analog Output Gain (Default: 0 = Auto; 0-100% )
-6 <file> Output raw audio .wav file (48K/1). (WARNING! Large File Sizes 1 Hour ~= 360 MB)
-7 <dir> Create/Use Custom directory for Per Call decoded .wav file saving.
(Use ./folder for Nested Directory!)
(Use /path/to/folder for hard coded directory!)
(Use Before the -P option!)
-8 Enable Source Audio Monitor
(Set Squelch in RTL, SDR++ or GQRX, etc, if monitoring mixed analog/digital)
-w <file> Output synthesized speech to a single static .wav file. (Do not use with -P Per Call Switch)
-P Enable Per Call WAV file saving. (Do not use with -w filename.wav single wav file switch)
(Per Call works with everything now and doesn't require ncurses terminal!)
-j <string> Custom Tag(s), colon delimited, to append to Per Call decoded .wav files.
-j TGT_LAPD:TAG_FIRE:FREQ_851987500 (Total 3 Tags, Maximum Letter Length = 100)
-a Enable Call Alert Beep
(Warning! Might be annoying.)
-J <file> Specify Filename for Event Log Output.
-L <file> Specify Filename for LRRP Data Output.
-Q <file> Specify Filename for OK-DMRlib Structured File Output. (placed in DSP folder)
-Q <file> Specify Filename for M17 Float Stream Output. (placed in DSP folder)
-c <file> Output symbol capture to .bin file
-q Reverse Mute - Mute Unencrypted Voice and Unmute Encrypted Voice
-V <num> Enable TDMA Voice Synthesis on Slot 1 (1), Slot 2 (2), or Both (3); Default is 3;
-z Set TDMA Voice Slot Preference when using /dev/dsp audio output (prevent lag and stuttering)
-v <hex> Set Filtering Bitmap Options (Advanced Option)
1 1 1 1 (0xF): PBF/LPF/HPF/HPFD on
RTL-SDR options:
Usage: rtl:dev:freq:gain:ppm:bw:sq:vol
NOTE: all arguments after rtl are optional now for trunking, but user configuration is recommended
dev <num> RTL-SDR Device Index Number or 8 Digit Serial Number, no strings! (default 0)
freq <num> RTL-SDR Frequency (851800000 or 851.8M)
gain <num> RTL-SDR Device Gain (0-49)(default = 0; Hardware AGC recommended)
ppm <num> RTL-SDR PPM Error (default = 0)
bw <num> RTL-SDR Bandwidth kHz (default = 12)(4, 6, 8, 12, 16, 24)
sq <num> RTL-SDR Squelch Level vs RMS Value (Optional)
vol <num> RTL-SDR Sample 'Volume' Multiplier (default = 2)(1,2,3)
Example: dsd-fme -fs -i rtl -C cap_plus_channel.csv -T
Example: dsd-fme -fp -i rtl:0:851.375M:22:-2:24:0:2
Usage: rtltcp:host:port:freq:gain:ppm:bw:sq:vol
host <name> rtl_tcp Server Hostname or IP Address (default = localhost)
port <num> rtl_tcp Server Port (default = 1234)
freq, gain, ppm, bw, sq, vol as above
Example: dsd-fme -fs -i rtltcp:192.168.1.10:1234:450M:26:-2:8 -C connect_plus_chan.csv -T
Decoder options:
-fa Auto Detection
-fA Passive Analog Audio Monitor
-ft TDMA Trunking P25p1 Control and Voice, P25p2 Trunked Channels, and DMR
-fs DMR TDMA BS and MS Simplex
-f1 Decode only P25 Phase 1
-f2 Decode only P25 Phase 2 (6000 sps) **
-fd Decode only DSTAR
-fx Decode only X2-TDMA
-fy Decode only YSF
-fz Decode only M17*
-fi Decode only NXDN48* (6.25 kHz) / IDAS*
-fn Decode only NXDN96* (12.5 kHz)
-fp Decode only ProVoice*
-fh Decode only EDACS Standard/ProVoice*
-fH Decode only EDACS Standard/ProVoice with ESK 0xA0*
-fh344 Decode only EDACS Standard/ProVoice and set AFS to 344 or similar custom 11-bit scheme*
-fH434 Decode only EDACS Standard/ProVoice and set AFS to custom 11-bit scheme with ESK 0xA0*
-fe Decode only EDACS EA/ProVoice*
-fE Decode only EDACS EA/ProVoice with ESK 0xA0*
-fm Decode only dPMR*
-l Disable DMR, dPMR, NXDN, M17 input filtering
-xx Expect non-inverted X2-TDMA signal
-xr Expect inverted DMR signal
-xd Expect inverted ICOM dPMR signal
-xn Expect inverted NXDN/DCR/IDAS signal
* denotes frame types that cannot be auto-detected.
** Phase 2 Single Frequency may require user to manually set WACN/SYSID/CC parameters if MAC_SIGNAL not present.
Advanced Decoder options:
-X <hex> Manually Set P2 Parameters (WACN, SYSID, CC/NAC)
(-X BEE00ABC123)
-_ <dec> Manually Set NXDN PN95 Dibit Scrambler Seed (1-511)
(-* 261)
-D <dec> Manually Set TIII DMR Location Area n bit len (0-10)(10 max)
(Value defaults to max n bit value for site model size)
(Setting 0 will show full Site ID, no area/subarea)
-ma Auto-select modulation optimizations
-mc Use only C4FM modulation optimizations (default)
-mg Use only GFSK modulation optimizations
-mq Use only QPSK modulation optimizations
-m2 Use P25p2 6000 sps QPSK modulation optimizations
-F Relax P25 Phase 2 MAC_SIGNAL CRC Checksum Pass/Fail
Use this feature to allow MAC_SIGNAL even if CRC errors.
-F Relax DMR RAS/CRC CSBK/DATA Pass/Fail
Enabling on some systems could lead to bad channel assignments/site data decoding if bad or marginal signal
-b <dec> Manually Enter Basic Privacy Key (Decimal Value of Key Number)
(NOTE: This used to be the 'K' option!)
-H <hex> Manually Enter Hytera 10/32/64 Char Basic Privacy Hex Key (see example below)
Encapulate in Single Quotation Marks; Space every 16 chars.
-H 0B57935150
-H '736B9A9C5645288B 243AD5CB8701EF8A'
-H '20029736A5D91042 C923EB0697484433 005EFC58A1905195 E28E9C7836AA2DB8'
-H <hex> Manually Enter AES-128, AES-256, or Kirisun 128 or 256 Hex Key (see example below)
Encapulate in Single Quotation Marks; Space every 16 chars.
-H '736B9A9C5645288B 243AD5CB8701EF8A'
-H '20029736A5D91042 C923EB0697484433 005EFC58A1905195 E28E9C7836AA2DB8'
-H <hex> Manually Enter Caltta 10/32/64 Char Basic Privacy Hex Key (see example below)
-H C:40:1234567890
-H C:128:736B9A9C5645288B243AD5CB8701EF8A'
-H C:256:20029736A5D91042C923EB0697484433005EFC58A1905195E28E9C7836AA2DB8'
-H <hex> Manually Enter Hytera OTA Encryption 32 Char Hex Key (see example below)
-H O:0:0 no keystream application, but check for Hytera OTA Encryption and DMRA EP Late Entry IV.
-H O:128:17bfe59b29a06136fb7d3811fd1a4904 for 128-bit RC4 OTA Key Setup
-R <dec> Manually Enter dPMR or NXDN EHR Scrambler Key Value (Decimal Value)
-1 <hex> Manually Enter RC4 or DES Key Value (DMR, P25, NXDN) (Hex Value)
-2 <hex> Manually Enter and Enforce TYT 16-bit BP Key Value (DMR) (Hex Value)
-! <hex> Manually Enter and Enforce TYT Advanced Privacy (PC4) 128 or 256 bit AP Hex Key (see example below)
Encapulate in Single Quotation Marks; Space every 16 chars.
-! '736B9A9C5645288B 243AD5CB8701EF8A'
-! '1111111111111111 1111111111111111 1111111111111111 1111111111111111'
-@ <hex> Manually Enter and Enforce Retevis Advanced Privacy (RC2) 128 or 256 bit AP Hex Key (see example below)
Encapulate in Single Quotation Marks; Space every 16 chars.
-@ '736B9A9C5645288B 243AD5CB8701EF8A'
-@ '1122334455667788 99AABBCCDDEEFF11 1122334455667788 99AABBCCDDEEFF11'
-5 <hex> Manually Enter and Enforce TYT Enhanced Privacy (AES-128) EP Hex Key (see example below)
Encapulate in Single Quotation Marks; Space every 16 chars.
-5 '736B9A9C5645288B 243AD5CB8701EF8A'
-+ <hex> Manually Enter and Enforce Baofeng Advanced Privacy (PC5-128 or PC5-256) AP Hex Key (see example below)
Encapulate in Single Quotation Marks; Space every 16 chars.
-+ 'ABCDABCDABCDABCD ABDCDABCDABCDABC'
-+ 'ABCDABCDABCDABCD ABDCDABCDABCDABC EF01EF01EF01EF01 EF01EF01EF01EF01'
-^ <hex> Manually Enter and Enforce Connect Systems 72-bit (9-byte) Extended Encryption Hex Key (see example below)
-^ 3BBE782C0430008271
-9 <dec> Manually Enter and Enforce Kenwood 15-bit Scrambler Key Value (DMR) (Dec Value)
-A <hex> Manually Enter and Enforce Anytone 16-bit BP Key Value (DMR) (Hex Value)
-$ <string> Enter RAS Password 6-24 Char Key Value (DMR) (a-z A-Z, 0-9, $ # _ -)
-$ Password123
Special Use Cases involving # and $, use parenthesis and put \ in front of all $ signs
-$ "######"
-$ "\$\$\$\$\$\$"
-y <hex> Enter RAS 56-bit Effective Key Value (DMR) (14 Char Hex Value)
-y 6DF241BC4AE2EC
-, <string> Manually Enter and Enforce Auctus A6 (GoComm) 8 Char Key Value (DMR) (String Value)
-, Secure04
-u <string> Manually Enter Vertex Standard 10 or 64 Char Hex Key
-u 10:1234567891 or 64:AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDD
-u 0:0 no KS application, but apply the inversion to the interleave (clear errors on 256)
-S <str> Manually Enter and Enforce Generic Static Keystream -> Length and BYTE PACKED / ALIGNED String for AMBE (up to 882 bits)
For Example, enter 16-bit Keystream 0909 as:
-S 16:0909
For Example, enter 49-bit Keystream as:
-S 49:123456789ABC80
For Example, enter 49-bit Keystream (MBP 70) as:
-S 49:ED0AED4AED4AED4A
For Example, Baofeng 49-bit Keystream for 56-bit Custom Encryption as:
-S 49:11AA22BB33CC44
For Example, Caltta 40-bit Keystream w/ optional 7-bit discard as:
-S 40:1234567890:7
-k <file> Import Key List from csv file (Decimal Format) -- Lower Case 'k'.
Only supports NXDN, DMR Basic Privacy (decimal value).
(dPMR and Hytera 32/64 char not supported, DMR uses TG value as key id -- EXPERIMENTAL!!).
-K <file> Import Key List from csv file (Hexidecimal Format) -- Capital 'K'.
Use for Hex Value Hytera 10-char BP keys, RC4 10-char, DES 16-char Hex Keys, and AES128/256 32/64-char keys.
-4 Force Privacy Key over Encryption Identifiers (DMR MBP/HBP and NXDN Scrambler)
-0 Force RC4 Key over Missing PI header/LE Encryption Identifiers (DMR)
-M <hex> Force Entered Alg ID Value over Missing PI header/LE Encryption Identifiers (DMR)
-3 Disable DMR Late Entry Encryption Identifiers (VC6 Single Burst)
Note: Disable this if false positives on Voice ENC occur.
Trunking Options:
-C <file> Import Channel to Frequency Map (channum, freq) from csv file. (Capital C)
(See channel_map.csv for example)
-G <file> Import Group List Allow/Block and Label from csv file.
(See group.csv for example)
-T Enable Trunking Features (NXDN/P25/EDACS/DMR) with RIGCTL/TCP or RTL Input
-Y Enable Scanning Mode with RIGCTL/TCP or RTL Input
Experimental -- Can only scan for sync with enabled decoders, don't mix NXDN and DMR/P25!
This is not a Trunking Feature, just scans through conventional frequencies fast!
-W Use Imported Group List as a Trunking Allow/White List -- Only Tune with Mode A
-p Disable Tune to Private Calls (DMR TIII, P25, NXDN Type-C and Type-D)
-E Disable Tune to Group Calls (DMR TIII, Con+, Cap+, P25, NXDN Type-C, and Type-D)
-e Enable Tune to Data Calls (DMR TIII, Cap+, NXDN Type-C)
(NOTE: No Clear Distinction between Cap+ Private Voice Calls and Data Calls -- Both enabled with Data Calls)
-I <dec> Specify TG to Hold During Trunking (DMR, P25, NXDN Type-C Trunking)
-U <port> Enable RIGCTL/TCP; Set TCP Port for RIGCTL. (4532 on SDR++)
-B <Hertz> Set RIGCTL Setmod Bandwidth in Hertz (0 - default - OFF)
P25 - 12000; NXDN48 - 7000; NXDN96: 12000; DMR - 7000-12000; EDACS/PV - 12000-24000;
May vary based on system stregnth, etc.
-t <secs> Set Trunking or Scan Speed VC/sync loss hangtime in seconds. (default = 1 second)
Trunking Example TCP: dsd-fme -fs -i tcp -U 4532 -T -C dmr_t3_chan.csv -G group.csv -N 2> log.txt
Trunking Example RTL: dsd-fme -fs -i rtl:0:450M:26:-2:8 -T -C connect_plus_chan.csv -G group.csv -N 2> log.txt

View File

@@ -0,0 +1,97 @@
This example options contains numerous options put into the start-dsd-fme.bat file in the option string
feel free to experiment and mix and match example options for your bat files option string.
Trunking Option Examples:
P25 (Phase 1 Control) Trunking with SDR++ Network Sink input, RIGCTL, /dev/dsp output,
per call wav files, ncurses terminal
-ft -i tcp:127.0.0.1:7355 -U 4532 -T -P -N
P25 (Phase 2 Control) Trunking with SDR++ Network Sink input, RIGCTL, /dev/dsp output,
per call wav files, ncurses terminal
-f2 -i tcp:127.0.0.1:7355 -U 4532 -T -P -N
DMR Trunking with RTL input, /dev/dsp output, channel map import,
per call wav files, ncurses terminal, payload dump to console
-fs -i rtl:0:450M:0:-2:12 -T -C examples\dmr_t3_chan.csv -P -N -Z
DMR Trunking with SDR++ input, RIGCTL, /dev/dsp output, RAS enabled CSBK (-F),
channel map import, per call wav files, ncurses terminal, payload dump to console
-fs -F -i tcp -U 4532 -T -C examples\capacity_plus_chan.csv -P -N -Z
NXDN48 v2.0 DFA (Direct Frequency Assignment) Trunking with SDR++ input, RIGCTL, /dev/dsp output,
scrambler key import (decimal), per call wav files, ncurses terminal, payload dump to console
-fi -i tcp -U 4532 -T -P -N -Z -k examples\nxdn_sc_key.csv
NXDN96 Trunking with SDR++ input, RIGCTL, /dev/dsp output,
channel map import, per call wav files, ncurses terminal, payload dump to console
-fn -i tcp -U 4532 -T -C examples\nxdn_chan_map.csv -P -N -Z
EDACS Standard Network Analog and Digital
-fh -i tcp -U 4532 -T -C edacs_channel_map.csv -G group.csv -N
-fh -i rtl:0:850M:44:-2:24 -T -C edacs_channel_map.csv -G group.csv -N
EDACS Extended Address Analog and Digital (with ESK)
-fE -i tcp:192.168.7.5:7355 -U 4532 -T -C edacs_channel_map.csv -G group.csv -N
-fE -i rtl:0:850M:44:-2:24 -T -C edacs_channel_map.csv -G group.csv -N
Scanning Option Examples:
Scanning will not perform quickly like a real scanner, but can be used with any
supported decoding type and analog as well, and will require a channel_map to scan frequencies
channel numbers do not matter, but use unique ones for each frequeny
-t 0 will scan as fast as possible, but may miss frame sync, -t 1 is stable, but needs 1 second between tuning
P25/DMR/Analog Scanning with RTL input, /dev/dsp output, channel map import,
per call wav files, ncurses terminal, payload dump to console, raw audio signal monitoring
-ft -i rtl:0:450M:0:-2:12 -Y -t 1 -C examples\dmr_t3_chan.csv -P -8 -N -Z
P25/DMR/Analog Scanning with SDR++ input (use squelch), RIGCTL, /dev/dsp output, channel map import,
per call wav files, ncurses terminal, payload dump to console, raw audio signal monitoring
-ft -i tcp:127.0.0.1:7355 -U 4532 -Y -t 1 -C examples\dmr_t3_chan.csv -P -8 -N -Z
NXDN48/Analog Scanning with SDR++ input (use squelch), RIGCTL, /dev/dsp output, channel map import,
per call wav files, ncurses terminal, payload dump to console, raw audio signal monitoring
-fi -i tcp:127.0.0.1:7355 -U 4532 -Y -t 1-C examples\nxdn_chan_map.csv -P -8 -N -Z
Analog Scanning with SDR++ input (use squelch), RIGCTL, /dev/dsp output, channel map import
-fA -i tcp:127.0.0.1:7355 -U 4532 -Y -t 0 -C examples\nxdn_chan_map.csv -8
Encryption Option Examples:
DMR with default /dev/dsp input and output, use basic privacy key 70
-fs -b 70
DMR with default /dev/dsp input and output, load .csv file with decimal basic privacy keys loaded by TG value,
-fs -k examples\multi_key.csv
DMR with default /dev/dsp input and output, use Hytera basic privacy key (10, 32, and 64 hex char versions)
-fs -H 1111111111
-fs -H '2222222222222222 3333333333333333'
-fs -H '2222222222222222 3333333333333333 4444444444444444 5555555555555555'
DMR with default /dev/dsp input and output, use RC4 key 0x7777777777
-fs -1 7777777777
DMR with default /dev/dsp input and output, use RC4 key 0x7777777777,
Force RC4 Key over Missing PI header/LE Encryption Identifiers (-0)
Disable Late Entry Encryption Signalling Identifiers (-3)
-fs -0 -3 -1 7777777777
DMR with default /dev/dsp input and output, load RC4 and 10-char HBP keys from .csv file (hexidecimal format)
-fs -K dsd-fme\examples\multi_key_hex.csv
P25 with default /dev/dsp input and output, use RC4 key 0x7777777777
-ft -1 7777777777
NXDN48 with default /dev/dsp input and output, use Scrambler key 32767
-fi -R 32767
NXDN96 with default /dev/dsp input and output, use Scrambler key 15000
-fn -R 15000
dPMR with default /dev/dsp input and output, use Scrambler key 32767
-fm -R 32767
NXDN48 with default /dev/dsp input and output, load scrambler keys from .csv file (decimal format)
-fi -k dsd-fme\examples\nxdn_sc_key.csv

View File

@@ -0,0 +1 @@
These .bat files are ONLY for use on the portable cygwin builds, do not use these in any other build environments!

View File

@@ -0,0 +1,67 @@
@REM Digital Speech Decoder: Florida Man Edition
@REM DSD-FME Cygwin Windows Portable Builds
@REM
@REM The source code of this software can be downloaded here:
@REM https://github.com/lwvmobile/dsd-fme
@REM
@REM If you paid for, or were otherwise fleeced for this software, DEMAND YOUR MONEY BACK!
@REM
@REM This software is designed to be used with an SDR receiver (like SDR++ or SDR#) with TCP input,
@REM RTL Input, media file playback over virtual cables or null-sinks, or a Discriminator Tap input
@REM
@REM The complete options list can be seen by viewing complete_usage_options.txt
@REM Many examples can be found in example_options.txt
@REM
@REM Enjoy!
@REM Regarding the options string (or any string in .bat files)
@REM If your string may contain spaces, set the first '"' before options, and then an ending '"'
@REM Incorrect: set options="-fs -N -Z"
@REM Correct: set "options=-fs -N -Z"
@REM set options to pass to dsd-fme
set "options= -N -Z "
@REM Create Folder and Set Date Time for logs
@echo off
mkdir logs
@REM Locale-independent date/time for log filenames (yyyyMMdd_HHmmss)
@REM Works on older Windows without wmic or PowerShell
for /f "tokens=1-6 delims=/: " %%a in ('robocopy "|" . /njh ^| find ":"') do (
set "YYYY=%%a"
set "MM=%%b"
set "DD=%%c"
set "HH=%%d"
set "Min=%%e"
set "Sec=%%f"
)
set "datetimestr=%YYYY%%MM%%DD%_%HH%%Min%%Sec%"
@REM random number is used so that two log files don't share the same name
set rnd=%RANDOM%
@REM set log file relative filepath
set "clog=.\logs\console_log_%datetimestr%_%rnd%.txt"
set "elog=.\logs\event_log_%datetimestr%_%rnd%.txt"
@REM create the log file now with touch
.\dsd-fme\touch.exe %clog%
.\dsd-fme\touch.exe %elog%
@REM Launch Tail to display the console log and event log in a seperate console windows
start .\dsd-fme\tail.exe -n 40 -f %clog%
start .\dsd-fme\tail.exe -n 40 -f %elog%
@REM start dsd-fme with options and logs
.\dsd-fme\dsd-fme.exe %options% -J %elog% 2> %clog%
echo ----------------------------------------------------------------------------------
echo ----------------------------------------------------------------------------------
echo For any errors, see: %clog%
echo Forward %clog% and Options: "%options%"
echo to developer on Github or Radio Reference for troubleshooting.
echo ----------------------------------------------------------------------------------
echo ----------------------------------------------------------------------------------
@REM Set pause to diplay above message
PAUSE

8
examples/dmr_t3_chan.csv Normal file
View File

@@ -0,0 +1,8 @@
ChannelNumber(dec),frequency(Hz) (do not delete this line or won't import properly)
999,456318750,default cc (come here first), optional use non-existent channel as first entry
36,455756250
54,455981250
81,456318750
1 ChannelNumber(dec),frequency(Hz) (do not delete this line or won't import properly)
2 999,456318750,default cc (come here first), optional use non-existent channel as first entry
3 36,455756250
4 54,455981250
5 81,456318750

View File

@@ -0,0 +1,6 @@
LSN(dec),frequency(Hz) (do not delete this line or won't import properly)
1,851375000
2,851800000
3,855987500
4,858487500
5,852312500
1 LSN(dec) frequency(Hz) (do not delete this line or won't import properly)
2 1 851375000
3 2 851800000
4 3 855987500
5 4 858487500
6 5 852312500

View File

@@ -0,0 +1,7 @@
keyid(hex), keyvalue(hex)
0001,0000000000000000,0000000000000000,0000000000000000,0000002823d87923
0003,0101010101010101,0101010101010101
0004,0101010101010101,0101010101010101,0101010101010101,0101010101010101
C197,A753BC945DE5E0F1,EC1970F8565154E6,D9DF2FAC6278FA93,B531D2CC046E93A2
0067,0000000000000000,0000000000000000,0000000000000000,DEADBEEFBAADF00D
0000,0000000000000000,0000000000000000,0000000000000000,0000000000000001
1 keyid(hex), keyvalue(hex)
2 0001,0000000000000000,0000000000000000,0000000000000000,0000002823d87923
3 0003,0101010101010101,0101010101010101
4 0004,0101010101010101,0101010101010101,0101010101010101,0101010101010101
5 C197,A753BC945DE5E0F1,EC1970F8565154E6,D9DF2FAC6278FA93,B531D2CC046E93A2
6 0067,0000000000000000,0000000000000000,0000000000000000,DEADBEEFBAADF00D
7 0000,0000000000000000,0000000000000000,0000000000000000,0000000000000001

5
examples/group.csv Normal file
View File

@@ -0,0 +1,5 @@
DEC,Mode(A- Allow; B - Block; DE - Digital Enc),Name of Group,Tag (do not delete this line or won't import properly)
100,B,Example Name,Tag
1449,A,Fire Dispatch,Fire
929,A,Fire Tac,Fire
22033,DE,Law Dispatch,Law
1 DEC Mode(A- Allow; B - Block; DE - Digital Enc) Name of Group Tag (do not delete this line or won't import properly)
2 100 B Example Name Tag
3 1449 A Fire Dispatch Fire
4 929 A Fire Tac Fire
5 22033 DE Law Dispatch Law

View File

@@ -0,0 +1,10 @@
LSN(dec),frequency(Hz) (do not delete this line or won't import properly)
1,858606250
2,858606250
3,859606250
4,859606250
5,860606250
6,860606250
7,861606250
8,861606250
1 LSN(dec) frequency(Hz) (do not delete this line or won't import properly)
2 1 858606250
3 2 858606250
4 3 859606250
5 4 859606250
6 5 860606250
7 6 860606250
8 7 861606250
9 8 861606250

6
examples/multi_key.csv Normal file
View File

@@ -0,0 +1,6 @@
key id or tg id (dec), key number or value (dec) //NXDN Scrambler, BP, 10-char Hytera BP only
2,70
1,123
100,70
12,48713912656
672560,254
1 key id or tg id (dec), key number or value (dec) //NXDN Scrambler, BP, 10-char Hytera BP only
2 2,70
3 1,123
4 100,70
5 12,48713912656
6 672560,254

View File

@@ -0,0 +1,5 @@
key id(hex), key value (hex) //10-char Hytera BP, RC4
1,1234567890
2,ABCDEF1234
C,0B57935150
64,0B57935150
1 key id(hex), key value (hex) //10-char Hytera BP, RC4
2 1,1234567890
3 2,ABCDEF1234
4 C,0B57935150
5 64,0B57935150

View File

@@ -0,0 +1,8 @@
channel(dec), freq(Hz)
141,423862500
142,424337500
143,424912500
203,424100000
204,424625000
271,422650000
302,423287500
1 channel(dec) freq(Hz)
2 141 423862500
3 142 424337500
4 143 424912500
5 203 424100000
6 204 424625000
7 271 422650000
8 302 423287500

5
examples/nxdn_sc_key.csv Normal file
View File

@@ -0,0 +1,5 @@
key(dec) or tg(dec), value(dec), load any single keys as key 0
0,23466
1,12345
2,32700
63,32767
1 key(dec) or tg(dec), value(dec), load any single keys as key 0
2 0,23466
3 1,12345
4 2,32700
5 63,32767

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -0,0 +1,112 @@
#!/bin/bash
# Force bash for better compatibility (I think)
#
# Digital Speech Decoder: Florida Man Edition
#
# The source code of this software can be downloaded here:
# https://github.com/lwvmobile/dsd-fme
#
# If you paid for, or were otherwise fleeced for this software, DEMAND YOUR MONEY BACK!
#
# This software is designed to be used with an SDR receiver (like SDR++ or SDR#) with TCP input,
# RTL Input, media file playback over virtual cables or null-sinks, or a Discriminator Tap input
#
# The complete options list can be seen by viewing complete_usage_options.ans
# Many examples can be found in example_options.ans
#
# Enjoy!
###
#### IMPORTANT! Set your dsd-fme options here! ####
# Example : opts=' -ft -i rtl:0:460.350M:0:-1:8 -N -Z '
####
# set options to pass to dsd-fme
opts=' -N -Z '
####
# Initialize variables
xe="0"
gt="0"
xt="0"
ko="0"
# Functions to check for available terminals
chk_xe(){
# Check if x-terminal-emulator is installed
xe=$(which x-terminal-emulator 2>/dev/null)
if [ -z $xe ];then xe="0";else xe="1";fi
}
chk_gt(){
# Check if gnome-terminal is installed
gt=$(which gnome-terminal 2>/dev/null)
if [ -z $gt ];then gt="0";else gt="1";fi
}
chk_ko(){
# Check if Konsole is installed
ko=$(which konsole 2>/dev/null)
if [ -z $ko ];then ko="0";else ko="1";fi
}
chk_xt(){
# Check if xterm is installed
xt=$(which xterm 2>/dev/null)
if [ -z $xt ];then xt="0";else xt="1";fi
}
# Check for and set terminal
chk_xe
if [ $xe = "1" ];then
term=$(which x-terminal-emulator 2>/dev/null)
printf "Using X-Terminal-Emulator!\n"
else
chk_gt
fi
if [ $gt = "1" ];then
term=$(which gnome-terminal 2>/dev/null)
printf "Using Gnome-Terminal!\n"
elif [ $xe = "0" ]&&[ $gt = "0" ];then
chk_xt
fi
if [ $xt = "1" ];then
term=$(which xterm 2>/dev/null)
printf "Using XTerm!\n"
elif [ $xe = "0" ]&&[ $gt = "0" ]&&[ $xt = "0" ];then
chk_ko
fi
if [ $ko = "1" ];then
term=$(which konsole 2>/dev/null)
printf "Using Konsole!\n"
fi
# Bail if no terminal found
if [ "$ko" -eq "0" ]&&[ "$gt" -eq "0" ]&&[ "$xt" -eq "0" ]&&[ "$xe" -eq "0" ];then printf "No known terminals available!\n";exit 1;fi
# Get current directory
wd=$(pwd)
# Set date/time
# dt=$(date +%F_%H%M-%S-%N) #with hyphens
dt=$(date +%Y%m%d_%H%M%S) #just an underscore between date and time
if [ ! -d "logs" ]; then
mkdir logs
fi
# set log file relative filepath
clog="$wd/logs/console_log_$dt.txt"
elog="$wd/logs/event_log_$dt.txt"
# create the log file now with touch
touch $clog
touch $elog
# open new terminal windows to watch live log files
if [ "$term" == "$(which konsole)" ]||[ "$term" == "$(which xterm)" ];then
$term -e "tail -n 40 -f $clog" 2>/dev/null
$term -e "tail -n 40 -f $elog" 2>/dev/null
else
$term --window -e "tail -n 40 -f $clog" 2>/dev/null
$term --window -e "tail -n 40 -f $elog" 2>/dev/null
fi
# start dsd-fme with options and log files
dsd-fme $opts -J $elog 2> $clog
echo -------------------------------------------------------------------------------
echo -------------------------------------------------------------------------------
echo For any errors, see: $clog
echo Forward $clog and
echo Options: \" $opts \"
echo to developer on Github or Radio Reference for troubleshooting.
echo -------------------------------------------------------------------------------
echo -------------------------------------------------------------------------------
# Set pause to diplay above message
read -p "Press ENTER to continue... " x

57
examples/trunking.sh Normal file
View File

@@ -0,0 +1,57 @@
#example trunking sh scripts (SDR++ with RIGCTL and RTL Input)
#make sure to put a # in front of all lines except the one you wish to use
#P25 P1 FDMA CC with C4FM
#dsd-fme -i tcp -U 4532 -T -N 2> log.ans
#dsd-fme -i rtl:0:850M:0:-2:12 -T -N 2> log.ans
#P25 P1 FDMA CC with QPSK (Simulcast)
#dsd-fme -i tcp:192.168.7.8:7355 -U 4532 -T -mq -N 2> log.ans
#dsd-fme -i rtl:0:855.625M:0:-2:12 -T -mq -N 2> log.ans
#P25 P2 TDMA CC with C4FM
#dsd-fme -i tcp:192.168.7.8:7355 -U 4532 -T -f2 -N 2> log.ans
#dsd-fme -i rtl:0:855.625M:0:-2:12 -T -f2 -m2 -N 2> log.ans
#DMR TIII, Con+, Cap+, XPT
dsd-fme -fs -i tcp -U 4532 -T -C dmr_t3_chan.csv -G group.csv -N 2> log.ans
#dsd-fme -fs -i rtl:0:450M:44:-2:8 -T -C connect_plus_chan.csv -G group.csv -N 2> log.ans
#EDACS Standard Network Analog and Digital
#dsd-fme -fh -i tcp:192.168.7.5:7355 -U 4532 -T -C edacs_channel_map.csv -G group.csv -N 2> log.ans
#dsd-fme -fh -i rtl:0:850M:44:-2:24 -T -C edacs_channel_map.csv -G group.csv -N 2> log.ans
#EDACS Standard Network Analog and Digital (with ESK)
#dsd-fme -fH -i tcp:192.168.7.5:7355 -U 4532 -T -C edacs_channel_map.csv -G group.csv -N 2> log.ans
#dsd-fme -fH -i rtl:0:850M:44:-2:24 -T -C edacs_channel_map.csv -G group.csv -N 2> log.ans
#EDACS Extended Address Analog and Digital
#dsd-fme -fe -i tcp:192.168.7.5:7355 -U 4532 -T -C edacs_channel_map.csv -G group.csv -N 2> log.ans
#dsd-fme -fe -i rtl:0:850M:44:-2:24 -T -C edacs_channel_map.csv -G group.csv -N 2> log.ans
#EDACS Extended Address Analog and Digital (with ESK)
#dsd-fme -fE -i tcp:192.168.7.5:7355 -U 4532 -T -C edacs_channel_map.csv -G group.csv -N 2> log.ans
#dsd-fme -fE -i rtl:0:850M:44:-2:24 -T -C edacs_channel_map.csv -G group.csv -N 2> log.ans
#NXDN48 Type-C or Type-D Trunking with Channel Map
#dsd-fme -fi -i tcp -T -U 4532 -C nxdn_channel_map.csv -N 2> log.ans
#dsd-fme -fi -i rtl:0:855.625M:0:-2:12:100 -T -C nxdn_channel_map.csv -N 2> log.ans
#NXDN48 Type-C Trunking with DFA
#dsd-fme -fi -i tcp -T -U 4532 -N 2> log.ans
#dsd-fme -fi -i rtl:0:855.625M:0:-2:12:100 -T -N 2> log.ans
#NXDN96 Trunking with Channel Map
#dsd-fme -fn -i tcp -T -U 4532 -C nxdn_channel_map.csv -N 2> log.ans
#dsd-fme -fn -i rtl -T -C nxdn_channel_map.csv -N 2> log.ans
#Notes: parameters after -i tcp can be omitted if using localhost as the default hostname to connect
#and 7355 as the default port number. -U is the port number for RIGCTL and will mirror the tcp hostname
#running under the assumption that the user will be connnecting the VFO to the same instance of SDR++
#You can also specify an ip address to connect to a remote SDR++ instance, make sure that the settings
#inside of SDR++ match, i.e., change in SDR++ from 'localhost' to an IP to bind to (machine's IP address)
#Note2: RTL input should only be used on strong signal, the SDR++ VFO will perform much better on marginal signal
#paramters after -i rtl can also be omitted now if using the default configurations
#Having a -G group.csv is purely optional, but useful if you want to block groups, or give groups names

64
flake.lock generated Normal file
View File

@@ -0,0 +1,64 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1711163522,
"narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1709237383,
"narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

18
flake.nix Normal file
View File

@@ -0,0 +1,18 @@
{
description = "Digital Speech Decoder - Florida Man Edition ";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, pkgs, ... }: {
packages.default = config.packages.dsd-fme;
packages.dsd-fme = pkgs.callPackage ./package.nix { };
};
};
}

410
include/Golay24.hpp Normal file
View File

@@ -0,0 +1,410 @@
#ifndef GOLAY24_HPP_7a68240afda9406facf81fcad3851111
#define GOLAY24_HPP_7a68240afda9406facf81fcad3851111
/**
* Based on the work of Mr Hank Wallace.
*
* Code adapted from http://www.aqdi.com/golay.htm
*
*/
#include <stdio.h>
#include <assert.h>
#define POLY 0xAE3
class Golay24
{
private:
unsigned int golay(unsigned int cw)
/* This function calculates [23,12] Golay codewords.
The format of the returned int is
[checkbits(11),data(12)]. */
{
int i;
unsigned int c;
cw&=0xfffl;
c=cw; /* save original codeword */
for (i=1; i<=12; i++) /* examine each data bit */
{
if (cw & 1) /* test data bit */
cw^=POLY; /* XOR polynomial */
cw>>=1; /* shift intermediate result */
}
return((cw<<12)|c); /* assemble codeword */
}
int parity(unsigned int cw)
/* This function checks the overall parity of codeword cw.
If parity is even, 0 is returned, else 1. */
{
unsigned char p;
/* XOR the bytes of the codeword */
p=*(unsigned char*)&cw;
p^=*((unsigned char*)&cw+1);
p^=*((unsigned char*)&cw+2);
/* XOR the halves of the intermediate result */
p=p ^ (p>>4);
p=p ^ (p>>2);
p=p ^ (p>>1);
/* return the parity result */
return(p & 1);
}
unsigned int syndrome(unsigned int cw)
/* This function calculates and returns the syndrome
of a [23,12] Golay codeword. */
{
int i;
cw&=0x7fffffl;
for (i=1; i<=12; i++) /* examine each data bit */
{
if (cw & 1) /* test data bit */
cw^=POLY; /* XOR polynomial */
cw>>=1; /* shift intermediate result */
}
return(cw<<12); /* value pairs with upper bits of cw */
}
int weight(unsigned int cw)
/* This function calculates the weight of
23 bit codeword cw. */
{
int bits,k;
/* nibble weight table */
const char wgt[16] = {0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4};
bits=0; /* bit counter */
k=0;
/* do all bits, six nibbles max */
while ((k<6) && (cw))
{
bits=bits+wgt[cw & 0xf];
cw>>=4;
k++;
}
return(bits);
}
unsigned int rotate_left(unsigned int cw, int n)
/* This function rotates 23 bit codeword cw left by n bits. */
{
int i;
if (n != 0)
{
for (i=1; i<=n; i++)
{
if ((cw & 0x400000l) != 0)
cw=(cw << 1) | 1;
else
cw<<=1;
}
}
return(cw & 0x7fffffl);
}
unsigned int rotate_right(unsigned int cw, int n)
/* This function rotates 23 bit codeword cw right by n bits. */
{
int i;
if (n != 0)
{
for (i=1; i<=n; i++)
{
if ((cw & 1) != 0)
cw=(cw >> 1) | 0x400000l;
else
cw>>=1;
}
}
return(cw & 0x7fffffl);
}
public:
unsigned int correct(unsigned int cw, int *errs, unsigned int *errors_detected)
/* This function corrects Golay [23,12] codeword cw, returning the
corrected codeword. This function will produce the corrected codeword
for three or fewer errors. It will produce some other valid Golay
codeword for four or more errors, possibly not the intended
one. *errs is set to the number of bit errors corrected. */
{
unsigned char
w; /* current syndrome limit weight, 2 or 3 */
unsigned int
mask; /* mask for bit flipping */
int
i,j; /* index */
unsigned int
s, /* calculated syndrome */
cwsaver; /* saves initial value of cw */
cwsaver=cw; /* save */
*errs=0;
*errors_detected = 0;
w=3; /* initial syndrome weight threshold */
j=-1; /* -1 = no trial bit flipping on first pass */
mask=1;
while (j<23) /* flip each trial bit */
{
if (j != -1) /* toggle a trial bit */
{
if (j>0) /* restore last trial bit */
{
cw=cwsaver ^ mask;
mask+=mask; /* point to next bit */
}
cw=cwsaver ^ mask; /* flip next trial bit */
w=2; /* lower the threshold while bit diddling */
}
s=syndrome(cw); /* look for errors */
if (s) /* errors exist */
{
(*errors_detected)++;
for (i=0; i<23; i++) /* check syndrome of each cyclic shift */
{
if ((*errs=weight(s)) <= w) /* syndrome matches error pattern */
{
cw=cw ^ s; /* remove errors */
cw=rotate_right(cw,i); /* unrotate data */
return(s=cw);
}
else
{
cw=rotate_left(cw,1); /* rotate to next pattern */
s=syndrome(cw); /* calc new syndrome */
}
}
j++; /* toggle next trial bit */
}
else
{
return(cw); /* return corrected codeword */
}
}
return(cwsaver); /* return original if no corrections */
} /* correct */
unsigned int encode(unsigned int data)
{
unsigned int codeword =golay(data); /* make a test codeword */
if (parity(codeword)) {
codeword^=0x800000l;
}
return codeword;
}
unsigned int encode23(unsigned int data)
{
return golay(data); /* make a test codeword */
}
int decode(int *errs, unsigned int *cw)
/* This function decodes codeword *cw. Here error correction is attempted,
with *errs set to the number of
bits corrected, and returning 0 if no errors exist, or 1 if parity errors
exist. */
{
unsigned int parity_bit;
unsigned int detected_errors;
parity_bit=*cw & 0x800000l; /* save parity bit */
*cw&=~0x800000l; /* remove parity bit for correction */
*cw=correct(*cw, errs, &detected_errors); /* correct up to three bits */
*cw|=parity_bit; /* restore parity bit */
/* check for 4 bit errors */
if (parity(*cw)) /* odd parity is an error */
return(1);
return(0); /* no errors */
} /* decode */
int detect(int *errs, unsigned int cw)
/* This function decodes codeword cw. Here error detection is performed on cw,
returning 0 if no errors exist, 1 if an overall parity error exists, and
2 if a codeword error exists. */
{
*errs=0;
if (parity(cw)) /* odd parity is an error */
{
*errs=1;
return(1);
}
if (syndrome(cw))
{
*errs=1;
return(2);
}
else
return(0); /* no errors */
} /* decode */
};
/**
* Convenience class that adapts Mr Wallace's implementation to the input/output format of DSD.
* DSD works with data stored in char arrays where each element represents a bit (0 and 1 values).
* The original implementation works with codewords that pack the 24 bits of information (12 data and
* another 12 of parity) in an integer.
*/
class DSDGolay24 : public Golay24
{
public:
unsigned int adapt_to_codeword(const char* word, unsigned int length, const char* parity)
{
unsigned int codeword = 0;
// Data needs to be packed with the 12 bits of parity as the most significant
// bits and 12 bits of data as the less significant. All these discovered by trial and error.
for (unsigned int i=0; i<12; i++) {
assert(parity[11-i] == 0 || parity[11-i] == 1);
codeword <<= 1;
codeword |= parity[11-i];
}
for (unsigned int i=0; i<length; i++) {
char bit = word[length-1-i];
assert(bit == 0 || bit == 1);
codeword <<= 1;
codeword |= bit;
}
// We only have length bits of data. We fill up the less significant bits of codeword with zeros.
if (length < 12) {
codeword <<= (12 - length);
}
return codeword;
}
void adapt_to_word(unsigned int codeword, char* word, unsigned int length)
{
// put back in word the bits from codeword
for (unsigned int i=0, mask = 1<<(12-length); i<length; i++, mask<<=1) {
word[i] = (codeword & mask) != 0? 1 : 0;
}
}
unsigned int adapt_from_word(char* word, unsigned int length)
{
unsigned int codeword = 0;
// encode the hex bits into a codeword
for (unsigned int i=0; i<length; i++) {
int bit = word[length-1-i];
assert(bit == 0 || bit == 1);
codeword <<= 1;
codeword |= bit;
}
// We only have length bits of data. We fill up the less significant bits of codeword with zeros.
if (length < 12) {
codeword <<= (12-length);
}
return codeword;
}
/**
* Important method that takes an hex word, a 12 bit parity word and uses the Golay24 implementation
* to error correct it.
* \param hex The data to error correct, packed in an array of 6 chars, representing a bit each.
* \param parity The 12 bits of parity packed in an array of chars.
* \param fixed_errors Output argument, returns the number of errors detected and fixed.
* \return 1 if we were unable to correct the hex word. Too many errors detected.
* in this case the original data remains unchanged.
* 0 if the data was successfully error corrected.
*/
int decode_6(char* hex, const char* parity, int* fixed_errors)
{
unsigned int codeword = adapt_to_codeword(hex, 6, parity);
// codeword now contains:
// bits 0- 5: zeros
// bits 6-11: hex bits
// bits 12-23: golay (24,12) parity bits
// bits are ordered from left to right, so bit 0 is the most significant and bit 23 is the less.
int uncorrectable_errors = Golay24::decode(fixed_errors, &codeword);
// codeword is now hopefully fixed
// If there are uncorrectable errors and the fixed proposal includes ones
// in bits 0-5 then probably the fix is not good and we discard it.
// Bits 0-5 should always be zero, if there is a problem it's on the other bits
// from 6 to 24.
if (uncorrectable_errors == 1 && (codeword & 0x3f) != 0) {
// discard, don't touch hex
} else {
// put it back into our hex format
adapt_to_word(codeword, hex, 6);
uncorrectable_errors = 0;
}
return uncorrectable_errors;
}
int decode_12(char* dodeca, const char* parity, int* fixed_errors)
{
unsigned int codeword = adapt_to_codeword(dodeca, 12, parity);
// codeword contains:
// bits 0-11: dodeca bits
// bits 12-23: golay (24,12) parity bits
// bits are ordered from left to right, so bit 0 is the most significant and bit 23 is the less.
int uncorrectable_errors = Golay24::decode(fixed_errors, &codeword);
// codeword is now hopefully fixed
// If there are uncorrectable errors and the fixed proposal includes ones
// in bits 0-5 then probably the fix is not good and we discard it.
// Bits 0-5 should always be zero, if there is a problem it's on the other bits
// from 6 to 24.
if (uncorrectable_errors == 1 && (codeword & 0x3f) != 0) {
// discard, don't touch hex
} else {
// put it back into our hex format
adapt_to_word(codeword, dodeca, 12);
uncorrectable_errors = 0;
}
return uncorrectable_errors;
}
void encode_6(char* hex, char* out_parity)
{
unsigned int data = adapt_from_word(hex, 6);
unsigned int codeword = Golay24::encode(data);
// Fill up the parity
for (unsigned int i=0, mask = 1<<12; i<12; i++, mask<<=1) {
out_parity[i] = (codeword & mask) != 0? 1 : 0;
}
}
void encode_12(char* dodeca, char* out_parity)
{
unsigned int data = adapt_from_word(dodeca, 12);
unsigned int codeword = Golay24::encode(data);
// Fill up the parity
for (unsigned int i=0, mask = 1<<12; i<12; i++, mask<<=1) {
out_parity[i] = (codeword & mask) != 0? 1 : 0;
}
}
};
#endif // GOLAY24_HPP_7a68240afda9406facf81fcad3851111

413
include/Hamming.hpp Normal file
View File

@@ -0,0 +1,413 @@
#ifndef HAMMING_HPP_e7123c3795b94d14b5774d5d8f016a04
#define HAMMING_HPP_e7123c3795b94d14b5774d5d8f016a04
#include <bitset>
#include <string>
#include <assert.h>
#include <iostream>
/**
* \brief Holds data for the Hamming_10_6_3 class. See next.
*/
class Hamming_10_6_3_data
{
public:
std::bitset<10> g0;
std::bitset<10> g1;
std::bitset<10> g2;
std::bitset<10> g3;
std::bitset<10> g4;
std::bitset<10> g5;
std::bitset<6> gt0;
std::bitset<6> gt1;
std::bitset<6> gt2;
std::bitset<6> gt3;
std::bitset<10> h0;
std::bitset<10> h1;
std::bitset<10> h2;
std::bitset<10> h3;
int bad_bit_table[16];
Hamming_10_6_3_data()
{
// G matrix come from the APCO 25 reference documentation:
g0 = std::bitset<10>(std::string("1000001110"));
g1 = std::bitset<10>(std::string("0100001101"));
g2 = std::bitset<10>(std::string("0010001011"));
g3 = std::bitset<10>(std::string("0001000111"));
g4 = std::bitset<10>(std::string("0000100011"));
g5 = std::bitset<10>(std::string("0000011100"));
gt0 = std::bitset<6>(std::string("111001"));
gt1 = std::bitset<6>(std::string("110101"));
gt2 = std::bitset<6>(std::string("101110"));
gt3 = std::bitset<6>(std::string("011110"));
// H matrix, calculated transposing G. See wikipedia.
h0 = std::bitset<10>(std::string("1110011000"));
h1 = std::bitset<10>(std::string("1101010100"));
h2 = std::bitset<10>(std::string("1011100010"));
h3 = std::bitset<10>(std::string("0111100001"));
// bad_bit_table indicates which is the bit to correct from the calculated syndromes.
// It's calculated from the previous matrices: See the left-most column of the matrix whose rows are
// h0,h1,h2 and h3. It's [1 1 1 0]. It means: when the syndrome value is the binary number 1110, the
// bit that is wrong is the bit 9 (the left-most column is for the bit 9). Another example with
// the right-most column: it's column is [0 0 0 1], so when the syndrome is 0001, the bit to fix is
// bit 0 (one of the parity bits).
bad_bit_table[ 1] = 0;
bad_bit_table[ 2] = 1;
bad_bit_table[ 4] = 2;
bad_bit_table[ 8] = 3;
bad_bit_table[12] = 4;
bad_bit_table[ 3] = 5;
bad_bit_table[ 7] = 6;
bad_bit_table[11] = 7;
bad_bit_table[13] = 8;
bad_bit_table[14] = 9;
// If the syndrome is zero, then the data is correct, no errors detected.
bad_bit_table[ 0] = -2;
// Incorrect values, if the syndrome gets one of this values, then we fail to correct the data.
bad_bit_table[ 5] = -1;
bad_bit_table[ 6] = -1;
bad_bit_table[ 9] = -1;
bad_bit_table[10] = -1;
bad_bit_table[15] = -1;
}
};
class Hamming_15_11_3_data
{
public:
std::bitset<15> g0;
std::bitset<15> g1;
std::bitset<15> g2;
std::bitset<15> g3;
std::bitset<15> g4;
std::bitset<15> g5;
std::bitset<15> g6;
std::bitset<15> g7;
std::bitset<15> g8;
std::bitset<15> g9;
std::bitset<15> g10;
std::bitset<11> gt0;
std::bitset<11> gt1;
std::bitset<11> gt2;
std::bitset<11> gt3;
std::bitset<15> h0;
std::bitset<15> h1;
std::bitset<15> h2;
std::bitset<15> h3;
int bad_bit_table[16];
Hamming_15_11_3_data()
{
// G matrix come from the APCO 25 reference documentation:
g0 = std::bitset<15>(std::string("100000000001111"));
g1 = std::bitset<15>(std::string("010000000001110"));
g2 = std::bitset<15>(std::string("001000000001101"));
g3 = std::bitset<15>(std::string("000100000001100"));
g4 = std::bitset<15>(std::string("000010000001011"));
g5 = std::bitset<15>(std::string("000001000001010"));
g6 = std::bitset<15>(std::string("000000100001001"));
g7 = std::bitset<15>(std::string("000000010000111"));
g8 = std::bitset<15>(std::string("000000001000110"));
g9 = std::bitset<15>(std::string("000000000100101"));
g10 = std::bitset<15>(std::string("000000000010011"));
gt0 = std::bitset<11>(std::string("11111110000"));
gt1 = std::bitset<11>(std::string("11110001110"));
gt2 = std::bitset<11>(std::string("11001101101"));
gt3 = std::bitset<11>(std::string("10101011011"));
// H matrix, calculated transposing G. See wikipedia.
h0 = std::bitset<15>(std::string("111111100001000"));
h1 = std::bitset<15>(std::string("111100011100100"));
h2 = std::bitset<15>(std::string("110011011010010"));
h3 = std::bitset<15>(std::string("101010110110001"));
// bad_bit_table indicates which is the bit to correct from the calculated syndromes.
// It's calculated from the previous matrices: See the left-most column of the matrix whose rows are
// h0,h1,h2 and h3. It's [1 1 1 0]. It means: when the syndrome value is the binary number 1110, the
// bit that is wrong is the bit 9 (the left-most column is for the bit 9). Another example with
// the right-most column: it's column is [0 0 0 1], so when the syndrome is 0001, the bit to fix is
// bit 0 (one of the parity bits).
bad_bit_table[ 1] = 0;
bad_bit_table[ 2] = 1;
bad_bit_table[ 4] = 2;
bad_bit_table[ 8] = 3;
bad_bit_table[12] = 4;
bad_bit_table[ 3] = 5;
bad_bit_table[ 7] = 6;
bad_bit_table[11] = 7;
bad_bit_table[13] = 8;
bad_bit_table[14] = 9;
// If the syndrome is zero, then the data is correct, no errors detected.
bad_bit_table[ 0] = -2;
// Incorrect values, if the syndrome gets one of this values, then we fail to correct the data.
bad_bit_table[ 5] = -1;
bad_bit_table[ 6] = -1;
bad_bit_table[ 9] = -1;
bad_bit_table[10] = -1;
bad_bit_table[15] = -1;
}
};
/**
* An interface used by the two implementations defined here.
*/
class Hamming_Inteface
{
public:
virtual ~Hamming_Inteface()
{
// Does nothing
}
/**
* \brief Decodes using the Hamming (10,6,3) algorithm a sequence of 10 bits expressed as an integer.
* \arg input The number to decode.
* \arg output A pointer to int where the decoded result is stored.
* \return Count of detected errors.
*/
virtual int decode(int input, int* output) = 0;
/**
* \brief Decodes using the Hamming (10,6,3) algorithm a sequence of 10 bits expressed as a pointer
* to six chars (data) and a pointer to four chars (parity). Altogether ten chars, each holding one bit.
* \arg hex A pointer to six chars. If error are detected the values are modified acordingly.
* \arg parity A pointer to four chars. Represent the parity of the data.
* \return Count of detected errors.
*/
virtual int decode(char* hex, char* parity) = 0;
virtual int encode(int input) = 0;
virtual void encode(char* hex, char* out_parity) = 0;
};
/**
* \brief Hamming (10,6,3) error correction implementation.
*/
class Hamming_10_6_3 : public Hamming_Inteface
{
private:
static Hamming_10_6_3_data data;
public:
/**
* \brief Decodes using the Hamming (10,6,3) algorithm a sequence of 10 bits expressed as a std::bitset.
* \arg input The sequence to decode.
* \return Count of detected errors.
*/
int decode(std::bitset<10>& input);
int decode(int input, int* output)
{
assert (input < 1024 && input >= 0);
std::bitset<10> bitset_input(input);
int error_count = decode(bitset_input);
if (error_count == 1) {
// t has possibly been modified
input = (int)bitset_input.to_ulong();
} else {
// both in case that there were no errors or there were irrecoverable errors we leave the data as
// it is
}
// discard the four parity bits at the end
*output = input >> 4;
return error_count;
}
int decode(char* hex, char* parity)
{
// Make a bitset from hex and parity
std::bitset<10> value;
// in the bitset 9 is the left-most and 0 is the right-most
for (unsigned int i=0; i<6; i++) {
value[9-i] = (hex[i] == 1)? true : false;
}
for (unsigned int i=0; i<4; i++) {
value[3-i] = (parity[i] == 1)? true : false;
}
int error_count = decode(value);
// Modify hex if needed
if (error_count == 1) {
for (unsigned int i=0; i<6; i++) {
hex[i] = value[9-i];
}
} else {
// No errors or irrecoverable errors, in both cases don't touch the input
}
return error_count;
}
int encode(std::bitset<6>& input);
int encode(int input)
{
assert (input < 64 && input >= 0);
std::bitset<6> bitset_input(input);
return encode(bitset_input);
}
void encode(char* hex, char* out_parity)
{
// Make a bitset from hex
std::bitset<6> value;
// in the bitset 5 is the left-most and 0 is the right-most
for (unsigned int i=0; i<6; i++) {
value[5-i] = (hex[i] == 1)? true : false;
}
int parity = encode(value);
// Put the calculated parity in the form of a char array
for (int i=3; i>=0; i--) {
out_parity[i] = parity & 1;
parity >>= 1;
}
}
};
/**
* \brief Stores data for the Hamming_10_6_3_TableImpl that comes next.
*/
class Hamming_10_6_3_TableImpl_data
{
public:
int fixed_values[1024];
int error_counts[1024];
int encode_parities[64];
/**
* \brief On initialization it builds a table to calculate every possible outcome (there are 1024) before
* hand. Uses Hamming_10_6_3 to build the table.
*/
Hamming_10_6_3_TableImpl_data()
{
Hamming_10_6_3 hamming;
// Build the tables
for (int i=0; i<1024; i++) {
int fixed;
int error_count = hamming.decode(i, &fixed);
fixed_values[i] = fixed;
error_counts[i] = error_count;
}
for (int i=0; i<64; i++) {
int parity = hamming.encode(i);
encode_parities[i] = parity;
}
}
};
/**
* \brief Hamming (10,6,3) error correction implementation.
*/
class Hamming_10_6_3_TableImpl : public Hamming_Inteface
{
private:
static Hamming_10_6_3_TableImpl_data data;
public:
int decode(int input, int* output);
static int convert_hex_to_int(char* hex)
{
// Make an int from hex
int value = 0;
// in the bitset 9 is the left-most and 0 is the right-most
for (unsigned int i=0; i<6; i++) {
assert(hex[i] == 0 || hex[i] == 1);
value <<= 1;
value |= hex[i];
}
return value;
}
static int convert_hex_parity_to_int(char* hex, char* parity)
{
// Make an int from hex and parity
int value = 0;
// in the bitset 9 is the left-most and 0 is the right-most
for (unsigned int i=0; i<6; i++) {
assert(hex[i] == 0 || hex[i] == 1);
value <<= 1;
value |= hex[i];
}
for (unsigned int i=0; i<4; i++) {
assert(parity[i] == 0 || parity[i] == 1);
value <<= 1;
value |= parity[i];
}
return value;
}
static void convert_int_to_hex(int value, char* hex)
{
unsigned int v = value;
for (unsigned int i=0; i<6; i++) {
hex[5-i] = v & 1;
v >>= 1;
}
}
int decode(char* hex, char* parity)
{
int value = convert_hex_parity_to_int(hex, parity);
int fixed;
int error_count = decode(value, &fixed);
// Modify hex if needed
if (error_count == 1) {
convert_int_to_hex(fixed, hex);
} else {
// No errors or irrecoverable errors, in both cases don't touch the input
}
return error_count;
}
int encode(int input);
void encode(char* hex, char* out_parity)
{
int value = convert_hex_to_int(hex);
int parity = encode(value);
// Put the calculated parity in the form of a char array
for (int i=3; i>=0; i--) {
out_parity[i] = parity & 1;
parity >>= 1;
}
}
};
#endif // HAMMING_HPP_e7123c3795b94d14b5774d5d8f016a04

667
include/ReedSolomon.hpp Normal file
View File

@@ -0,0 +1,667 @@
#ifndef REEDSOLOMON_HPP_b1405fdab6374ba2a4e65e8d45ec3d80
#define REEDSOLOMON_HPP_b1405fdab6374ba2a4e65e8d45ec3d80
/**
* Code taken and adapted from www.eccpage.com/rs.c
* Credit goes to Mr Simon Rockliff.
*/
/* This program is an encoder/decoder for Reed-Solomon codes. Encoding is in
systematic form, decoding via the Berlekamp iterative algorithm.
In the present form , the constants mm, nn, tt, and kk=nn-2tt must be
specified (the double letters are used simply to avoid clashes with
other n,k,t used in other programs into which this was incorporated!)
Also, the irreducible polynomial used to generate GF(2**mm) must also be
entered -- these can be found in Lin and Costello, and also Clark and Cain.
The representation of the elements of GF(2**m) is either in index form,
where the number is the power of the primitive element alpha, which is
convenient for multiplication (add the powers modulo 2**m-1) or in
polynomial form, where the bits represent the coefficients of the
polynomial representation of the number, which is the most convenient form
for addition. The two forms are swapped between via lookup tables.
This leads to fairly messy looking expressions, but unfortunately, there
is no easy alternative when working with Galois arithmetic.
The code is not written in the most elegant way, but to the best
of my knowledge, (no absolute guarantees!), it works.
However, when including it into a simulation program, you may want to do
some conversion of global variables (used here because I am lazy!) to
local variables where appropriate, and passing parameters (eg array
addresses) to the functions may be a sensible move to reduce the number
of global variables and thus decrease the chance of a bug being introduced.
This program does not handle erasures at present, but should not be hard
to adapt to do this, as it is just an adjustment to the Berlekamp-Massey
algorithm. It also does not attempt to decode past the BCH bound -- see
Blahut "Theory and practice of error control codes" for how to do this.
Simon Rockliff, University of Adelaide 21/9/89
26/6/91 Slight modifications to remove a compiler dependent bug which hadn't
previously surfaced. A few extra comments added for clarity.
Appears to all work fine, ready for posting to net!
Notice
--------
This program may be freely modified and/or given to whoever wants it.
A condition of such distribution is that the author's contribution be
acknowledged by his name being left in the comments heading the program,
however no responsibility is accepted for any financial or other loss which
may result from some unforseen errors or malfunctioning of the program
during use.
Simon Rockliff, 26th June 1991
*/
#include <math.h>
#include <stdio.h>
template <int TT>
class ReedSolomon_63
{
private:
static const int MM = 6; /* RS code over GF(2**mm) */
static const int NN = 63; /* nn=2**mm -1 length of codeword */
//int tt; /* number of errors that can be corrected */
//int kk; /* kk = nn-2*tt */
static const int KK = NN-2*TT;
// distance = nn-kk+1 = 2*tt+1
int* alpha_to;
int* index_of;
int* gg;
void generate_gf(int* generator_polinomial)
/* generate GF(2**mm) from the irreducible polynomial p(X) in pp[0]..pp[mm]
lookup tables: index->polynomial form alpha_to[] contains j=alpha**i;
polynomial form -> index form index_of[j=alpha**i] = i
alpha=2 is the primitive element of GF(2**mm)
*/
{
register int i, mask;
mask = 1;
alpha_to[MM] = 0;
for (i = 0; i < MM; i++) {
alpha_to[i] = mask;
index_of[alpha_to[i]] = i;
if (generator_polinomial[i] != 0)
alpha_to[MM] ^= mask;
mask <<= 1;
}
index_of[alpha_to[MM]] = MM;
mask >>= 1;
for (i = MM + 1; i < NN; i++) {
if (alpha_to[i - 1] >= mask)
alpha_to[i] = alpha_to[MM] ^ ((alpha_to[i - 1] ^ mask) << 1);
else
alpha_to[i] = alpha_to[i - 1] << 1;
index_of[alpha_to[i]] = i;
}
index_of[0] = -1;
}
void gen_poly()
/* Obtain the generator polynomial of the tt-error correcting, length
nn=(2**mm -1) Reed Solomon code from the product of (X+alpha**i), i=1..2*tt
*/
{
register int i, j;
gg[0] = 2; /* primitive element alpha = 2 for GF(2**mm) */
gg[1] = 1; /* g(x) = (X+alpha) initially */
for (i = 2; i <= NN - KK; i++) {
gg[i] = 1;
for (j = i - 1; j > 0; j--)
if (gg[j] != 0)
gg[j] = gg[j - 1] ^ alpha_to[(index_of[gg[j]] + i) % NN];
else
gg[j] = gg[j - 1];
gg[0] = alpha_to[(index_of[gg[0]] + i) % NN]; /* gg[0] can never be zero */
}
/* convert gg[] to index form for quicker encoding */
for (i = 0; i <= NN - KK; i++)
gg[i] = index_of[gg[i]];
}
public:
ReedSolomon_63()
{
alpha_to = new int[NN + 1];
index_of = new int[NN + 1];
gg = new int[NN - KK + 1];
// Polynom used in P25 is alpha**6+alpha+1
int generator_polinomial[] = { 1, 1, 0, 0, 0, 0, 1 }; /* specify irreducible polynomial coeffts */
generate_gf(generator_polinomial);
gen_poly();
}
virtual ~ReedSolomon_63()
{
delete[] gg;
delete[] index_of;
delete[] alpha_to;
}
void encode(const int* data, int* bb)
/* take the string of symbols in data[i], i=0..(k-1) and encode systematically
to produce 2*tt parity symbols in bb[0]..bb[2*tt-1]
data[] is input and bb[] is output in polynomial form.
Encoding is done by using a feedback shift register with appropriate
connections specified by the elements of gg[], which was generated above.
Codeword is c(X) = data(X)*X**(nn-kk)+ b(X) */
{
register int i, j;
int feedback;
for (i = 0; i < NN - KK; i++)
bb[i] = 0;
for (i = KK - 1; i >= 0; i--) {
feedback = index_of[data[i] ^ bb[NN - KK - 1]];
if (feedback != -1) {
for (j = NN - KK - 1; j > 0; j--)
if (gg[j] != -1)
bb[j] = bb[j - 1] ^ alpha_to[(gg[j] + feedback) % NN];
else
bb[j] = bb[j - 1];
bb[0] = alpha_to[(gg[0] + feedback) % NN];
} else {
for (j = NN - KK - 1; j > 0; j--)
bb[j] = bb[j - 1];
bb[0] = 0;
}
}
}
int decode(const int* input, int* recd)
/* assume we have received bits grouped into mm-bit symbols in recd[i],
i=0..(nn-1), and recd[i] is polynomial form.
We first compute the 2*tt syndromes by substituting alpha**i into rec(X) and
evaluating, storing the syndromes in s[i], i=1..2tt (leave s[0] zero) .
Then we use the Berlekamp iteration to find the error location polynomial
elp[i]. If the degree of the elp is >tt, we cannot correct all the errors
and hence just put out the information symbols uncorrected. If the degree of
elp is <=tt, we substitute alpha**i , i=1..n into the elp to get the roots,
hence the inverse roots, the error location numbers. If the number of errors
located does not equal the degree of the elp, we have more than tt errors
and cannot correct them. Otherwise, we then solve for the error value at
the error location and correct the error. The procedure is that found in
Lin and Costello. For the cases where the number of errors is known to be too
large to correct, the information symbols as received are output (the
advantage of systematic encoding is that hopefully some of the information
symbols will be okay and that if we are in luck, the errors are in the
parity part of the transmitted codeword). Of course, these insoluble cases
can be returned as error flags to the calling routine if desired. */
{
register int i, j, u, q;
int elp[NN - KK + 2][NN - KK], d[NN - KK + 2], l[NN - KK + 2], u_lu[NN - KK
+ 2], s[NN - KK + 1];
int count = 0, syn_error = 0, root[TT], loc[TT], z[TT + 1], err[NN], reg[TT
+ 1];
int irrecoverable_error = 0;
for (int i = 0; i < NN; i++)
recd[i] = index_of[input[i]]; /* put recd[i] into index form (ie as powers of alpha) */
/* first form the syndromes */
for (i = 1; i <= NN - KK; i++) {
s[i] = 0;
for (j = 0; j < NN; j++)
if (recd[j] != -1)
s[i] ^= alpha_to[(recd[j] + i * j) % NN]; /* recd[j] in index form */
/* convert syndrome from polynomial form to index form */
if (s[i] != 0)
syn_error = 1; /* set flag if non-zero syndrome => error */
s[i] = index_of[s[i]];
}
if (syn_error) /* if errors, try and correct */
{
/* compute the error location polynomial via the Berlekamp iterative algorithm,
following the terminology of Lin and Costello : d[u] is the 'mu'th
discrepancy, where u='mu'+1 and 'mu' (the Greek letter!) is the step number
ranging from -1 to 2*tt (see L&C), l[u] is the
degree of the elp at that step, and u_l[u] is the difference between the
step number and the degree of the elp.
*/
/* initialise table entries */
d[0] = 0; /* index form */
d[1] = s[1]; /* index form */
elp[0][0] = 0; /* index form */
elp[1][0] = 1; /* polynomial form */
for (i = 1; i < NN - KK; i++) {
elp[0][i] = -1; /* index form */
elp[1][i] = 0; /* polynomial form */
}
l[0] = 0;
l[1] = 0;
u_lu[0] = -1;
u_lu[1] = 0;
u = 0;
do {
u++;
if (d[u] == -1) {
l[u + 1] = l[u];
for (i = 0; i <= l[u]; i++) {
elp[u + 1][i] = elp[u][i];
elp[u][i] = index_of[elp[u][i]];
}
} else
/* search for words with greatest u_lu[q] for which d[q]!=0 */
{
q = u - 1;
while ((d[q] == -1) && (q > 0))
q--;
/* have found first non-zero d[q] */
if (q > 0) {
j = q;
do {
j--;
if ((d[j] != -1) && (u_lu[q] < u_lu[j]))
q = j;
} while (j > 0);
};
/* have now found q such that d[u]!=0 and u_lu[q] is maximum */
/* store degree of new elp polynomial */
if (l[u] > l[q] + u - q)
l[u + 1] = l[u];
else
l[u + 1] = l[q] + u - q;
/* form new elp(x) */
for (i = 0; i < NN - KK; i++)
elp[u + 1][i] = 0;
for (i = 0; i <= l[q]; i++)
if (elp[q][i] != -1)
elp[u + 1][i + u - q] = alpha_to[(d[u] + NN - d[q]
+ elp[q][i]) % NN];
for (i = 0; i <= l[u]; i++) {
elp[u + 1][i] ^= elp[u][i];
elp[u][i] = index_of[elp[u][i]]; /*convert old elp value to index*/
}
}
u_lu[u + 1] = u - l[u + 1];
/* form (u+1)th discrepancy */
if (u < NN - KK) /* no discrepancy computed on last iteration */
{
if (s[u + 1] != -1)
d[u + 1] = alpha_to[s[u + 1]];
else
d[u + 1] = 0;
for (i = 1; i <= l[u + 1]; i++)
if ((s[u + 1 - i] != -1) && (elp[u + 1][i] != 0))
d[u + 1] ^= alpha_to[(s[u + 1 - i]
+ index_of[elp[u + 1][i]]) % NN];
d[u + 1] = index_of[d[u + 1]]; /* put d[u+1] into index form */
}
} while ((u < NN - KK) && (l[u + 1] <= TT));
u++;
if (l[u] <= TT) /* can correct error */
{
/* put elp into index form */
for (i = 0; i <= l[u]; i++)
elp[u][i] = index_of[elp[u][i]];
/* find roots of the error location polynomial */
for (i = 1; i <= l[u]; i++)
reg[i] = elp[u][i];
count = 0;
for (i = 1; i <= NN; i++) {
q = 1;
for (j = 1; j <= l[u]; j++)
if (reg[j] != -1) {
reg[j] = (reg[j] + j) % NN;
q ^= alpha_to[reg[j]];
};
if (!q) /* store root and error location number indices */
{
root[count] = i;
loc[count] = NN - i;
count++;
};
};
if (count == l[u]) /* no. roots = degree of elp hence <= tt errors */
{
/* form polynomial z(x) */
for (i = 1; i <= l[u]; i++) /* Z[0] = 1 always - do not need */
{
if ((s[i] != -1) && (elp[u][i] != -1))
z[i] = alpha_to[s[i]] ^ alpha_to[elp[u][i]];
else if ((s[i] != -1) && (elp[u][i] == -1))
z[i] = alpha_to[s[i]];
else if ((s[i] == -1) && (elp[u][i] != -1))
z[i] = alpha_to[elp[u][i]];
else
z[i] = 0;
for (j = 1; j < i; j++)
if ((s[j] != -1) && (elp[u][i - j] != -1))
z[i] ^= alpha_to[(elp[u][i - j] + s[j]) % NN];
z[i] = index_of[z[i]]; /* put into index form */
};
/* evaluate errors at locations given by error location numbers loc[i] */
for (i = 0; i < NN; i++) {
err[i] = 0;
if (recd[i] != -1) /* convert recd[] to polynomial form */
recd[i] = alpha_to[recd[i]];
else
recd[i] = 0;
}
for (i = 0; i < l[u]; i++) /* compute numerator of error term first */
{
err[loc[i]] = 1; /* accounts for z[0] */
for (j = 1; j <= l[u]; j++)
if (z[j] != -1)
err[loc[i]] ^= alpha_to[(z[j] + j * root[i]) % NN];
if (err[loc[i]] != 0) {
err[loc[i]] = index_of[err[loc[i]]];
q = 0; /* form denominator of error term */
for (j = 0; j < l[u]; j++)
if (j != i)
q += index_of[1
^ alpha_to[(loc[j] + root[i]) % NN]];
q = q % NN;
err[loc[i]] = alpha_to[(err[loc[i]] - q + NN) % NN];
recd[loc[i]] ^= err[loc[i]]; /*recd[i] must be in polynomial form */
}
}
} else {
/* no. roots != degree of elp => >tt errors and cannot solve */
irrecoverable_error = 1;
}
} else {
/* elp has degree >tt hence cannot solve */
irrecoverable_error = 1;
}
} else {
/* no non-zero syndromes => no errors: output received codeword */
for (i = 0; i < NN; i++)
if (recd[i] != -1) /* convert recd[] to polynomial form */
recd[i] = alpha_to[recd[i]];
else
recd[i] = 0;
}
if (irrecoverable_error) {
for (i = 0; i < NN; i++) /* could return error flag if desired */
if (recd[i] != -1) /* convert recd[] to polynomial form */
recd[i] = alpha_to[recd[i]];
else
recd[i] = 0; /* just output received codeword as is */
}
return irrecoverable_error;
}
protected:
int bin_to_hex(const char* input)
{
int output = ((input[0] != 0)? 32 : 0) |
((input[1] != 0)? 16 : 0) |
((input[2] != 0)? 8 : 0) |
((input[3] != 0)? 4 : 0) |
((input[4] != 0)? 2 : 0) |
((input[5] != 0)? 1 : 0);
return output;
}
void hex_to_bin(int input, char* output)
{
output[0] = ((input & 32) != 0)? 1 : 0;
output[1] = ((input & 16) != 0)? 1 : 0;
output[2] = ((input & 8) != 0)? 1 : 0;
output[3] = ((input & 4) != 0)? 1 : 0;
output[4] = ((input & 2) != 0)? 1 : 0;
output[5] = ((input & 1) != 0)? 1 : 0;
}
};
/**
* Convenience class that does a Reed-Solomon (36,20,17) error correction adapting input and output to
* the DSD data format: hex words packed as char arrays.
*/
class DSDReedSolomon_36_20_17 : public ReedSolomon_63<8>
{
public:
// tt = (dd-1)/2
// dd = 17 --> tt = 8
DSDReedSolomon_36_20_17() : ReedSolomon_63<8>()
{
// Does nothing
}
/**
* Does a Reed-Solomon decode adapting the input and output to the expected DSD data format.
* \param hex_data Data packed bits, originally a char[20][6], so containing 20 hex works, each char
* is a bit. Bits are corrected in place.
* \param hex_parity Parity packed bits, originally a char[16][6], 16 hex words.
* \return 1 if irrecoverable errors have been detected, 0 otherwise.
*/
int decode(char* hex_data, const char* hex_parity)
{
int input[63];
int output[63];
// First put the parity data, 16 hex words
for(unsigned int i=0; i<16; i++) {
input[i] = bin_to_hex(hex_parity + i*6);
}
// Then the 20 hex words of data
for(unsigned int i=16; i<16+20; i++) {
input[i] = bin_to_hex(hex_data + (i-16)*6);
}
// Fill up with zeros to complete the 47 expected hex words of data
for(unsigned int i=16+20; i<63; i++) {
input[i] = 0;
}
// Now we can call decode on the base class
int irrecoverable_errors = ReedSolomon_63<8>::decode(input, output);
// Convert it back to binary and put it into hex_data. If decode failed we should have
// the input unchanged.
for(unsigned int i=16; i<16+20; i++) {
hex_to_bin(output[i], hex_data + (i-16)*6);
}
return irrecoverable_errors;
}
void encode(const char* hex_data, char* out_hex_parity)
{
int input[47];
int output[63];
// Put the 20 hex words of data
for(unsigned int i=0; i<20; i++) {
input[i] = bin_to_hex(hex_data + i*6);
}
// Fill up with zeros to complete the 47 expected hex words of data
for(unsigned int i=20; i<47; i++) {
input[i] = 0;
}
// Now we can call encode on the base class
ReedSolomon_63<8>::encode(input, output);
// Convert it back to binary form and put it into the parity
for(unsigned int i=0; i<16; i++) {
hex_to_bin(output[i], out_hex_parity + i*6);
}
}
};
/**
* Convenience class that does a Reed-Solomon (24,12,13) error correction adapting input and output to
* the DSD data format: hex words packed as char arrays.
*/
class DSDReedSolomon_24_12_13 : public ReedSolomon_63<6>
{
public:
// tt = (dd-1)/2
// dd = 13 --> tt = 6
DSDReedSolomon_24_12_13() : ReedSolomon_63<6>()
{
// Does nothing
}
/**
* Does a Reed-Solomon decode adapting the input and output to the expected DSD data format.
* \param hex_data Data packed bits, originally a char[12][6], so containing 12 hex works, each char
* is a bit. Bits are corrected in place.
* \param hex_parity Parity packed bits, originally a char[12][6], 12 hex words.
* \return 1 if irrecoverable errors have been detected, 0 otherwise.
*/
int decode(char* hex_data, const char* hex_parity)
{
int input[63];
int output[63];
// First put the parity data, 12 hex words
for(unsigned int i=0; i<12; i++) {
input[i] = bin_to_hex(hex_parity + i*6);
}
// Then the 12 hex words of data
for(unsigned int i=12; i<12+12; i++) {
input[i] = bin_to_hex(hex_data + (i-12)*6);
}
// Fill up with zeros to complete the 51 expected hex words of data
for(unsigned int i=12+12; i<63; i++) {
input[i] = 0;
}
// Now we can call decode on the base class
int irrecoverable_errors = ReedSolomon_63<6>::decode(input, output);
// Convert it back to binary and put it into hex_data. If decode failed we should have
// the input unchanged.
for(unsigned int i=12; i<12+12; i++) {
hex_to_bin(output[i], hex_data + (i-12)*6);
}
return irrecoverable_errors;
}
void encode(const char* hex_data, char* out_hex_parity)
{
int input[51];
int output[63];
// Put the 12 hex words of data
for(unsigned int i=0; i<12; i++) {
input[i] = bin_to_hex(hex_data + i*6);
}
// Fill up with zeros to complete the 51 expected hex words of data
for(unsigned int i=12; i<51; i++) {
input[i] = 0;
}
// Now we can call encode on the base class
ReedSolomon_63<6>::encode(input, output);
// Convert it back to binary form and put it into the parity
for(unsigned int i=0; i<12; i++) {
hex_to_bin(output[i], out_hex_parity + i*6);
}
}
};
/**
* Convenience class that does a Reed-Solomon (24,16,9) error correction adapting input and output to
* the DSD data format: hex words packed as char arrays.
*/
class DSDReedSolomon_24_16_9 : public ReedSolomon_63<4>
{
public:
// tt = (dd-1)/2
// dd = 9 --> tt = 4
DSDReedSolomon_24_16_9() : ReedSolomon_63<4>()
{
// Does nothing
}
/**
* Does a Reed-Solomon decode adapting the input and output to the expected DSD data format.
* \param hex_data Data packed bits, originally a char[16][6], so containing 16 hex works, each char
* is a bit. Bits are corrected in place.
* \param hex_parity Parity packed bits, originally a char[8][6], 8 hex words.
* \return 1 if irrecoverable errors have been detected, 0 otherwise.
*/
int decode(char* hex_data, const char* hex_parity)
{
int input[63];
int output[63];
// First put the parity data, 8 hex words
for(unsigned int i=0; i<8; i++) {
input[i] = bin_to_hex(hex_parity + i*6);
}
// Then the 16 hex words of data
for(unsigned int i=8; i<8+16; i++) {
input[i] = bin_to_hex(hex_data + (i-8)*6);
}
// Fill up with zeros to complete the 55 expected hex words of data
for(unsigned int i=8+16; i<63; i++) {
input[i] = 0;
}
// Now we can call decode on the base class
int irrecoverable_errors = ReedSolomon_63<4>::decode(input, output);
// Convert it back to binary and put it into hex_data. If decode failed we should have
// the input unchanged.
for(unsigned int i=8; i<8+16; i++) {
hex_to_bin(output[i], hex_data + (i-8)*6);
}
return irrecoverable_errors;
}
void encode(const char* hex_data, char* out_hex_parity)
{
int input[55];
int output[63];
// Put the 16 hex words of data
for(unsigned int i=0; i<16; i++) {
input[i] = bin_to_hex(hex_data + i*6);
}
// Fill up with zeros to complete the 55 expected hex words of data
for(unsigned int i=16; i<55; i++) {
input[i] = 0;
}
// Now we can call encode on the base class
ReedSolomon_63<4>::encode(input, output);
// Convert it back to binary form and put it into the parity
for(unsigned int i=0; i<8; i++) {
hex_to_bin(output[i], out_hex_parity + i*6);
}
}
};
#endif // REEDSOLOMON_HPP_b1405fdab6374ba2a4e65e8d45ec3d80

71
include/bp.h Normal file
View File

@@ -0,0 +1,71 @@
#ifndef BP_H
#define BP_H
static const uint16_t BPK[256] = {
//000
0x0000, 0x1F00, 0xE300, 0xFC00, 0x2503, 0x3A03, 0xC603, 0xD903,
//008
0x4A05, 0x5505, 0xA905, 0xB605, 0x6F06, 0x7006, 0x8C06, 0x9306,
//016
0x2618, 0x3918, 0xC518, 0xDA18, 0x031B, 0x1C1B, 0xE01B, 0xFF1B,
//024
0x6C1D, 0x731D, 0x8F1D, 0x901D, 0x491E, 0x561E, 0xAA1E, 0xB51E,
//032
0x4B28, 0x5428, 0xA828, 0xB728, 0x6E2B, 0x712B, 0x8D2B, 0x922B,
//040
0x012D, 0x1E2D, 0xE22D, 0xFD2D, 0x242E, 0x3B2E, 0xC72E, 0xD82E,
//048
0x6D30, 0x7230, 0x8E30, 0x9130, 0x4833, 0x5733, 0xAB33, 0xB433,
//056
0x2735, 0x3835, 0xC435, 0xDB35, 0x0236, 0x1D36, 0xE136, 0xFE36,
//064
0x2B49, 0x3449, 0xC849, 0xD749, 0x0E4A, 0x114A, 0xED4A, 0xF24A,
//072
0x614C, 0x7E4C, 0x824C, 0x9D4C, 0x444F, 0x5B4F, 0xA74F, 0xB84F,
//080
0x0D51, 0x1251, 0xEE51, 0xF151, 0x2852, 0x3752, 0xCB52, 0xD452,
//088
0x4754, 0x5854, 0xA454, 0xBB54, 0x6257, 0x7D57, 0x8157, 0x9E57,
//096
0x6061, 0x7F61, 0x8361, 0x9C61, 0x4562, 0x5A62, 0xA662, 0xB962,
//104
0x2A64, 0x3564, 0xC964, 0xD664, 0x0F67, 0x1067, 0xEC67, 0xF367,
//112
0x4679, 0x5979, 0xA579, 0xBA79, 0x637A, 0x7C7A, 0x807A, 0x9F7A,
//120
0x0C7C, 0x137C, 0xEF7C, 0xF07C, 0x297F, 0x367F, 0xCA7F, 0xD57F,
//128
0x4D89, 0x5289, 0xAE89, 0xB189, 0x688A, 0x778A, 0x8B8A, 0x948A,
//136
0x078C, 0x188C, 0xE48C, 0xFB8C, 0x228F, 0x3D8F, 0xC18F, 0xDE8F,
//144
0x6B91, 0x7491, 0x8891, 0x9791, 0x4E92, 0x5192, 0xAD92, 0xB292,
//152
0x2194, 0x3E94, 0xC294, 0xDD94, 0x0497, 0x1B97, 0xE797, 0xF897,
//160
0x06A1, 0x19A1, 0xE5A1, 0xFAA1, 0x23A2, 0x3CA2, 0xC0A2, 0xDFA2,
//168
0x4CA4, 0x53A4, 0xAFA4, 0xB0A4, 0x69A7, 0x76A7, 0x8AA7, 0x95A7,
//176
0x20B9, 0x3FB9, 0xC3B9, 0xDCB9, 0x05BA, 0x1ABA, 0xE6BA, 0xF9BA,
//184
0x6ABC, 0x75BC, 0x89BC, 0x96BC, 0x4FBF, 0x50BF, 0xACBF, 0xB3BF,
//192
0x66C0, 0x79C0, 0x85C0, 0x9AC0, 0x43C3, 0x5CC3, 0xA0C3, 0xBFC3,
//200
0x2CC5, 0x33C5, 0xCFC5, 0xD0C5, 0x09C6, 0x16C6, 0xEAC6, 0xF5C6,
//208
0x84D0, 0x85DF, 0x8AD3, 0x8BDC, 0xB6D5, 0xB7DA, 0xB8D6, 0xB9D9,
//216
0xD0DA, 0xD1D5, 0xDED9, 0xDFD6, 0xE2DF, 0xE3D0, 0xECDC, 0xEDD3,
//224
0x2DE8, 0x32E8, 0xCEE8, 0xD1E8, 0x08EB, 0x17EB, 0xEBEB, 0xF4EB,
//232
0x67ED, 0x78ED, 0x84ED, 0x9BED, 0x42EE, 0x5DEE, 0xA1EE, 0xBEEE,
//240
0x0BF0, 0x14F0, 0xE8F0, 0xF7F0, 0x2EF3, 0x31F3, 0xCDF3, 0xD2F3,
//248
0x41F5, 0x5EF5, 0xA2F5, 0xBDF5, 0x64F6, 0x7BF6, 0x87F6, 0x98F6
};
#endif

298
include/descramble.h Normal file
View File

@@ -0,0 +1,298 @@
/* descramble.h */
// Functions for processing the radio-header:
// descramble
// deinterleave
// FECdecoder
// (C) 2011 Jonathan Naylor G4KLX
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
// This code was originally written by JOnathan Naylor, G4KLX, as part
// of the "pcrepeatercontroller" project
// More info:
// http://groups.yahoo.com/group/pcrepeatercontroller
// Changes:
// Convert C++ to C
// Version 20111106: initial release
#include <stdio.h>
#include <string.h>
// function traceBack
int traceBack (int * out, int * m_pathMemory0, int * m_pathMemory1, int * m_pathMemory2, int * m_pathMemory3) {
enum FEC_STATE { S0, S1, S2, S3 } state;
int loop;
int length=0;
state=S0;
for (loop=329; loop >= 0; loop--, length++) {
switch (state) {
case S0: // if state S0
if (m_pathMemory0[loop]) {
state = S2; // lower path
} else {
state = S0; // upper path
} // end else - if
out[loop]=0;
break;
case S1: // if state S1
if (m_pathMemory1[loop]) {
state = S2; // lower path
} else {
state = S0; // upper path
} // end else - if
out[loop]=1;
break;
case S2: // if state S2
if (m_pathMemory2[loop]) {
state = S3; // lower path
} else {
state = S1; // upper path
} // end else - if
out[loop]=0;
break;
case S3: // if state S3
if (m_pathMemory3[loop]) {
state = S3; // lower path
} else {
state = S1; // upper path
} // end else - if
out[loop]=1;
break;
} // end switch
} // end for
return(length);
}; // end function
// function viterbiDecode
void viterbiDecode (int n, int *data, int *m_pathMemory0, int *m_pathMemory1, int *m_pathMemory2, int *m_pathMemory3, int *m_pathMetric) {
int tempMetric[4];
int metric[8];
int loop;
int m1;
int m2;
metric[0]=(data[1]^0)+(data[0]^0);
metric[1]=(data[1]^1)+(data[0]^1);
metric[2]=(data[1]^1)+(data[0]^0);
metric[3]=(data[1]^0)+(data[0]^1);
metric[4]=(data[1]^1)+(data[0]^1);
metric[5]=(data[1]^0)+(data[0]^0);
metric[6]=(data[1]^0)+(data[0]^1);
metric[7]=(data[1]^1)+(data[0]^0);
// Pres. state = S0, Prev. state = S0 & S2
m1=metric[0]+m_pathMetric[0];
m2=metric[4]+m_pathMetric[2];
if (m1<m2) {
m_pathMemory0[n]=0;
tempMetric[0]=m1;
} else {
m_pathMemory0[n]=1;
tempMetric[0]=m2;
}; // end else - if
// Pres. state = S1, Prev. state = S0 & S2
m1=metric[1]+m_pathMetric[0];
m2=metric[5]+m_pathMetric[2];
if (m1<m2) {
m_pathMemory1[n]=0;
tempMetric[1]=m1;
} else {
m_pathMemory1[n]=1;
tempMetric[1]=m2;
}; // end else - if
// Pres. state = S2, Prev. state = S2 & S3
m1=metric[2]+m_pathMetric[1];
m2=metric[6]+m_pathMetric[3];
if (m1<m2) {
m_pathMemory2[n]=0;
tempMetric[2]=m1;
} else {
m_pathMemory2[n]=1;
tempMetric[2]=m2;
}
// Pres. state = S3, Prev. state = S1 & S3
m1=metric[3]+m_pathMetric[1];
m2=metric[7]+m_pathMetric[3];
if (m1 < m2) {
m_pathMemory3[n]=0;
tempMetric[3]=m1;
} else {
m_pathMemory3[n]=1;
tempMetric[3]=m2;
}; // end else - if
for (loop=0;loop<4;loop++) {
m_pathMetric[loop]=tempMetric[loop];
}; // end for
}; // end function ViterbiDecode
// function FECdecoder
// returns outlen
int FECdecoder (int * in, int * out) {
int outLen;
int m_pathMemory0[330];
int m_pathMemory1[330];
int m_pathMemory2[330];
int m_pathMemory3[330];
int m_pathMetric[4];
int loop,loop2;
int n=0;
memset(m_pathMemory0,0,330*sizeof(int));
memset(m_pathMemory1,0,330*sizeof(int));
memset(m_pathMemory2,0,330*sizeof(int));
memset(m_pathMemory3,0,330*sizeof(int));
for (loop=0;loop<4;loop++) {
m_pathMetric[loop]=0;
}; // end for
for (loop2=0;loop2<660;loop2+=2, n++) {
int data[2];
if (in[loop2]) {
data[1]=1;
} else {
data[1]=0;
}; // end else - if
if (in[loop2+1]) {
data[0]=1;
} else {
data[0]=0;
}; // end else - if
viterbiDecode(n, data, m_pathMemory0, m_pathMemory1, m_pathMemory2, m_pathMemory3, m_pathMetric);
}; // end for
outLen=traceBack(out, m_pathMemory0, m_pathMemory1, m_pathMemory2, m_pathMemory3);
// Swap endian-ness
// code removed (done converting bits into octets), done in main program
//for (loop=0;loop<330;loop+=8) {
// int temp;
// temp=out[loop];out[loop]=out[loop+7];out[loop+7]=temp;
// temp=out[loop+1];out[loop+1]=out[loop+6];out[loop+6]=temp;
// temp=out[loop+2];out[loop+2]=out[loop+5];out[loop+5]=temp;
// temp=out[loop+3];out[loop+3]=out[loop+4];out[loop+4]=temp;
//}
return(outLen);
}; // end function FECdecoder
// function deinterleave
void deinterleave (int * in, int * out) {
int k=0;
int loop=0;
// function starts here
// init vars
k=0;
for (loop=0;loop<660;loop++) {
out[k]=in[loop];
k += 24;
if (k >= 672) {
k -= 671;
} else if (k >= 660) {
k -= 647;
}; // end elsif - if
}; // end for
}; // end function deinterleave
/// function scramble
void scramble (int * in,int * out) {
static const int SCRAMBLER_TABLE_BITS[] = {
0,0,0,0,1,1,1,0,1,1,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,
0,0,1,0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,1,1,0,0,
1,1,0,1,0,1,0,0,1,1,1,0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,1,0,1,0,1,0,
1,1,1,1,1,0,1,0,0,1,0,1,0,0,0,1,1,0,1,1,1,0,0,0,1,1,1,1,1,1,1,0,
0,0,0,1,1,1,0,1,1,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,
0,1,0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,1,1,0,0,1,
1,0,1,0,1,0,0,1,1,1,0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,1,0,1,0,1,0,1,
1,1,1,1,0,1,0,0,1,0,1,0,0,0,1,1,0,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,
0,0,1,1,1,0,1,1,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,
1,0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,1,1,0,0,1,1,
0,1,0,1,0,0,1,1,1,0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,1,0,1,0,1,0,1,1,
1,1,1,0,1,0,0,1,0,1,0,0,0,1,1,0,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,
0,1,1,1,0,1,1,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,
0,0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,1,1,0,0,1,1,0,
1,0,1,0,0,1,1,1,0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,1,0,1,0,1,0,1,1,1,
1,1,0,1,0,0,1,0,1,0,0,0,1,1,0,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,
1,1,1,0,1,1,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,
0,1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,1,1,0,0,1,1,0,1,
0,1,0,0,1,1,1,0,0,1,1,1,1,0,1,1,0,1,0,0,0,0,1,0,1,0,1,0,1,1,1,1,
1,0,1,0,0,1,0,1,0,0,0,1,1,0,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,
1,1,0,1,1,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,
1,1,0,0,0,1,0,1,1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,1,1,0,0,1,1,0,1,0,
1,0,0,1,1,1,0,0,1,1,1,1,0,1,1,0};
const int SCRAMBLER_TABLE_BITS_LENGTH=720;
int loop=0;
int m_count=0;
for (loop=0; loop < 660; loop++) {
out[loop] = in[loop] ^ SCRAMBLER_TABLE_BITS[m_count++];
if (m_count >= SCRAMBLER_TABLE_BITS_LENGTH) {
m_count = 0U;
}; // end if
}; // end for
}; // end function scramble

View File

@@ -15,19 +15,25 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* NXDN AMBE interleave schedule
*/
//#ifdef __cplusplus
//extern "C" {
//#endif
#ifndef _MAIN
extern const int nW[36];
extern const int nX[36];
extern const int nY[36];
extern const int nZ[36];
extern const int dPmrW[36];
extern const int dPmrX[36];
extern const int dPmrY[36];
extern const int dPmrZ[36];
#else
const int nW[36] = { 0, 1, 0, 1, 0, 1,
//#else
/*
* dPMR AMBE interleave schedule
*/
// bit 1
const int dPmrW[36] = {
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 2,
@@ -35,7 +41,8 @@ const int nW[36] = { 0, 1, 0, 1, 0, 1,
0, 2, 0, 2, 0, 2
};
const int nX[36] = { 23, 10, 22, 9, 21, 8,
const int dPmrX[36] = {
23, 10, 22, 9, 21, 8,
20, 7, 19, 6, 18, 5,
17, 4, 16, 3, 15, 2,
14, 1, 13, 0, 12, 10,
@@ -43,7 +50,9 @@ const int nX[36] = { 23, 10, 22, 9, 21, 8,
8, 6, 7, 5, 6, 4
};
const int nY[36] = { 0, 2, 0, 2, 0, 2,
// bit 0
const int dPmrY[36] = {
0, 2, 0, 2, 0, 2,
0, 2, 0, 3, 0, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
@@ -51,7 +60,8 @@ const int nY[36] = { 0, 2, 0, 2, 0, 2,
1, 3, 1, 3, 1, 3
};
const int nZ[36] = { 5, 3, 4, 2, 3, 1,
const int dPmrZ[36] = {
5, 3, 4, 2, 3, 1,
2, 0, 1, 13, 0, 12,
22, 11, 21, 10, 20, 9,
19, 8, 18, 7, 17, 6,
@@ -60,3 +70,7 @@ const int nZ[36] = { 5, 3, 4, 2, 3, 1,
};
#endif
//#ifdef __cplusplus
//}
//#endif

1778
include/dsd.h Normal file

File diff suppressed because it is too large Load Diff

129
include/dstar_const.h Normal file
View File

@@ -0,0 +1,129 @@
/*
* 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.
*/
/*
* dstar interleave experiments
*/
#ifndef _MAIN
extern const int dW[72];
extern const int dX[72];
#else
const int dW[72] = {
// 0-11
0, 0,
3, 2,
1, 1,
0, 0,
1, 1,
0, 0,
// 12-23
3, 2,
1, 1,
3, 2,
1, 1,
0, 0,
3, 2,
// 24-35
0, 0,
3, 2,
1, 1,
0, 0,
1, 1,
0, 0,
// 36-47
3, 2,
1, 1,
3, 2,
1, 1,
0, 0,
3, 2,
// 48-59
0, 0,
3, 2,
1, 1,
0, 0,
1, 1,
0, 0,
// 60-71
3, 2,
1, 1,
3, 3,
2, 1,
0, 0,
3, 3,
};
const int dX[72] = {
// 0-11
10, 22,
11, 9,
10, 22,
11, 23,
8, 20,
9, 21,
// 12-23
10, 8,
9, 21,
8, 6,
7, 19,
8, 20,
9, 7,
// 24-35
6, 18,
7, 5,
6, 18,
7, 19,
4, 16,
5, 17,
// 36-47
6, 4,
5, 17,
4, 2,
3, 15,
4, 16,
5, 3,
// 48-59
2, 14,
3, 1,
2, 14,
3, 15,
0, 12,
1, 13,
// 60-71
2, 0,
1, 13,
0, 12,
10, 11,
0, 12,
1, 13,
};
#endif

6
include/dstar_header.h Normal file
View File

@@ -0,0 +1,6 @@
/* This is the header file for dstar_header.c, which is under the GPL. */
#ifndef _DSTAR_HEADER_H
#define _DSTAR_HEADER_H
//void dstar_header_decode(int radioheaderbuffer[660]);
#endif /* _DSTAR_HEADER_H */

89
include/fcs.h Normal file
View File

@@ -0,0 +1,89 @@
/* fcs.h */
// Viterbi decoder using Traceback method.
// Original Source was written by Sho Tamaoki and Tom Wada
// See http://www.lsi.ie.u-ryukyu.ac.jp/~sho/midterm/
// Modified by Satoshi Yasuda 7m3tjz/ad6gz
// Modified by Jonathan Nayor, G4KLX (C) 2009
// Converted from C++ to C by Kristoff Bonne, ON1ARF
/*
* Copyright (C) 2010 by Kristoff Bonne, ON1ARF
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <stdint.h>
static const unsigned short ccittTab[] = {
0x0000,0x1189,0x2312,0x329b,0x4624,0x57ad,0x6536,0x74bf,
0x8c48,0x9dc1,0xaf5a,0xbed3,0xca6c,0xdbe5,0xe97e,0xf8f7,
0x1081,0x0108,0x3393,0x221a,0x56a5,0x472c,0x75b7,0x643e,
0x9cc9,0x8d40,0xbfdb,0xae52,0xdaed,0xcb64,0xf9ff,0xe876,
0x2102,0x308b,0x0210,0x1399,0x6726,0x76af,0x4434,0x55bd,
0xad4a,0xbcc3,0x8e58,0x9fd1,0xeb6e,0xfae7,0xc87c,0xd9f5,
0x3183,0x200a,0x1291,0x0318,0x77a7,0x662e,0x54b5,0x453c,
0xbdcb,0xac42,0x9ed9,0x8f50,0xfbef,0xea66,0xd8fd,0xc974,
0x4204,0x538d,0x6116,0x709f,0x0420,0x15a9,0x2732,0x36bb,
0xce4c,0xdfc5,0xed5e,0xfcd7,0x8868,0x99e1,0xab7a,0xbaf3,
0x5285,0x430c,0x7197,0x601e,0x14a1,0x0528,0x37b3,0x263a,
0xdecd,0xcf44,0xfddf,0xec56,0x98e9,0x8960,0xbbfb,0xaa72,
0x6306,0x728f,0x4014,0x519d,0x2522,0x34ab,0x0630,0x17b9,
0xef4e,0xfec7,0xcc5c,0xddd5,0xa96a,0xb8e3,0x8a78,0x9bf1,
0x7387,0x620e,0x5095,0x411c,0x35a3,0x242a,0x16b1,0x0738,
0xffcf,0xee46,0xdcdd,0xcd54,0xb9eb,0xa862,0x9af9,0x8b70,
0x8408,0x9581,0xa71a,0xb693,0xc22c,0xd3a5,0xe13e,0xf0b7,
0x0840,0x19c9,0x2b52,0x3adb,0x4e64,0x5fed,0x6d76,0x7cff,
0x9489,0x8500,0xb79b,0xa612,0xd2ad,0xc324,0xf1bf,0xe036,
0x18c1,0x0948,0x3bd3,0x2a5a,0x5ee5,0x4f6c,0x7df7,0x6c7e,
0xa50a,0xb483,0x8618,0x9791,0xe32e,0xf2a7,0xc03c,0xd1b5,
0x2942,0x38cb,0x0a50,0x1bd9,0x6f66,0x7eef,0x4c74,0x5dfd,
0xb58b,0xa402,0x9699,0x8710,0xf3af,0xe226,0xd0bd,0xc134,
0x39c3,0x284a,0x1ad1,0x0b58,0x7fe7,0x6e6e,0x5cf5,0x4d7c,
0xc60c,0xd785,0xe51e,0xf497,0x8028,0x91a1,0xa33a,0xb2b3,
0x4a44,0x5bcd,0x6956,0x78df,0x0c60,0x1de9,0x2f72,0x3efb,
0xd68d,0xc704,0xf59f,0xe416,0x90a9,0x8120,0xb3bb,0xa232,
0x5ac5,0x4b4c,0x79d7,0x685e,0x1ce1,0x0d68,0x3ff3,0x2e7a,
0xe70e,0xf687,0xc41c,0xd595,0xa12a,0xb0a3,0x8238,0x93b1,
0x6b46,0x7acf,0x4854,0x59dd,0x2d62,0x3ceb,0x0e70,0x1ff9,
0xf78f,0xe606,0xd49d,0xc514,0xb1ab,0xa022,0x92b9,0x8330,
0x7bc7,0x6a4e,0x58d5,0x495c,0x3de3,0x2c6a,0x1ef1,0x0f78};
uint16_t calc_fcs (unsigned char * dvstartframe, int size) {
// this function calculated the CRC-values of a DSTAR digital
// voice frame. It calculates this value on octets 0 up to 38 of the D-STAR
// radio header (fields flag1, flag2, flag3, destination, departure, companion,
// own1 and own2)
uint16_t m_crc;
int loop;
unsigned short tmp;
m_crc=0xFFFF;
for (loop=0; loop < size; loop++) {
tmp = (m_crc & 0x00ff) ^ dvstartframe[loop];
m_crc = (m_crc >> 8) ^ ccittTab[tmp];
} // end for
// calculate and save crc-value in fields 54 and 55 of dvframe
m_crc = ~m_crc;
tmp = m_crc;
m_crc = (m_crc << 8) | (tmp >> 8 & 0xFF);
// done
return(m_crc);
}; // end function

1
include/git_ver.h Normal file
View File

@@ -0,0 +1 @@
extern const char GIT_TAG[];

82
include/nxdn_const.h Normal file
View File

@@ -0,0 +1,82 @@
// Portions Below from Osmocom OP25
// NXDN Encoder (C) Copyright 2019 Max H. Parke KA1RBI
// thx gr-ysf fr_vch_decoder_bb_impl.cc * Copyright 2015 Mathias Weyland *
// OP25 is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// OP25 is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with OP25; see the file COPYING. If not, write to the Free
// Software Foundation, Inc., 51 Franklin Street, Boston, MA
// 02110-1301, USA.
static const uint16_t PERM_12_5[] = {
0,12,24,36,48,
1,13,25,37,49,
2,14,26,38,50,
3,15,27,39,51,
4,16,28,40,52,
5,17,29,41,53,
6,18,30,42,54,
7,19,31,43,55,
8,20,32,44,56,
9,21,33,45,57,
10,22,34,46,58,
11,23,35,47,59
};
static const uint16_t PERM_16_9[] = {
0, 16, 32, 48, 64, 80, 96, 112, 128,
1, 17, 33, 49, 65, 81, 97, 113, 129,
2, 18, 34, 50, 66, 82, 98, 114, 130,
3, 19, 35, 51, 67, 83, 99, 115, 131,
4, 20, 36, 52, 68, 84, 100, 116, 132,
5, 21, 37, 53, 69, 85, 101, 117, 133,
6, 22, 38, 54, 70, 86, 102, 118, 134,
7, 23, 39, 55, 71, 87, 103, 119, 135,
8, 24, 40, 56, 72, 88, 104, 120, 136,
9, 25, 41, 57, 73, 89, 105, 121, 137,
10, 26, 42, 58, 74, 90, 106, 122, 138,
11, 27, 43, 59, 75, 91, 107, 123, 139,
12, 28, 44, 60, 76, 92, 108, 124, 140,
13, 29, 45, 61, 77, 93, 109, 125, 141,
14, 30, 46, 62, 78, 94, 110, 126, 142,
15, 31, 47, 63, 79, 95, 111, 127, 143
};
static const uint16_t PERM_12_25[] = {
0,12,24,36,48,60,72,84,96,108,120,132,144,156,168,180,192,204,216,228,240,252,264,276,288,
1,13,25,37,49,61,73,85,97,109,121,133,145,157,169,181,193,205,217,229,241,253,265,277,289,
2,14,26,38,50,62,74,86,98,110,122,134,146,158,170,182,194,206,218,230,242,254,266,278,290,
3,15,27,39,51,63,75,87,99,111,123,135,147,159,171,183,195,207,219,231,243,255,267,279,291,
4,16,28,40,52,64,76,88,100,112,124,136,148,160,172,184,196,208,220,232,244,256,268,280,292,
5,17,29,41,53,65,77,89,101,113,125,137,149,161,173,185,197,209,221,233,245,257,269,281,293,
6,18,30,42,54,66,78,90,102,114,126,138,150,162,174,186,198,210,222,234,246,258,270,282,294,
7,19,31,43,55,67,79,91,103,115,127,139,151,163,175,187,199,211,223,235,247,259,271,283,295,
8,20,32,44,56,68,80,92,104,116,128,140,152,164,176,188,200,212,224,236,248,260,272,284,296,
9,21,33,45,57,69,81,93,105,117,129,141,153,165,177,189,201,213,225,237,249,261,273,285,297,
10,22,34,46,58,70,82,94,106,118,130,142,154,166,178,190,202,214,226,238,250,262,274,286,298,
11,23,35,47,59,71,83,95,107,119,131,143,155,167,179,191,203,215,227,239,251,263,275,287,299
};
static const uint16_t PERM_12_29[] = {
0,12,24,36,48,60,72,84,96,108,120,132,144,156,168,180,192,204,216,228,240,252,264,276,288,300,312,324,336,
1,13,25,37,49,61,73,85,97,109,121,133,145,157,169,181,193,205,217,229,241,253,265,277,289,301,313,325,337,
2,14,26,38,50,62,74,86,98,110,122,134,146,158,170,182,194,206,218,230,242,254,266,278,290,302,314,326,338,
3,15,27,39,51,63,75,87,99,111,123,135,147,159,171,183,195,207,219,231,243,255,267,279,291,303,315,327,339,
4,16,28,40,52,64,76,88,100,112,124,136,148,160,172,184,196,208,220,232,244,256,268,280,292,304,316,328,340,
5,17,29,41,53,65,77,89,101,113,125,137,149,161,173,185,197,209,221,233,245,257,269,281,293,305,317,329,341,
6,18,30,42,54,66,78,90,102,114,126,138,150,162,174,186,198,210,222,234,246,258,270,282,294,306,318,330,342,
7,19,31,43,55,67,79,91,103,115,127,139,151,163,175,187,199,211,223,235,247,259,271,283,295,307,319,331,343,
8,20,32,44,56,68,80,92,104,116,128,140,152,164,176,188,200,212,224,236,248,260,272,284,296,308,320,332,344,
9,21,33,45,57,69,81,93,105,117,129,141,153,165,177,189,201,213,225,237,249,261,273,285,297,309,321,333,345,
10,22,34,46,58,70,82,94,106,118,130,142,154,166,178,190,202,214,226,238,250,262,274,286,298,310,322,334,346,
11,23,35,47,59,71,83,95,107,119,131,143,155,167,179,191,203,215,227,239,251,263,275,287,299,311,323,335,347
};

60
include/p25p1_check_hdu.h Normal file
View File

@@ -0,0 +1,60 @@
#ifndef P25P1_CHECK_HDU_H_f5f079faf2d64cf5831e1da1ab83b9ba
#define P25P1_CHECK_HDU_H_f5f079faf2d64cf5831e1da1ab83b9ba
#ifdef __cplusplus
extern "C" {
#endif
/**
* Attempts to correct an hex (6-bit) word using the Golay(24,12,8) FEC.
* \param hex The 6-bit word to error correct, given as a char array of 6 elements, one bit each.
* \param parity A 12-bit word with the Golay parity data, given as a char array of 12 elements.
* \param fixed_error Output. Filled with the number of errors fixed in the input.
* \return 1 if there were uncorrectable errors in the input, 0 otherwise.
*/
int check_and_fix_golay_24_6(char* hex, char* parity, int* fixed_errors);
/**
* Attempts to correct a 12-bit word using the Golay(24,12,8) FEC.
* \param dodeca The 12-bit word to error correct, given as a char array of 12 elements, one bit each.
* \param parity A 12-bit word with the Golay parity data, given as a char array of 12 elements.
* \param fixed_error Output. Filled with the number of errors fixed in the input.
* \return 1 if there were uncorrectable errors in the input, 0 otherwise.
*/
int check_and_fix_golay_24_12(char* dodeca, char* parity, int* fixed_errors);
/**
* Encodes an hex word using the Golay(24,12,8) FEC.
* \param hex A 6-bit word to encode.
* \param out_parity The address to be filled with the calculated Golay parity.
*/
void encode_golay_24_6(char* hex, char* out_parity);
/**
* Encodes an 12-bitword using the Golay(24,12,8) FEC.
* \param dodeca A 12-bit word to encode.
* \param out_parity The address to be filled with the calculated Golay parity.
*/
void encode_golay_24_12(char* dodeca, char* out_parity);
/**
* Attempts to correct 20 hex words using the Reed-Solomon(36,20,17) FEC.
* \param data The packed hex words, each of 6 chars, one after the other.
* \param parity The corresponding 16 hex words with the parity information.
* \return 1 if irrecoverable errors have been detected, 0 otherwise.
*/
int check_and_fix_redsolomon_36_20_17(char* data, char* parity);
/**
* Calculates the Reed-Solomon parity of 20 words of 6 bits each.
* \param hex_data The address with the words whose parity we want to calculate.
* \param fixed_parity The address to be filled with the calculated parity. 16 words of 6 bits are produced.
*/
void encode_reedsolomon_36_20_17(char* hex_data, char* fixed_parity);
#ifdef __cplusplus
}
#endif
#endif // P25P1_CHECK_HDU_H_f5f079faf2d64cf5831e1da1ab83b9ba

58
include/p25p1_check_ldu.h Normal file
View File

@@ -0,0 +1,58 @@
#ifndef P25P1_CHECK_LDU_H_c1734445a67e47caa25673d7a4ce7520
#define P25P1_CHECK_LDU_H_c1734445a67e47caa25673d7a4ce7520
#ifdef __cplusplus
extern "C" {
#endif
/**
* Attempts to error correct a hex (6-bit) word using the Hamming(10,6,3) FEC.
* \param hex The 6-bit word to error correct.
* \param parity The parity to use in the error correction. 4 bits.
* \return The estimated error count. It might be erroneous.
*/
int check_and_fix_hamming_10_6_3(char* hex, char* parity);
/**
* Encodes an hex word with the Hamming(10,6,3) FEC.
* \param hex The 6-bit word to error correct.
* \param out_parity The address where to store the calculated parity. 4 bytes are used, one for each bit.
*/
void encode_hamming_10_6_3(char* hex, char* out_parity);
/**
* Attempts to correct 12 hex words using the Reed-Solomon(24,12,13) FEC.
* \param data The packed hex words, each of 6 chars, one after the other.
* \param parity The corresponding 12 hex words with the parity information.
* \return 1 if irrecoverable errors have been detected, 0 otherwise.
*/
int check_and_fix_reedsolomon_24_12_13(char* data, char* parity);
/**
* Encodes 12 hex words with the Reed-Solomon(24,12,13) FEC.
* \param hex_data The packed 12 hex words to encode.
* \fixed_parity The address were to store the 12 hex words with the Reed-Solomon parity.
*/
void encode_reedsolomon_24_12_13(char* hex_data, char* fixed_parity);
/**
* Attempts to correct 16 hex words using the Reed-Solomon(24,16,9) FEC.
* \param data The packed 16 hex words, each of 6 chars, one after the other.
* \param parity The corresponding 8 hex words with the parity information.
* \return 1 if irrecoverable errors have been detected, 0 otherwise.
*/
int check_and_fix_reedsolomon_24_16_9(char* data, char* parity);
/**
* Encodes 12 hex words with the Reed-Solomon(24,16,9) FEC.
* \param hex_data The packed 16 hex words to encode.
* \fixed_parity The address were to store the 8 hex words with the Reed-Solomon parity.
*/
void encode_reedsolomon_24_16_9(char* hex_data, char* fixed_parity);
#ifdef __cplusplus
}
#endif
#endif // P25P1_CHECK_LDU_H_c1734445a67e47caa25673d7a4ce7520

73
include/p25p1_hdu.h Normal file
View File

@@ -0,0 +1,73 @@
#ifndef P25P1_HDU_H_9f95c3a5072842e8aaf94444e1452d20
#define P25P1_HDU_H_9f95c3a5072842e8aaf94444e1452d20
#include "p25p1_heuristics.h"
/**
* Reads a dibit (two bits) from the stream of data. Takes into account the periodic occurrence of status
* bits that show up every 36 dibits. Status bits are discarded.
* \param opts A pointer the the DSD options.
* \param state A pointer the the DSD state structure.
* \param output A pointer to be filled with the dibit read. Two bytes used for each dibit.
* \param status_count Variable used to keep track of the status symbols in the dibit stream. There is one
* status every 36 dibits. With this counter we can skip the status.
* \param analog_signal A pointer with the actual analog value read from the input signal and that has been
* interpreted as the dibit we are returning in output.
* \param did_read_status Address were a boolean is returned. This is set to true when one status symbol was
* read (and skipped). This indicates that the sequence on dibits has been broken and is used by the P25
* heuristics.
*/
int read_dibit (dsd_opts* opts, dsd_state* state, char* output, int* status_count, int* analog_signal,
int* did_read_status);
/**
* Reads a number of dibits and stores its value together with the actual analog value that has been
* intrepreted as the dibit into an AnalogSignal structure. This is used later in the P25 heuristics module
* to improve the accuracy of the digitizer.
* \param opts A pointer the the DSD options.
* \param state A pointer the the DSD state structure.
* \param output A pointer to be filled with the dibits read.
* \param count The number of bits to read (remember: 1 dibit = 2 bits).
* \param status_count Variable used to keep track of the status symbols in the dibit stream. There is one
* status every 36 dibits. With this counter we can skip the status.
* \param analog_signal_array The pointer to the start of a sequence of AnalogSignal structures. The
* information is updated for each dibit read.
* \param analog_signal_index The actual index into the AnalogSignal array. This is increased here wich each
* dibit read.
*/
void read_dibit_update_analog_data (dsd_opts* opts, dsd_state* state, char* buffer, unsigned int count,
int* status_count, AnalogSignal* analog_signal_array, int* analog_signal_index);
/**
* Reads a word, made up of length bits or length/2 dibits. Also keeps track of the status dibits.
*/
void read_word (dsd_opts* opts, dsd_state* state, char* word, unsigned int length, int* status_count,
AnalogSignal* analog_signal_array, int* analog_signal_index);
/**
* Reads 4 bits from the stream of data. Those are the parity bits that follow each hex word.
*/
void read_hamm_parity (dsd_opts* opts, dsd_state* state, char* parity, int* status_count,
AnalogSignal* analog_signal_array, int* analog_signal_index);
/**
* Reads 12 bits from the stream of data. Those are the extended Golay parity bits that follow a word of data.
*/
void read_golay24_parity (dsd_opts* opts, dsd_state* state, char* parity, int* status_count, AnalogSignal* analog_signal_array, int* analog_signal_index);
/**
* Reads bits from the data stream that should all be zeros. This is valuable information for the
* heuristics module and we update it.
* \param opts A pointer the the DSD options.
* \param state A pointer the the DSD state structure.
* \param analog_signal_array The pointer to the start of a sequence of AnalogSignal structures.
* \param length Number of bits to read.
* \param status_count Variable used to keep track of the status symbols in the dibit stream.
* \param new_sequence Bool used to update the sequence_broken value of the first AnalogSignal element.
*/
void read_zeros(dsd_opts* opts, dsd_state* state, AnalogSignal* analog_signal_array, unsigned int length,
int* status_count, int new_sequence);
#endif // P25P1_HDU_H_9f95c3a5072842e8aaf94444e1452d20

View File

@@ -0,0 +1,91 @@
#ifndef P25P1_HEURISTICS_H_030dd3530b7546abbb56f8dd1e66a2f6
#define P25P1_HEURISTICS_H_030dd3530b7546abbb56f8dd1e66a2f6
#define HEURISTICS_SIZE 200
typedef struct
{
int values[HEURISTICS_SIZE];
float means[HEURISTICS_SIZE];
int index;
int count;
float sum;
float var_sum;
} SymbolHeuristics;
typedef struct
{
unsigned int bit_count;
unsigned int bit_error_count;
SymbolHeuristics symbols[4][4];
} P25Heuristics;
typedef struct
{
int value;
int dibit;
int corrected_dibit;
int sequence_broken;
} AnalogSignal;
#ifdef __cplusplus
extern "C"{
#endif
/**
* Initializes the heuristics state.
* \param heuristics The P25Heuristics structure to initialize.
*/
void initialize_p25_heuristics(P25Heuristics* heuristics);
/**
* Important method that estimates the most likely symbol for a given analog signal value and previous dibit.
* This is called by the digitizer.
* \param rf_mod Indicates the modulation used. The previous dibit is only used on C4FM.
* \param heuristics Pointer to the P25Heuristics module with all the needed state information.
* \param previous_dibit The previous dibit.
* \param analog_value The signal's analog value we want to interpret as a dibit.
* \param dibit Address were to store the estimated dibit.
* \return A boolean set to true if we are able to estimate a dibit. The reason why we might not be able
* to estimate it is because we don't have enough information to model the Gaussians (not enough data
* has been passed to contribute_to_heuristics).
*/
int estimate_symbol(int rf_mod, P25Heuristics* heuristics, int previous_dibit, int analog_value, int* dibit);
/**
* Log some useful information on the heuristics state.
*/
void debug_print_heuristics(P25Heuristics* heuristics);
/**
* This method contributes valuable information from dibits whose value we are confident is correct. We take
* the dibits and corresponding analog signal values to model the Gaussians for each dibit (and previous
* dibit if enabled).
* \param rf_mod Indicates the modulation used. The previous dibit is only used on C4FM.
* \param heuristics Pointer to the P25Heuristics module with all the needed state information.
* \param analog_signal_array Sequence of AnalogSignal which contain the cleared dibits and analog values.
* \param count number of cleared dibits passed (= number of elements to use from analog_signal_array).
*/
void contribute_to_heuristics(int rf_mod, P25Heuristics* heuristics, AnalogSignal* analog_signal_array, int count);
/**
* Updates the estimate for the BER (bit error rate). Mind this is method is not called for every single
* bit in the data stream but only for those bits over which we have an estimate of its error rate,
* specifically the bits that are protected by Reed-Solomon codes.
* \param heuristics The heuristics state.
* \param bits The number of bits we have read.
* \param errors The number of errors we estimate in those bits.
*/
void update_error_stats(P25Heuristics* heuristics, int bits, int errors);
/**
* Returns the estimate for the BER (bit error rate).
* \return The estimated BER. This is just the percentage of errors over the processed bits.
*/
float get_P25_BER_estimate(P25Heuristics* heuristics);
#ifdef __cplusplus
}
#endif
#endif // P25P1_HEURISTICS_H_030dd3530b7546abbb56f8dd1e66a2f6

49
include/p25p1_ldu.h Normal file
View File

@@ -0,0 +1,49 @@
#ifndef P25P1_LDU_H_a3c417fcb7804991b0e6d828066bd133
#define P25P1_LDU_H_a3c417fcb7804991b0e6d828066bd133
#include "dsd.h"
#include "p25p1_hdu.h"
#include "p25p1_const.h"
#include "p25p1_heuristics.h"
/**
* Separate imbe frames and deinterleave.
* This important methods read the IMBE data from the stream and passes it to the vocoder to produce audio.
* \param opts The DSD options.
* \param state The DSD state.
* \status_count An index that allows us to skip the status words interleaved every 36 dibit in the data
* stream.
*/
void process_IMBE (dsd_opts* opts, dsd_state* state, int* status_count);
/**
* Reads an hex word, its parity bits and attempts to error correct it using the Hamming FEC.
* \param opts The DSD options.
* \param state The DSD state.
* \param hex Pointer where to store the read hex word. Six bytes, one per bit.
* \param status_count An index that allows us to skip the status words interleaved every 36 dibit in the data
* stream.
* \param analog_singal_array Pointer to a sequence of AnalogSignal elements.
* \param analog_signal_index The current index in the analog_singal_array. This value is increased on each
* dibit read.
*/
void read_and_correct_hex_word (dsd_opts* opts, dsd_state* state, char* hex, int* status_count,
AnalogSignal* analog_signal_array, int* analog_signal_index);
/**
* Correct the information in analog_signal_array according with the content of data, which has been
* error corrected and should be valid.
* \param Dibits that have already been error corrected and we trust are correct.
* \count Number of dibits.
* \param analog_signal_array Pointer to a sequence of AnalogSignal elements, as many as the value of count.
*/
void correct_hamming_dibits(char* hex_data, int hex_count, AnalogSignal* analog_signal_array);
/**
* Logs some debug info.
*/
void debug_ldu_header(dsd_state* state);
#endif // P25P1_LDU_H_a3c417fcb7804991b0e6d828066bd133

6
include/pa_devs.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef PA_DEVS_H
#define PA_DEVS_H
void printPortAudioDevices();
#endif

95
include/pc4.h Normal file
View File

@@ -0,0 +1,95 @@
#include <stdint.h>
#include <stddef.h>
#ifndef TYT_AP
#define TYT_AP
#define nbround 254
#define n1 264
#define UNUSEDPC4(x) ((void)x)
/* Structure holding all PC4 state variables */
typedef struct {
short bits[49], temp[49];
uint8_t ptconvert;
uint8_t convert[7];
uint8_t perm[16][256];
uint8_t new1[256];
uint8_t array[49];
uint8_t array2[49];
uint8_t decal[nbround];
uint8_t rngxor[nbround][3];
uint8_t rngxor2[nbround][3];
uint8_t rounds;
uint8_t tab[256];
uint8_t inv[256];
uint8_t permut[3][3];
uint64_t bb;
uint64_t x;
uint8_t tot[3];
uint8_t l[2][3], r[2][3];
uint8_t y, totb;
uint32_t result;
uint8_t xyz, count;
uint8_t keys[16];
unsigned char array_arc4[256];
int i_arc4, j_arc4;
int x1, x2, i;
unsigned char h2[n1];
unsigned char h1[n1*3];
} PC4Context;
/* Global context accessible from all .c files */
extern PC4Context ctx;
/* Public API */
void create_keys(PC4Context *ctx, unsigned char key1[], size_t size1);
void pc4encrypt(PC4Context *ctx);
void pc4decrypt(PC4Context *ctx);
void binhex(PC4Context *ctx, short *z, int length);
void hexbin(PC4Context *ctx, short *q, uint8_t w, uint8_t hex);
static void u64_to_bytes_be(uint64_t val, unsigned char *out);
/* Encrypt a 49-bit frame (original flow) */
static void encrypt_frame_49(short frame_bits_in[49]) {
for (int i = 0; i < 49; i++) ctx.bits[i] = frame_bits_in[i];
for (int i = 0; i < 49; i++) ctx.temp[i] = ctx.bits[ctx.array[i]];
for (int i = 0; i < 49; i++) ctx.bits[i] = ctx.temp[i];
ctx.ptconvert = 0;
binhex(&ctx, ctx.bits, 48);
pc4encrypt(&ctx);
for (int q = 0; q < 6; q++) {
uint8_t w = (uint8_t)(q * 8);
hexbin(&ctx, ctx.bits, w, ctx.convert[q]);
}
ctx.bits[48] = (short)(ctx.bits[48] ^ ctx.totb);
for (int i = 0; i < 49; i++) ctx.temp[ctx.array2[i]] = ctx.bits[i];
for (int i = 0; i < 49; i++) ctx.bits[i] = ctx.temp[i];
}
/* Decrypt a 49-bit frame (original flow) */
static void decrypt_frame_49(short frame_bits_in[49]) {
for (int i = 0; i < 49; i++) ctx.bits[i] = frame_bits_in[i];
for (int i = 0; i < 49; i++) ctx.temp[i] = ctx.bits[ctx.array2[i]];
for (int i = 0; i < 49; i++) ctx.bits[i] = ctx.temp[i];
ctx.ptconvert = 0;
binhex(&ctx, ctx.bits, 48);
pc4decrypt(&ctx);
for (int q = 0; q < 6; q++) {
uint8_t w = (uint8_t)(q * 8);
hexbin(&ctx, ctx.bits, w, ctx.convert[q]);
}
ctx.bits[48] = (short)(ctx.bits[48] ^ ctx.totb);
for (int i = 0; i < 49; i++) ctx.temp[ctx.array[i]] = ctx.bits[i];
for (int i = 0; i < 49; i++) ctx.bits[i] = ctx.temp[i];
}
/* Convert 64-bit integer to bytes (big-endian) */
static void u64_to_bytes_be(uint64_t val, unsigned char *out) {
for (int i = 0; i < 8; i++) {
out[i] = (unsigned char)((val >> (56 - 8 * i)) & 0xFF);
}
}
#endif

147
include/pc5.h Normal file
View File

@@ -0,0 +1,147 @@
#include <stdint.h>
#include <stddef.h>
#ifndef BAOFENG_AP
#define BAOFENG_AP
#define nbround 254
#define n1 264
#define UNUSEDPC5(x) ((void)x)
/* Structure holding all PC5 state variables */
typedef struct {
short bits[49], temp[49];
uint8_t ptconvert;
uint8_t convert[7];
uint8_t perm[16][256];
uint8_t new1[256];
uint8_t array[49];
uint8_t array2[49];
uint8_t decal[nbround];
uint8_t rngxor[nbround][3];
uint8_t rngxor2[nbround][3];
uint8_t rounds;
uint8_t tab[256];
uint8_t inv[256];
uint8_t permut[3][3];
uint64_t bb;
uint64_t x;
uint8_t tot[3];
uint8_t l[2][3], r[2][3];
uint8_t y, totb;
uint32_t result;
uint8_t xyz, count;
uint8_t keys[16];
unsigned char array_arc4[256];
int i_arc4, j_arc4;
int x1, x2, i;
unsigned char h2[n1];
unsigned char h1[n1*3];
uint8_t numbers[25];
} PC5Context;
/* Global context accessible from all .c files */
extern PC5Context ctxpc5;
/* Public API */
void create_keys_pc5(PC5Context *ctxpc5, unsigned char key1[], size_t size1);
void pc5encrypt(PC5Context *ctxpc5);
void pc5decrypt(PC5Context *ctxpc5);
void binhexpc5(PC5Context *ctxpc5, short *z, int length);
void hexbinpc5(PC5Context *ctxpc5, short *q, uint8_t w, uint8_t hex);
static void u64_to_bytes_be_pc5(uint64_t val, unsigned char *out);
/* Encrypt a 49-bit frame using PC5 algorithm (original flow) */
static void encrypt_frame_49_pc5(short frame_bits_in[49]) {
// Only process first 24 bits for encryption, rest are XORed
ctxpc5.ptconvert = 0;
binhexpc5(&ctxpc5, frame_bits_in, 24);
uint8_t convert[6];
// Store first 3 bytes in convert
for (int i = 0; i < 3; i++) convert[i] = ctxpc5.convert[i];
// Split each byte into two 4-bit nibbles
ctxpc5.convert[0] = convert[0] >> 4;
ctxpc5.convert[1] = convert[0] & 0xF;
ctxpc5.convert[2] = convert[1] >> 4;
ctxpc5.convert[3] = convert[1] & 0xF;
ctxpc5.convert[4] = convert[2] >> 4;
ctxpc5.convert[5] = convert[2] & 0xF;
pc5encrypt(&ctxpc5);
// Store encrypted nibbles back in convert
for (int i = 0; i < 6; i++) convert[i] = ctxpc5.convert[i];
// Recombine nibbles into bytes
ctxpc5.convert[0] = (convert[0] << 4) + convert[1];
ctxpc5.convert[1] = (convert[2] << 4) + convert[3];
ctxpc5.convert[2] = (convert[4] << 4) + convert[5];
// Convert back to bits for first 24 bits
for (int q = 0; q < 3; q++) {
uint8_t w = (uint8_t)(q * 8);
hexbinpc5(&ctxpc5, frame_bits_in, w, ctxpc5.convert[q]);
}
// XOR the remaining bits (positions 24 to 48)
for (int i = 24; i < 49; i++) {
frame_bits_in[i] = (short)(frame_bits_in[i] ^ ctxpc5.numbers[i - 24]);
}
for (int i = 0; i < 49; i++) ctxpc5.bits[i] = frame_bits_in[i];
}
/* Decrypt a 49-bit frame using PC5 algorithm (original flow) */
static void decrypt_frame_49_pc5(short frame_bits_in[49]) {
// XOR the remaining bits (positions 24 to 48) first
for (int i = 24; i < 49; i++) {
frame_bits_in[i] = (short)(frame_bits_in[i] ^ ctxpc5.numbers[i - 24]);
}
ctxpc5.ptconvert = 0;
binhexpc5(&ctxpc5, frame_bits_in, 24);
uint8_t convert[6];
// Store first 3 bytes in convert
for (int i = 0; i < 3; i++) convert[i] = ctxpc5.convert[i];
// Split each byte into two 4-bit nibbles
ctxpc5.convert[0] = convert[0] >> 4;
ctxpc5.convert[1] = convert[0] & 0xF;
ctxpc5.convert[2] = convert[1] >> 4;
ctxpc5.convert[3] = convert[1] & 0xF;
ctxpc5.convert[4] = convert[2] >> 4;
ctxpc5.convert[5] = convert[2] & 0xF;
pc5decrypt(&ctxpc5);
// Store decrypted nibbles back in convert
for (int i = 0; i < 6; i++) convert[i] = ctxpc5.convert[i];
// Recombine nibbles into bytes
ctxpc5.convert[0] = (convert[0] << 4) + convert[1];
ctxpc5.convert[1] = (convert[2] << 4) + convert[3];
ctxpc5.convert[2] = (convert[4] << 4) + convert[5];
// Convert back to bits for first 24 bits
for (int q = 0; q < 3; q++) {
uint8_t w = (uint8_t)(q * 8);
hexbinpc5(&ctxpc5, frame_bits_in, w, ctxpc5.convert[q]);
}
for (int i = 0; i < 49; i++) ctxpc5.bits[i] = frame_bits_in[i];
}
/* Convert 64-bit integer to bytes (big-endian) */
static void u64_to_bytes_be_pc5(uint64_t val, unsigned char *out) {
for (int i = 0; i < 8; i++) {
out[i] = (unsigned char)((val >> (56 - 8 * i)) & 0xFF);
}
}
#endif

43
include/rc2.h Normal file
View File

@@ -0,0 +1,43 @@
#ifndef RETEVIS_AP
#define RETEVIS_AP
#include <stdint.h>
#include "dsd.h"
#define n1 264
typedef struct {
uint8_t array_rc4[256];
int i_rc4, j_rc4;
uint64_t x;
uint8_t xyz, count;
uint64_t bb;
} RC4State;
typedef struct {
int x1, x2;
unsigned char h2[n1];
unsigned char h1[n1 * 3];
} MD2State;
typedef struct {
uint16_t xkey[64];
uint8_t plain[8];
uint8_t cipher[8];
} RC2State;
typedef struct {
RC4State rc4;
MD2State md2;
RC2State rc2;
uint64_t internal_state;
uint64_t internal_zero;
uint8_t keys[16];
} CryptoContext;
/* Public API */
void create_keys_rc2(CryptoContext* ctx, unsigned char key1[], size_t size1);
void encryption_rc2(CryptoContext* ctx, uint8_t s1[49]);
void decrypt_rc2(CryptoContext* ctx, uint8_t bits[49]);
#endif

48
include/synctype.h Normal file
View File

@@ -0,0 +1,48 @@
#ifndef SYNCTYPE_H
#define SYNCTYPE_H
static const char * SyncTypes[44] = {
"P25p1",
"P25p1",
"X2TDMA DATA",
"X2TDMA DATA",
"X2TDMA VOICE",
"X2TDMA VOICE",
"DSTAR", //voice
"DSTAR", //voice
"M17",
"M17",
"DMR", //10
"DMR",
"DMR",
"DMR",
"EDACS/PV",
"EDACS/PV",
"M17", //M17 Voice Stream
"M17", //M17 Voice Stream
"DSTAR", //header
"DSTAR", //header
"dPMR", //20
"dPMR",
"dPMR",
"dPMR",
"dPMR",
"dPMR",
"dPMR",
"dPMR",
"NXDN",
"NXDN",
"YSF", //30
"YSF", //31
"DMR",
"DMR",
"DMR",
"P25p2",
"P25p2",
"EDACS/PV", //37
"EDACS/PV", //38
"ANALOG", //39 Generic Sync Types
"DIGITAL" //40 Generic Sync Types
};
#endif

8
install.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
#
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
sudo ldconfig

124
nxdn96.c
View File

@@ -1,124 +0,0 @@
#include "dsd.h"
#include "nxdn96_const.h"
void
processNXDN96 (dsd_opts * opts, dsd_state * state)
{
int i, j, k, dibit;
char ambe_fr[4][24];
const int *w, *x, *y, *z;
if (opts->errorbars == 1)
{
printf ("VOICE e:");
}
#ifdef NXDN_DUMP
printf ("\n");
#endif
for (k = 0; k < 4; k++)
{
for (i = 0; i < 222; i++)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
#endif
}
#ifdef NXDN_DUMP
printf (" ");
#endif
if (k < 3)
{
for (j = 0; j < 4; j++)
{
w = nW;
x = nX;
y = nY;
z = nZ;
for (i = 0; i < 36; i++)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
#endif
ambe_fr[*w][*x] = (1 & (dibit >> 1)); // bit 1
ambe_fr[*y][*z] = (1 & dibit); // bit 0
w++;
x++;
y++;
z++;
}
processMbeFrame (opts, state, NULL, ambe_fr, NULL);
#ifdef NXDN_DUMP
printf (" ");
#endif
}
}
else
{
for (j = 0; j < 3; j++) // we skip the last voice frame until frame sync can work with < 24 symbols
{
w = nW;
x = nX;
y = nY;
z = nZ;
for (i = 0; i < 36; i++)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
#endif
ambe_fr[*w][*x] = (1 & (dibit >> 1)); // bit 1
ambe_fr[*y][*z] = (1 & dibit); // bit 0
w++;
x++;
y++;
z++;
}
processMbeFrame (opts, state, NULL, ambe_fr, NULL);
#ifdef NXDN_DUMP
printf (" ");
#endif
}
}
if (k < 3)
{
for (i = 0; i < 18; i++)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
#endif
}
#ifdef NXDN_DUMP
printf (" ");
#endif
}
else
{
for (i = 0; i < 30; i++)
{
dibit = getDibit (opts, state);
#ifdef NXDN_DUMP
printf ("%c", dibit + 48);
#endif
}
}
}
#ifdef NXDN_DUMP
printf ("\n");
#endif
if (opts->errorbars == 1)
{
printf ("\n");
}
}

162
p25_lcw.c
View File

@@ -1,162 +0,0 @@
#include "dsd.h"
void
processP25lcw (dsd_opts * opts, dsd_state * state, char *lcformat, char *mfid, char *lcinfo)
{
char tgid[17], tmpstr[255];
long talkgroup, source;
int i, j;
tgid[16] = 0;
if (opts->p25lc == 1)
{
printf ("lcformat: %s mfid: %s lcinfo: %s ", lcformat, mfid, lcinfo);
if (opts->p25tg == 0)
{
printf ("\n");
}
}
if (strcmp (lcformat, "00000100") == 0)
{
// first tg is the active channel
if (state->tgcount < 24)
{
// update tg buffer
j = 0;
for (i = 40; i < 52; i++)
{
state->tg[state->tgcount][j] = lcinfo[i];
j++;
}
tmpstr[12] = 48;
tmpstr[13] = 48;
tmpstr[14] = 48;
tmpstr[15] = 48;
tmpstr[16] = 0;
state->tgcount = state->tgcount + 1;
}
// first one again for tg display
j = 0;
for (i = 40; i < 52; i++)
{
tmpstr[j] = lcinfo[i];
j++;
}
tmpstr[12] = 48;
tmpstr[13] = 48;
tmpstr[14] = 48;
tmpstr[15] = 48;
tmpstr[16] = 0;
tmpstr[16] = 0;
talkgroup = strtol (tmpstr, NULL, 2);
state->lasttg = talkgroup;
if (opts->p25tg == 1)
{
printf ("tg: %li ", talkgroup);
// the remaining 3 appear to be other active tg's on the system
j = 0;
for (i = 28; i < 40; i++)
{
tmpstr[j] = lcinfo[i];
j++;
}
tmpstr[12] = 48;
tmpstr[13] = 48;
tmpstr[14] = 48;
tmpstr[15] = 48;
tmpstr[16] = 0;
talkgroup = strtol (tmpstr, NULL, 2);
printf ("%li ", talkgroup);
j = 0;
for (i = 16; i < 28; i++)
{
tmpstr[j] = lcinfo[i];
j++;
}
tmpstr[12] = 48;
tmpstr[13] = 48;
tmpstr[14] = 48;
tmpstr[15] = 48;
tmpstr[16] = 0;
talkgroup = strtol (tmpstr, NULL, 2);
printf ("%li ", talkgroup);
j = 0;
for (i = 4; i < 16; i++)
{
tmpstr[j] = lcinfo[i];
j++;
}
tmpstr[12] = 48;
tmpstr[13] = 48;
tmpstr[14] = 48;
tmpstr[15] = 48;
tmpstr[16] = 0;
talkgroup = strtol (tmpstr, NULL, 2);
printf ("%li\n", talkgroup);
}
}
else if (strcmp (lcformat, "00000000") == 0)
{
j = 0;
if (strcmp (mfid, "10010000") == 0)
{
for (i = 20; i < 32; i++)
{
if (state->tgcount < 24)
{
state->tg[state->tgcount][j] = lcinfo[i];
}
tmpstr[j] = lcinfo[i];
j++;
}
tmpstr[12] = 48;
tmpstr[13] = 48;
tmpstr[14] = 48;
tmpstr[15] = 48;
}
else
{
for (i = 16; i < 32; i++)
{
if (state->tgcount < 24)
{
state->tg[state->tgcount][j] = lcinfo[i];
}
tmpstr[j] = lcinfo[i];
j++;
}
}
tmpstr[16] = 0;
talkgroup = strtol (tmpstr, NULL, 2);
state->lasttg = talkgroup;
if (opts->p25tg == 1)
{
printf ("tg: %li ", talkgroup);
}
j = 0;
for (i = 32; i < 56; i++)
{
tmpstr[j] = lcinfo[i];
j++;
}
tmpstr[24] = 0;
source = strtol (tmpstr, NULL, 2);
state->lastsrc = source;
if (opts->p25tg == 1)
{
printf ("src: %li emr: %c\n", source, lcinfo[0]);
}
}
else if ((opts->p25tg == 1) && (opts->p25lc == 1))
{
printf ("\n");
}
}

View File

@@ -1,312 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
void
processHDU (dsd_opts * opts, dsd_state * state)
{
char mi[73], mfid[9], algid[9], kid[17], tgid[17], tmpstr[255];
int dibit, count, i, j;
long talkgroup;
int algidhex, kidhex;
mi[72] = 0;
mfid[8] = 0;
algid[8] = 0;
kid[16] = 0;
tgid[16] = 0;
skipDibit (opts, state, 25);
count = 57;
dibit = getDibit (opts, state);
mi[0] = (1 & (dibit >> 1)) + 48; // bit 1
mi[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[2] = (1 & (dibit >> 1)) + 48; // bit 1
mi[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[4] = (1 & (dibit >> 1)) + 48; // bit 1
mi[5] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mi[6] = (1 & (dibit >> 1)) + 48; // bit 1
mi[7] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[8] = (1 & (dibit >> 1)) + 48; // bit 1
mi[9] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[10] = (1 & (dibit >> 1)) + 48; // bit 1
mi[11] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 7);
dibit = getDibit (opts, state);
mi[12] = (1 & (dibit >> 1)) + 48; // bit 1
mi[13] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[14] = (1 & (dibit >> 1)) + 48; // bit 1
mi[15] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[16] = (1 & (dibit >> 1)) + 48; // bit 1
mi[17] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mi[18] = (1 & (dibit >> 1)) + 48; // bit 1
mi[19] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[20] = (1 & (dibit >> 1)) + 48; // bit 1
mi[21] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[22] = (1 & (dibit >> 1)) + 48; // bit 1
mi[23] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mi[24] = (1 & (dibit >> 1)) + 48; // bit 1
mi[25] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[26] = (1 & (dibit >> 1)) + 48; // bit 1
mi[27] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[28] = (1 & (dibit >> 1)) + 48; // bit 1
mi[29] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mi[30] = (1 & (dibit >> 1)) + 48; // bit 1
mi[31] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[32] = (1 & (dibit >> 1)) + 48; // bit 1
mi[33] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[34] = (1 & (dibit >> 1)) + 48; // bit 1
mi[35] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 7);
dibit = getDibit (opts, state);
mi[36] = (1 & (dibit >> 1)) + 48; // bit 1
mi[37] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[38] = (1 & (dibit >> 1)) + 48; // bit 1
mi[39] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[40] = (1 & (dibit >> 1)) + 48; // bit 1
mi[41] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mi[42] = (1 & (dibit >> 1)) + 48; // bit 1
mi[43] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[44] = (1 & (dibit >> 1)) + 48; // bit 1
mi[45] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[46] = (1 & (dibit >> 1)) + 48; // bit 1
mi[47] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mi[48] = (1 & (dibit >> 1)) + 48; // bit 1
mi[49] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[50] = (1 & (dibit >> 1)) + 48; // bit 1
mi[51] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[52] = (1 & (dibit >> 1)) + 48; // bit 1
mi[53] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mi[54] = (1 & (dibit >> 1)) + 48; // bit 1
mi[55] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[56] = (1 & (dibit >> 1)) + 48; // bit 1
mi[57] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[58] = (1 & (dibit >> 1)) + 48; // bit 1
mi[59] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 7);
dibit = getDibit (opts, state);
mi[60] = (1 & (dibit >> 1)) + 48; // bit 1
mi[61] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[62] = (1 & (dibit >> 1)) + 48; // bit 1
mi[63] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[64] = (1 & (dibit >> 1)) + 48; // bit 1
mi[65] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mi[66] = (1 & (dibit >> 1)) + 48; // bit 1
mi[67] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[68] = (1 & (dibit >> 1)) + 48; // bit 1
mi[69] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[70] = (1 & (dibit >> 1)) + 48; // bit 1
mi[71] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mfid[0] = (1 & (dibit >> 1)) + 48; // bit 1
mfid[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mfid[2] = (1 & (dibit >> 1)) + 48; // bit 1
mfid[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mfid[4] = (1 & (dibit >> 1)) + 48; // bit 1
mfid[5] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
mfid[6] = (1 & (dibit >> 1)) + 48; // bit 1
mfid[7] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
algid[0] = (1 & (dibit >> 1)) + 48; // bit 1
algid[1] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 1);
dibit = getDibit (opts, state);
algid[2] = (1 & (dibit >> 1)) + 48; // bit 1
algid[3] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
algid[4] = (1 & (dibit >> 1)) + 48; // bit 1
algid[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
algid[6] = (1 & (dibit >> 1)) + 48; // bit 1
algid[7] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[0] = (1 & (dibit >> 1)) + 48; // bit 1
kid[1] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
kid[2] = (1 & (dibit >> 1)) + 48; // bit 1
kid[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[4] = (1 & (dibit >> 1)) + 48; // bit 1
kid[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[6] = (1 & (dibit >> 1)) + 48; // bit 1
kid[7] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
kid[8] = (1 & (dibit >> 1)) + 48; // bit 1
kid[9] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[10] = (1 & (dibit >> 1)) + 48; // bit 1
kid[11] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[12] = (1 & (dibit >> 1)) + 48; // bit 1
kid[13] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
kid[14] = (1 & (dibit >> 1)) + 48; // bit 1
kid[15] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 1);
dibit = getDibit (opts, state);
tgid[0] = (1 & (dibit >> 1)) + 48; // bit 1
tgid[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
tgid[2] = (1 & (dibit >> 1)) + 48; // bit 1
tgid[3] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
tgid[4] = (1 & (dibit >> 1)) + 48; // bit 1
tgid[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
tgid[6] = (1 & (dibit >> 1)) + 48; // bit 1
tgid[7] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
tgid[8] = (1 & (dibit >> 1)) + 48; // bit 1
tgid[9] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 6);
dibit = getDibit (opts, state);
tgid[10] = (1 & (dibit >> 1)) + 48; // bit 1
tgid[11] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
tgid[12] = (1 & (dibit >> 1)) + 48; // bit 1
tgid[13] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
tgid[14] = (1 & (dibit >> 1)) + 48; // bit 1
tgid[15] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 160);
if (opts->p25enc == 1)
{
algidhex = strtol (algid, NULL, 2);
kidhex = strtol (kid, NULL, 2);
printf ("mi: %s algid: $%x kid: $%x\n", mi, algidhex, kidhex);
}
if (opts->p25lc == 1)
{
printf ("mfid: %s tgid: %s ", mfid, tgid);
if (opts->p25tg == 0)
{
printf ("\n");
}
}
j = 0;
if (strcmp (mfid, "10010000") == 0)
{
for (i = 4; i < 16; i++)
{
if (state->tgcount < 24)
{
state->tg[state->tgcount][j] = tgid[i];
}
tmpstr[j] = tgid[i];
j++;
}
tmpstr[12] = 48;
tmpstr[13] = 48;
tmpstr[14] = 48;
tmpstr[15] = 48;
}
else
{
for (i = 0; i < 16; i++)
{
if (state->tgcount < 24)
{
state->tg[state->tgcount][j] = tgid[i];
}
tmpstr[j] = tgid[i];
j++;
}
}
tmpstr[16] = 0;
talkgroup = strtol (tmpstr, NULL, 2);
state->lasttg = talkgroup;
if (opts->p25tg == 1)
{
printf ("tg: %li\n", talkgroup);
}
}

View File

@@ -1,295 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
#include "p25p1_const.h"
void
processLDU1 (dsd_opts * opts, dsd_state * state)
{
// extracts IMBE frames rom LDU frame
int i, j, k, dibit, stats, count, scount;
char imbe_fr[8][23];
char lcformat[9], mfid[9], lcinfo[57], lsd1[9], lsd2[9], status[25];
const int *w, *x, *y, *z;
lcformat[8] = 0;
mfid[8] = 0;
lcinfo[56] = 0;
lsd1[8] = 0;
lsd2[8] = 0;
status[24] = 0;
skipDibit (opts, state, 3);
status[0] = getDibit (opts, state) + 48;
skipDibit (opts, state, 21);
count = 57;
scount = 1;
if (opts->errorbars == 1)
{
printf ("e:");
}
// separate imbe frames and deinterleave
stats = 21; // we skip the status dibits that occur every 36 symbols
// the first IMBE frame starts 14 symbols before next status
// so we start counter at 22
for (i = 0; i < 9; i++)
{ // 9 IMBE frames per LDU
w = iW;
x = iX;
y = iY;
z = iZ;
for (j = 0; j < 72; j++)
{
if (stats == 35)
{
status[scount] = getDibit (opts, state) + 48;
scount++;
stats = 1;
count++;
}
else
{
stats++;
}
dibit = getDibit (opts, state);
count++;
imbe_fr[*w][*x] = (1 & (dibit >> 1)); // bit 1
imbe_fr[*y][*z] = (1 & dibit); // bit 0
w++;
x++;
y++;
z++;
}
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
// skip over non imbe data sometimes between frames
if ((i < 4) || (i == 8))
{
k = 0;
}
else if (i == 7)
{
//k=16;
k = 0;
}
else
{
k = 20;
}
for (j = 0; j < k; j++)
{
if (stats == 35)
{
status[scount] = getDibit (opts, state) + 48;
scount++;
count++;
stats = 1;
}
else
{
stats++;
}
skipDibit (opts, state, 1);
count++;
}
if (i == 1)
{
dibit = getDibit (opts, state);
lcformat[0] = (1 & (dibit >> 1)) + 48; // bit 1
lcformat[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcformat[2] = (1 & (dibit >> 1)) + 48; // bit 1
lcformat[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcformat[4] = (1 & (dibit >> 1)) + 48; // bit 1
lcformat[5] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
lcformat[6] = (1 & (dibit >> 1)) + 48; // bit 1
lcformat[7] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mfid[0] = (1 & (dibit >> 1)) + 48; // bit 1
mfid[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mfid[2] = (1 & (dibit >> 1)) + 48; // bit 1
mfid[3] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
status[scount] = getDibit (opts, state) + 48;
scount++;
dibit = getDibit (opts, state);
mfid[4] = (1 & (dibit >> 1)) + 48; // bit 1
mfid[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mfid[6] = (1 & (dibit >> 1)) + 48; // bit 1
mfid[7] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[0] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[1] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
lcinfo[2] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[4] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[6] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[7] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
stats = 10;
}
else if (i == 2)
{
dibit = getDibit (opts, state);
lcinfo[8] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[9] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[10] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[11] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[12] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[13] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
lcinfo[14] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[15] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[16] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[17] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[18] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[19] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
lcinfo[20] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[21] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[22] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[23] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[24] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[25] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
lcinfo[26] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[27] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[28] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[29] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[30] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[31] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
stats = 32;
}
else if (i == 3)
{
dibit = getDibit (opts, state);
lcinfo[32] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[33] = (1 & dibit) + 48; // bit 0
status[scount] = getDibit (opts, state) + 48;
scount++;
dibit = getDibit (opts, state);
lcinfo[34] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[35] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[36] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[37] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
lcinfo[38] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[39] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[40] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[41] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[42] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[43] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
lcinfo[44] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[45] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[46] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[47] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[48] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[49] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
lcinfo[50] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[51] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[52] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[53] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lcinfo[54] = (1 & (dibit >> 1)) + 48; // bit 1
lcinfo[55] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
stats = 19;
}
else if (i == 7)
{
dibit = getDibit (opts, state);
lsd1[0] = (1 & (dibit >> 1)) + 48; // bit 1
lsd1[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd1[2] = (1 & (dibit >> 1)) + 48; // bit 1
lsd1[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd1[4] = (1 & (dibit >> 1)) + 48; // bit 1
lsd1[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd1[6] = (1 & (dibit >> 1)) + 48; // bit 1
lsd1[7] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 4);
dibit = getDibit (opts, state);
lsd2[0] = (1 & (dibit >> 1)) + 48; // bit 1
lsd2[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd2[2] = (1 & (dibit >> 1)) + 48; // bit 1
lsd2[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd2[4] = (1 & (dibit >> 1)) + 48; // bit 1
lsd2[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd2[6] = (1 & (dibit >> 1)) + 48; // bit 1
lsd2[7] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 4);
stats = 33;
}
}
// trailing status symbol
status[scount] = getDibit (opts, state) + 48;
scount++;
if (opts->errorbars == 1)
{
printf ("\n");
}
if (opts->p25status == 1)
{
printf ("status: %s lsd1: %s lsd2: %s\n", status, lsd1, lsd2);
}
processP25lcw (opts, state, lcformat, mfid, lcinfo);
}

View File

@@ -1,352 +0,0 @@
/*
* 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.
*/
#include "dsd.h"
#include "p25p1_const.h"
void
processLDU2 (dsd_opts * opts, dsd_state * state)
{
// extracts IMBE frames rom LDU frame
int i, j, k, dibit, stats, count, scount;
char imbe_fr[8][23];
char mi[73], algid[9], kid[17], lsd3[9], lsd4[9], status[25];
const int *w, *x, *y, *z;
int algidhex, kidhex;
status[24] = 0;
mi[72] = 0;
algid[8] = 0;
kid[16] = 0;
lsd3[8] = 0;
lsd4[8] = 0;
skipDibit (opts, state, 3);
status[0] = getDibit (opts, state) + 48;
skipDibit (opts, state, 21);
scount = 1;
count = 57;
if (opts->errorbars == 1)
{
printf ("e:");
}
// separate imbe frames and deinterleave
stats = 21;
// we skip the status dibits that occur every 36 symbols
// the first IMBE frame starts 14 symbols before next status
// so we start counter at 22
for (i = 0; i < 9; i++)
{ // 9 IMBE frames per LDU
w = iW;
x = iX;
y = iY;
z = iZ;
for (j = 0; j < 72; j++)
{
if (stats == 35)
{
status[scount] = getDibit (opts, state) + 48;
scount++;
stats = 1;
count++;
}
else
{
stats++;
}
dibit = getDibit (opts, state);
count++;
imbe_fr[*w][*x] = (1 & (dibit >> 1)); // bit 1
imbe_fr[*y][*z] = (1 & dibit); // bit 0
w++;
x++;
y++;
z++;
}
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
// skip over non imbe data sometimes between frames
if ((i < 5) || (i == 8))
{
k = 0;
}
else if (i == 7)
{
//k=16;
k = 0;
}
else
{
k = 20;
}
for (j = 0; j < k; j++)
{
if (stats == 35)
{
status[scount] = getDibit (opts, state) + 48;
scount++;
count++;
stats = 1;
}
else
{
stats++;
}
skipDibit (opts, state, 1);
count++;
}
if (i == 1)
{
dibit = getDibit (opts, state);
mi[0] = (1 & (dibit >> 1)) + 48; // bit 1
mi[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[2] = (1 & (dibit >> 1)) + 48; // bit 1
mi[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[4] = (1 & (dibit >> 1)) + 48; // bit 1
mi[5] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
mi[6] = (1 & (dibit >> 1)) + 48; // bit 1
mi[7] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[8] = (1 & (dibit >> 1)) + 48; // bit 1
mi[9] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[10] = (1 & (dibit >> 1)) + 48; // bit 1
mi[11] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
status[scount] = getDibit (opts, state) + 48;
scount++;
dibit = getDibit (opts, state);
mi[12] = (1 & (dibit >> 1)) + 48; // bit 1
mi[13] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[14] = (1 & (dibit >> 1)) + 48; // bit 1
mi[15] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[16] = (1 & (dibit >> 1)) + 48; // bit 1
mi[17] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
mi[18] = (1 & (dibit >> 1)) + 48; // bit 1
mi[19] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[20] = (1 & (dibit >> 1)) + 48; // bit 1
mi[21] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[22] = (1 & (dibit >> 1)) + 48; // bit 1
mi[23] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
stats = 10;
}
else if (i == 2)
{
dibit = getDibit (opts, state);
mi[24] = (1 & (dibit >> 1)) + 48; // bit 1
mi[25] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[26] = (1 & (dibit >> 1)) + 48; // bit 1
mi[27] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[28] = (1 & (dibit >> 1)) + 48; // bit 1
mi[29] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
mi[30] = (1 & (dibit >> 1)) + 48; // bit 1
mi[31] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[32] = (1 & (dibit >> 1)) + 48; // bit 1
mi[33] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[34] = (1 & (dibit >> 1)) + 48; // bit 1
mi[35] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
mi[36] = (1 & (dibit >> 1)) + 48; // bit 1
mi[37] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[38] = (1 & (dibit >> 1)) + 48; // bit 1
mi[39] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[40] = (1 & (dibit >> 1)) + 48; // bit 1
mi[41] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
mi[42] = (1 & (dibit >> 1)) + 48; // bit 1
mi[43] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[44] = (1 & (dibit >> 1)) + 48; // bit 1
mi[45] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[46] = (1 & (dibit >> 1)) + 48; // bit 1
mi[47] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
stats = 32;
}
else if (i == 3)
{
dibit = getDibit (opts, state);
mi[48] = (1 & (dibit >> 1)) + 48; // bit 1
mi[49] = (1 & dibit) + 48; // bit 0
status[scount] = getDibit (opts, state) + 48;
scount++;
dibit = getDibit (opts, state);
mi[50] = (1 & (dibit >> 1)) + 48; // bit 1
mi[51] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[52] = (1 & (dibit >> 1)) + 48; // bit 1
mi[53] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
mi[54] = (1 & (dibit >> 1)) + 48; // bit 1
mi[55] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[56] = (1 & (dibit >> 1)) + 48; // bit 1
mi[57] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[58] = (1 & (dibit >> 1)) + 48; // bit 1
mi[59] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
mi[60] = (1 & (dibit >> 1)) + 48; // bit 1
mi[61] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[62] = (1 & (dibit >> 1)) + 48; // bit 1
mi[63] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[64] = (1 & (dibit >> 1)) + 48; // bit 1
mi[65] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
mi[66] = (1 & (dibit >> 1)) + 48; // bit 1
mi[67] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[68] = (1 & (dibit >> 1)) + 48; // bit 1
mi[69] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
mi[70] = (1 & (dibit >> 1)) + 48; // bit 1
mi[71] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
stats = 19;
}
else if (i == 4)
{
dibit = getDibit (opts, state);
algid[0] = (1 & (dibit >> 1)) + 48; // bit 1
algid[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
algid[2] = (1 & (dibit >> 1)) + 48; // bit 1
algid[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
algid[4] = (1 & (dibit >> 1)) + 48; // bit 1
algid[5] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
algid[6] = (1 & (dibit >> 1)) + 48; // bit 1
algid[7] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[0] = (1 & (dibit >> 1)) + 48; // bit 1
kid[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[2] = (1 & (dibit >> 1)) + 48; // bit 1
kid[3] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
dibit = getDibit (opts, state);
kid[4] = (1 & (dibit >> 1)) + 48; // bit 1
kid[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[6] = (1 & (dibit >> 1)) + 48; // bit 1
kid[7] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[8] = (1 & (dibit >> 1)) + 48; // bit 1
kid[9] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 1);
status[scount] = getDibit (opts, state) + 48;
scount++;
skipDibit (opts, state, 1);
dibit = getDibit (opts, state);
kid[10] = (1 & (dibit >> 1)) + 48; // bit 1
kid[11] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[12] = (1 & (dibit >> 1)) + 48; // bit 1
kid[13] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
kid[14] = (1 & (dibit >> 1)) + 48; // bit 1
kid[15] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 2);
stats = 6;
}
else if (i == 7)
{
dibit = getDibit (opts, state);
lsd3[0] = (1 & (dibit >> 1)) + 48; // bit 1
lsd3[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd3[2] = (1 & (dibit >> 1)) + 48; // bit 1
lsd3[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd3[4] = (1 & (dibit >> 1)) + 48; // bit 1
lsd3[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd3[6] = (1 & (dibit >> 1)) + 48; // bit 1
lsd3[7] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 4);
dibit = getDibit (opts, state);
lsd4[0] = (1 & (dibit >> 1)) + 48; // bit 1
lsd4[1] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd4[2] = (1 & (dibit >> 1)) + 48; // bit 1
lsd4[3] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd4[4] = (1 & (dibit >> 1)) + 48; // bit 1
lsd4[5] = (1 & dibit) + 48; // bit 0
dibit = getDibit (opts, state);
lsd4[6] = (1 & (dibit >> 1)) + 48; // bit 1
lsd4[7] = (1 & dibit) + 48; // bit 0
skipDibit (opts, state, 4);
stats = 33;
}
}
//trailing status symbol
status[scount] = getDibit (opts, state) + 48;
scount++;
if (opts->errorbars == 1)
{
printf ("\n");
}
if (opts->p25status == 1)
{
printf ("status: %s lsd3: %s lsd4: %s\n", status, lsd3, lsd4);
}
if (opts->p25enc == 1)
{
algidhex = strtol (algid, NULL, 2);
kidhex = strtol (kid, NULL, 2);
printf ("mi: %s algid: $%x kid: $%x\n", mi, algidhex, kidhex);
}
}

Some files were not shown because too many files have changed in this diff Show More