Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential fix for P25 encryption muting #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

balr0g
Copy link
Contributor

@balr0g balr0g commented Dec 16, 2013

This may fix the erroneous muting of unencrypted P25 packets. However, I'm lacking a P25 sample and have no way to test it, so can someone please test it and report on whether it works before this is merged?

@mbt25
Copy link

mbt25 commented Dec 17, 2013

I'd let you know if this fixed P25 encryption muting, but I cannot currently since I"m unable to build DSD (no makefile). I could also possibly upload a P25 sample, but I wouldn't know where to upload it to.

@szechyjs
Copy link
Owner

Sample files would be a big help to the project. Simply fork the project and add the sample files to the samples directory. Then submit a pull request.

Thanks!

@mbt25
Copy link

mbt25 commented Dec 17, 2013

I'll admit to not understanding how Github works at all. With that said, is the potential fix for P25 encryption muting in the master yet, or is somebody actually wanting to test it with some P25 audio samples first?

Secondly I did fork the project and am willing to add some audio samples and submit a pull request; however, I don't know the best way to capture the sound (i.e. sample rate, format, etc)

Something along the lines of 'arecord -f dat -t wav p25.wav ?

@balr0g
Copy link
Contributor Author

balr0g commented Dec 17, 2013

You can post the samples on Dropbox or another site and link them here.
Samples should be 48khz, preferably FLAC but WAV works too.
I think samples should be in their own repo, so this one doesn't grow too large.

I'll add updated building instructions.

@szechyjs
Copy link
Owner

@mbt25 yes, we'd like to test the P25 muting fix before merging it.

@balr0g I agree that we don't want to fill the repo with large amounts of sample data. I would like to have a small set of sample data in the repo to use with unit testing though. These sample clips only need to be a few seconds in length. If the size gets to be a problem we can always make it a sub repo.

I've also updated the README last night, it should contain better building instructions now.

@mbt25
Copy link

mbt25 commented Dec 17, 2013

Ok. Does it matter if samples are mono or stereo?

@szechyjs
Copy link
Owner

mono would probably be preferred.

@dreinhold
Copy link
Contributor

I lose all audio with this update.

@balr0g
Copy link
Contributor Author

balr0g commented Dec 18, 2013

@mbt25: Is the sample you posted encrypted? I'm seeing a key id of 0x81 (should be 0x80 for unencrypted), and worse, if I disable the detection all I get is gibberish...
@dreinhold: Can you provide a sample of unencrypted P25 Phase 1?

@mbt25
Copy link

mbt25 commented Dec 18, 2013

balr0g, I don't think so. There is very little encryption on this system in my area, but it is possible that it was encrypted. I have a longer version of that sample that I'm sure has multiple agencies communicating and is guaranteed to have some unencrypted traffic. But it was a bit larger and so I did not post it.

I could have swarn that I listened to the decoded audio while taking the sample and that it was all unencrypted, but I could be wrong. I'll get another sample up shortly that I'll be able to guarantee is unencrypted.

@mbt25
Copy link

mbt25 commented Dec 18, 2013

Yep, encrypted. Sorry about that. Unencrypted will be put up shortly

@szechyjs
Copy link
Owner

Good to know, I was getting ready to post that this fix doesn't work.

@mbt25
Copy link

mbt25 commented Dec 18, 2013

There ya go -- I renamed the encrypted sample and added a guaranteed unencrypted sample

@balr0g
Copy link
Contributor Author

balr0g commented Dec 18, 2013

All right; you did forget to resample it to 48KHz though. At some point I should implement PortAudio support as well as on-the-fly resampling....

@mbt25
Copy link

mbt25 commented Dec 18, 2013

I think I need to stick with .wav uploads. It was a wav converted to flac after the fact. This wasn't generated by DSD in any fashion. The DSD I have operational on Windows is a version that doesn't support any of that.

@balr0g
Copy link
Contributor Author

balr0g commented Dec 18, 2013

DSD cannot generate wavs or flacs of this sort. I generally use audacity for processing. If you're using audacity, be sure the project rate is set correctly after resampling the track.
Anyway, this particular sample is too short to be conclusive. I'm getting all sorts of strange algids for it, which should not be happening... it's possible dsd's parsing is broken :/

@dreinhold
Copy link
Contributor

I have a raw file right out of sdr_fm I was using for quick back to back compares of the new versions.
https://www.dropbox.com/sh/vz1asilre8t2onk/6xJfo0Wbj_

I just pipe it right in, 1.4.1 and 1.6.0 plays audio with about the same decode rate, and this patch no audio at all.
cat p25_raw_from_sdr.dat | padsp ./dsd -i /dev/stdin

@mbt25
Copy link

mbt25 commented Dec 18, 2013

That unencrypted sample was a 96khz wav loaded into audacity, resampled to 48k, and then exported as a flac. Because my uploaded flac was in question, I opened it in Audacity and exported it as a .wav. Then I fed the wav into a previous incarnation of dsd 1.6 where I had commented out all of the automuting code and rebuilt it. It decoded just fine. Well, just fine as far as DSD goes -- DSD isn't anywhere near 100% on a good day. But if you aren't getting any decode at all, it's a problem with the current DSD P25 code, probably related to the automuting code.

@balr0g
Copy link
Contributor Author

balr0g commented Dec 18, 2013

@dreinhold: I'm using OS X here; can you convert it into a wav file if possible?

@mbt25: I'm getting a highly unintelligible decode even when automuting is fully disabled.

@mbt25
Copy link

mbt25 commented Dec 18, 2013

@balr0g Doesn't surprise me. DSD is lousy on P25. Sometimes it works great, sometimes it doesn't. I have an application capable of decoding the very same audio at 100%. And, as I said, if I take that flac file, convert it back to a wav, and then feed that wav into DSD 1.6 (a previous incarnation of it), it decodes at probably 75-80%. Is the flac file at fault? I wouldn't know since I don't know how to feed the flac file into DSD. But I know if I take the flac file and convert it back to a .wav and feed the wav in, it decodes as I would expect in DSD. I'm of a strong mindset that there is not anything wrong with the audio I have provided.

You say the audio sample is too short; Jared says audio samples should be no more than a few seconds long. I prefer to work with wav files; you guys prefer to work with flac. I'm pretty much damned if I do and damned if i don't. I'm not a programmer, but I'm not a moron either. The audio isn't the issue. Likely DSD is the issue.

If you like I can record a nice long P25 file (it'll have encrypted and nonencrypted audio, strong audio and weak signal audio all combined) and upload it to my site, as a wav, and you can download it and work with it if you wish. That's the best I can do.

@dreinhold
Copy link
Contributor

@mbt25 what is the other app you use, why do you use dsd if you have something that works 100%.
I also cant decode any voice in your sample.

@szechyjs
Copy link
Owner

@mbt25 I've been able to read flac files directly into DSD like so ./dsd -i ../samples/P25\ sample\ -\ unencrypted.flac -w test.wav. Keep in mind that the process of re-encoding the streams in different formats at different bit rates is going to most likely screw up the files a little bit.

here is the output of the most recent file you posted:

Sync:  -P25p1     mod: QPSK inlvl: 11% nac:  944 src:        0 tg:     0  duid:01 *Unknown DUID*
Sync:  -P25p1     mod: QPSK inlvl: 11% nac:  160 src:        0 tg:     0  duid:01 *Unknown DUID*
Sync:  -P25p1     mod: QPSK inlvl: 13% nac:  144 src:        0 tg:     0  duid:01 *Unknown DUID*
Sync:  -P25p1     mod: QPSK inlvl: 10% nac:  964 src:        0 tg:     0  duid:02 *Unknown DUID*
Sync:  -P25p1     mod: QPSK inlvl: 13% nac:  904 src:        0 tg:     0  duid:01 *Unknown DUID*
Sync:  -P25p1     mod: QPSK inlvl: 11% nac:  920 src:        0 tg:     0  duid:01 *Unknown DUID*

I had gotten better results from the original file you posted, the only problem was that it was encrypted:

Sync:  -P25p1     mod: C4FM inlvl: 50% src:        0 tg:     0  HDU
Sync: (-P25p1)    mod: C4FM inlvl: 28% nac:  828 src:        0 tg:   168 (LDU1)                                   e:
Sync:  -P25p1     mod: C4FM inlvl: 19% src:        0 tg:   168  HDU
Sync: (-P25p1)    mod: C4FM inlvl: 14% nac:  A01 src:        0 tg:   544 (LDU1)

@dreinhold
Copy link
Contributor

@balr0g i will capture a new sample, i would think you could pipe it in using osx also.
Did you try cat p25_raw_from_sdr.dat | ./dsd -i /dev/stdin

@szechyjs
Copy link
Owner

dsd has the following input/output options

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, disable = -1)
  -n                Do not send synthesized speech to audio output device
  -w <file>      Output synthesized speech to a .wav file
  -r <files>      Read/Play saved mbe data from file(s)

@mbt25
Copy link

mbt25 commented Dec 18, 2013

http://www.tindorconsulting.com/dsd/audiotest

note: rawmixed.wav was the source for both tests

rawmixed.wav # 44 khz (16-bit mono I think)
raw_audio_fed_into_quality_p25_decode_software.wav # self explanatory
raw_audio_fed_into_dsd.wav # self explanatory

@mbt25
Copy link

mbt25 commented Dec 18, 2013

Thanks, Jared. I thought DSD only worked with mbe stuff. The raw_audio_fed_into_dsd.wav is the output from dsd using -r. Worked well.

@mbt25
Copy link

mbt25 commented Dec 18, 2013

Also do keep in mind that for a while now, P25 has worked better if you force it with -f1 -mc, or at the very least -f1. The monitored signal definitely is not QPSK, but recent versions of DSD seem to think it is without forcing.

@dreinhold
Copy link
Contributor

Just uploaded a flac version of some voice traffic.
https://www.dropbox.com/sh/vz1asilre8t2onk/6xJfo0Wbj_
File : p25_raw.flac

I can decode voice in version previous to this patch, but not with the patch

./dsd.1.6.0 -i p25_raw.flac
Digital Speech Decoder 1.6.0
mbelib version 1.2.5
Audio Out Device: /dev/audio
Audio In Device: p25_raw.flac
Sync: +P25p1 mod: QPSK inlvl: 35% nac: F1 src: 0 tg: 0 TDU
Sync: +P25p1 mod: QPSK inlvl: 28% nac: 1F5 src: 0 tg: 0 TDU
Sync: +P25p1 mod: QPSK inlvl: 31% nac: 1A1 src: 0 tg: 0 duid:32 Unknown DUID
Sync: +P25p1 mod: QPSK inlvl: 28% nac: B5 src: 0 tg: 0 Ignoring LDU2 not preceeded by LDU1
Sync: +P25p1 mod: QPSK inlvl: 29% nac: 1F5 src: 0 tg: 0 TDU
Sync: +P25p1 mod: QPSK inlvl: 30% nac: 1F5 src: 0 tg: 0 TDU
Sync: +P25p1 mod: QPSK inlvl: 34% nac: 1F5 src: 0 tg: 0 HDU
Sync: +P25p1 mod: QPSK inlvl: 32% nac: 1F5 src: 0 tg: 7455 LDU1 e:=
Sync: +P25p1 mod: QPSK inlvl: 28% nac: 1F5 src: 0 tg: 7455 LDU2 e:=======R=========R=============R=====
Sync: +P25p1 mod: QPSK inlvl: 29% nac: 1F5 src: 0 tg: 7455 LDU1 e:=
Sync: +P25p1 mod: QPSK inlvl: 33% nac: 1F5 src: 0 tg: 7455 LDU2 e:=====
Sync: +P25p1 mod: QPSK inlvl: 28% nac: 1F5 src: 0 tg: 7455 LDU1 e:=
Sync: +P25p1 mod: QPSK inlvl: 32% nac: 1F5 src: 4270002 tg: 7455 LDU2 e:=
Sync: +P25p1 mod: QPSK inlvl: 25% nac: 1B5 src: 4270002 tg: 7455 LDU1 e:================R
Sync: +P25p1 mod: QPSK inlvl: 33% nac: 1F5 src: 4270002 tg: 7455 LDU2 e:
Sync: +P25p1 mod: QPSK inlvl: 32% nac: 1F5 src: 4270002 tg: 7455 LDU1 e:=====
Sync: +P25p1 mod: QPSK inlvl: 29% nac: 1F5 src: 4270002 tg: 7455 LDU2 e:=
Sync: +P25p1 mod: QPSK inlvl: 32% nac: 1F5 src: 4270002 tg: 7455 LDU1 e:
Sync: +P25p1 mod: QPSK inlvl: 27% nac: 1F5 src: 4270002 tg: 7455 LDU2 e:=================
Sync: +P25p1 mod: QPSK inlvl: 30% nac: 1A5 src: 4270002 tg: 7455 LDU1 e:==================
Sync: +P25p1 mod: QPSK inlvl: 34% nac: 1F5 src: 4270002 tg: 7455 LDU2 e:
Sync: +P25p1 mod: QPSK inlvl: 31% nac: 1F5 src: 4270002 tg: 7455 LDU1 e:
Sync: +P25p1 mod: QPSK inlvl: 34% nac: 1F5 src: 4270002 tg: 7455 LDU2 e:=
Sync: +P25p1 mod: QPSK inlvl: 27% nac: 1F5 src: 4270002 tg: 7455 LDU1 e:
Sync: +P25p1 mod: QPSK inlvl: 32% nac: 1F5 src: 4270002 tg: 7455 LDU2 e:
Sync: +P25p1 mod: QPSK inlvl: 30% nac: 1F5 src: 4270002 tg: 7455 LDU1 e:==========R==========R==========R==========RM==========R==========R
Sync: +P25p1 mod: QPSK inlvl: 31% nac: 1F5 src: 4270002 tg: 7455 TDULC
Sync: +P25p1 mod: QPSK inlvl: 35% nac: 1F5 src: 4270002 tg: 7455 TDULC

@mbt25
Copy link

mbt25 commented Dec 18, 2013

@dreinhold run dsd with '-f1 -mc' additional switches. I ran your raw audio through and it sounded significantly better when forcing.

@dreinhold
Copy link
Contributor

@mbt25 hmm when it's playing live i normally use -f1 -mq.
I dont get anything if I use -mc.

So you get voice with my sample using this latest patch?

@mbt25
Copy link

mbt25 commented Dec 18, 2013

@dreinhold yes indeed. -f1 -mc works fine for me. Keep in mind I'm not using a DSD 1.6 newer than 7 days ago, and the one I'm using has all automuting commented out.

yes I get voice. http://www.tindorconsulting.com/dsd/audiotest -- you'll see what your wav sounds like when I pipe it through my DSD with the -f1 -mc option

@mbt25
Copy link

mbt25 commented Dec 18, 2013

I shouldn't have "yes indeed". I dont know what the last patch is and I haven't compiled anything new in Windows in days. I'm using a binary compiled approx 7 days ago.

@mbt25
Copy link

mbt25 commented Dec 18, 2013

At the very least, you know that if your audio isn't sounding as good as mine, when piping your raw audio wav into your version of dsd using the -f1 -mc switches, then something indeed is wrong with the dsd.

@balr0g
Copy link
Contributor Author

balr0g commented Dec 18, 2013

To import a recorded wav file, use -i /path/to/wavfile.wav. @szechyjs, this probably should be added to the documentation.

@balr0g
Copy link
Contributor Author

balr0g commented Dec 18, 2013

I'm looking at this whole encryption muting and I may need to get a hold of the P25 specs to get any further... Not entirely sure what's going on yet. Add the -pe switch to get output of what DSD thinks the algid/kid are (you should be seeing an algid of 0x80 for unencrypted P25).

@szechyjs
Copy link
Owner

I've updated the README, it should now contain all the input/output options.

@dreinhold
Copy link
Contributor

@mbt25 This thread is about a patch @balr0g wanted tested.
When I run the latest git version without the patch and without any switches my audio is fine, I just uploaded it to the dropbox https://www.dropbox.com/sh/vz1asilre8t2onk/6xJfo0Wbj_/ as p25_voice_without_switches.wav

But when I apply the patch I loose all audio.

@balr0g
Copy link
Contributor Author

balr0g commented Dec 18, 2013

Yeah I'm trying to figure out what's going on. It seems a lot of data is being lost. Probably it isn't helping that DSD doesn't implement the Hamming code error correction used by P25 but rather ignoring all ECC data.

For unencrypted frames, mi should be zeros, algid should be 0x80, and kid should be 0.
I'm getting output like this:

./dsd -f1 -pe -pl -ps -pt -mc -i p25_raw.flac -w p25_raw_out.wav
Digital Speech Decoder 1.6.0
mbelib version 1.2.5
Decoding only P25 Phase 1 frames.
Enabling only C4FM modulation optimizations.
Writing audio to file p25_raw_out.wav
Audio In Device: p25_raw.flac
Sync:  +P25p1     mod: C4FM inlvl: 55% nac:   A0 src:        0 tg:     0  duid:02 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 37% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 27% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 22% nac:   A0 src:        0 tg:     0  duid:02 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 21% nac:   F1 src:        0 tg:     0  duid:02 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 20% nac:  1B5 src:        0 tg:     0  HDU
mi: 000000000000000000000000000000000000000000000000000000000000000000000000 algid: $80 kid: $0
mfid: 00000000 tgid: 0001110100011111 tg: 7455
Sync:  +P25p1     mod: C4FM inlvl: 19% nac:   E1 src:        0 tg:  7455 (LDU1) e:===========R=======R===============R=========R=======R===========R======R
status: 222222222222232222232222 lsd1: 00000000 lsd2: 00000000
lcformat: 01100010 mfid: 00000000 lcinfo: 00100001111100000000000000000010000000001010001000100000 
Sync:  +P25p1     mod: C4FM inlvl: 16% nac:   A0 src:        0 tg:  7455  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:  1F4 src:        0 tg:  7455  duid:10 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   A0 src:        0 tg:  7455  HDU
mi: 100010001010000010000010000010000000101000001010001000001000001010100000 algid: $2a kid: $800
mfid: 10100010 tgid: 0000001000100010 tg: 546
Sync: (+P25p1)    mod: C4FM inlvl: 15% nac:   A0 src:        0 tg:   546  HDU
mi: 101000100010000010001000001010101000100010101010101000001000101000101010 algid: $a0 kid: $8aa8
mfid: 10001010 tgid: 0000001010001000 tg: 648
Sync:  +P25p1     mod: C4FM inlvl: 16% nac:  1F5 src:        0 tg:   648  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:  1F5 src:        0 tg:   648  LDU1  e:===========
status: 232222232222232222232222 lsd1: 00000000 lsd2: 00000000
lcformat: 01000010 mfid: 00010110 lcinfo: 00011000000111100010001100010110000110000001111000100011 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   F4 src:        0 tg:   648  LDU2  e:======R=======R=================R=========R============R======RM
status: 232222232222232222222222 lsd3: 00000000 lsd4: 00000000
mi: 000000000000000000000000000000000000000000000000000000000000000000000000 algid: $80 kid: $0
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:        0 tg:   648  LDU1  e:================
status: 232222222222232222232222 lsd1: 00000000 lsd2: 00000000
lcformat: 00000000 mfid: 00000000 lcinfo: 00000100000000000001110100011111010000010010011110110010 tg: 7455 src: 4270002 emr: 0
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1B5 src:  4270002 tg:  7455  LDU2  e:====================
status: 222222232222232222232222 lsd3: 00000000 lsd4: 00000000
mi: 000000000000000000000000000000000000000000000000000000000000000000000000 algid: $80 kid: $0
Sync: (+P25p1)    mod: C4FM inlvl: 17% nac:   A0 src:  4270002 tg:  7455  HDU
mi: 000010100010001010000010000010001010101010000000100000000000101000001010 algid: $2a kid: $202
mfid: 00100010 tgid: 0010001000001010 tg: 8714
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1E5 src:  4270002 tg:  8714  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:  4270002 tg:  8714  LDU1  e:===================
status: 232222232222232222232222 lsd1: 00000000 lsd2: 00000000
lcformat: 01100010 mfid: 00000000 lcinfo: 00110001111100010000000100000110000101101000000001110000 
Sync:  +P25p1     mod: C4FM inlvl: 19% nac:  1F5 src:  4270002 tg:  8714  LDU2  e:=============
status: 232222232222232222232222 lsd3: 00000000 lsd4: 00000000
mi: 000000000000000000000000000000000000000000000000000000000000000000000000 algid: $80 kid: $0
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   A0 src:  4270002 tg:  8714  HDU
mi: 000000101010101010101010101010001010001000101000000000100010100010100010 algid: $2 kid: $8200
mfid: 10000000 tgid: 0000001000100010 tg: 546
Sync: (+P25p1)    mod: C4FM inlvl: 16% nac:  EB4 src:  4270002 tg:   546 (LDU1) e:========R========R========R=========RM===========R=========R========R========RM==========R
status: 222222222222222222223222 lsd1: 00000000 lsd2: 00000000
lcformat: 10101010 mfid: 00100010 lcinfo: 01101001001000100001000101100000011010101000100100101011 
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   A1 src:  4270002 tg:   546  duid:01 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   E4 src:  4270002 tg:   546  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1A5 src:  4270002 tg:   546  duid:10 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:  4270002 tg:   546  duid:32 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 19% nac:   F5 src:  4270002 tg:   546  TDULC
lcformat: 00000010 mfid: 00000010 lcinfo: 00001000000010100010001000000010000010000000101000100010 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F1 src:        0 tg:     0  TDULC
lcformat: 01100010 mfid: 00000000 lcinfo: 00110001111100010000000100001000000000011101010100110000 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F1 src:        0 tg:     0  TDULC
lcformat: 00000000 mfid: 00000000 lcinfo: 00000100000000000001110100011011000000000000000000000000 tg: 7451 src: 0 emr: 0
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   A5 src:        0 tg:  7451  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   A0 src:        0 tg:  7451  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 16% nac:   A0 src:        0 tg:  7451  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   B0 src:        0 tg:  7451  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:        0 tg:  7451  TDULC
lcformat: 01000010 mfid: 00010110 lcinfo: 00011000000111100010001100010110000110000001101000100011 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   F5 src:        0 tg:     0  TDULC
lcformat: 01100010 mfid: 00000000 lcinfo: 00110001111100010000000100000110000101101100000001110000 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1A5 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   E1 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1A5 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   E0 src:        0 tg:     0  duid:32 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:        0 tg:     0  duid:23 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 19% nac:  1F4 src:        0 tg:     0  TDULC
lcformat: 00100010 mfid: 00000000 lcinfo: 00110000101100000000000000001000000000001100000000110000 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   E1 src:        0 tg:     0  TDULC
lcformat: 00000000 mfid: 00000000 lcinfo: 00000000000000000000100100001010000000000000000000000000 tg: 2314 src: 0 emr: 0
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   A0 src:        0 tg:  2314  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   E0 src:        0 tg:  2314  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:        0 tg:  2314  TDULC
lcformat: 00000000 mfid: 00000000 lcinfo: 00000100000000000001110100011011000000000000000000000000 tg: 7451 src: 0 emr: 0
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F1 src:        0 tg:  7451  TDULC
lcformat: 00000010 mfid: 00010110 lcinfo: 00001000000111100010101000010010000110000001111000100011 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   E5 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:        0 tg:     0  duid:32 *Unknown DUID*
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1B5 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1B4 src:        0 tg:     0  TDULC
lcformat: 00100010 mfid: 00000000 lcinfo: 00100000101000000000000000001000000000001000000100100000 
Sync:  +P25p1     mod: C4FM inlvl: 19% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   A0 src:        0 tg:     0  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:        0 tg:     0  TDULC
lcformat: 00100010 mfid: 00000000 lcinfo: 00110000111100010000000100000010000110000000111001110000 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:        0 tg:     0  TDULC
lcformat: 00000000 mfid: 00000000 lcinfo: 00000100000000000001110100011111000000000000000000000000 tg: 7455 src: 0 emr: 0
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   A0 src:        0 tg:  7455  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:   A0 src:        0 tg:  7455  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 17% nac:   A1 src:        0 tg:  7455  Ignoring LDU2 not preceeded by LDU1
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:        0 tg:  7455  TDULC
lcformat: 01001110 mfid: 00000000 lcinfo: 00000000000000000000000000000000111111111111111111111101 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1F5 src:        0 tg:     0  TDULC
lcformat: 01001111 mfid: 00000000 lcinfo: 00000000000000000000000000000000111111111111111111111100 
Sync:  +P25p1     mod: C4FM inlvl: 18% nac:  1A5 src:        0 tg:     0  duid:23 *Unknown DUID*
Sync: no sync
Exiting.

@balr0g
Copy link
Contributor Author

balr0g commented Dec 18, 2013

@szechyjs it's also in dsd_main.c in the --help printout.

@mbt25
Copy link

mbt25 commented Dec 18, 2013

I'd test, but I have no idea how to get this all to compile on windows because of sndfile. I don't know where it expects to find it if I do install it. And then, of course, cygWin has to be aware of it.

@dreinhold
Copy link
Contributor

@mbt25 from the cywin setup program install libsndfile-devel

@mbt25
Copy link

mbt25 commented Dec 18, 2013

Thanks Jared. Incidentally, I really knew better. What an idiotic brain fart.

Ok, I'm testing DSD just compiled from latest sources, and I get zero audio. Raw encrypted audio (right from the audio jack) isn't producing voice. But I it producing a scrolling display of information. Oddly, if I do 'cat some_unencrypted_p25.wav | ./dsd -i /dev/dsp -o /dev/dsp I can hear the decoded audio.

@mbt25
Copy link

mbt25 commented Dec 18, 2013

I'm hearing some traffic. But can't use -f1 or -f1 -mc. And if i don't use switches, it suggests it is QPSK.

@mbt25
Copy link

mbt25 commented Dec 18, 2013

and it appears to still be muting valid unencrypted traffic most of the time.

@balr0g
Copy link
Contributor Author

balr0g commented Dec 18, 2013

Yeah comment out those two if statements that cause "encrypted" traffic to be muted.

The actual issue is much bigger — it's not parsing P25 headers properly, and the fact that it discards all the header ECC bits doesn't help at all.

@szechyjs szechyjs added the bug label Feb 11, 2014
@szechyjs szechyjs added this to the v1.7.0 milestone Feb 11, 2014
@szechyjs
Copy link
Owner

@balr0g any progress on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants