Open philpem opened 8 years ago
I fixed the code (modulo that one header), Zach said he'd fix the makefile (apparently not done yet?). Golay.c doesn't exist, all that code is in fec.c now.
I'll take another look and see if anything else is broken.
-Peter
On Tue, 12 Jan 2016, Phil Pemberton wrote:
The current dsd-dmr master (7bf1bcb) appears to be unbuildable as committed
Initially I received an error from make regarding line 16 of the Makefile beginning with four spaces instead of a tab This was easily fixed
%o: ${CCFILES}
- $(CC) $(CFLAGS) -c $<
- $(CC) $(CFLAGS) -c $<
Secondly, the prototype for dsd_gen_root_raised_cosine does not match: the header dsdh specifies that it returns void, while the function actually returns a float
-void dsd_gen_root_raised_cosine(float sampling_freq, float symbol_rate, float alpha); +float dsd_gen_root_raised_cosine(float sampling_freq, float symbol_rate, float alpha);
After correcting the prototype in dsdh, the build process stopped with:
make: *\ No rule to make target 'Golayo', needed by 'dsd' Stop
So it appears this file is missing from the committed source
— Reply to this email directly or view it on GitHub.[AHwzQ_Rwb3oMj_zJMggIhX3k9ifMJiuXks5pZViNgaJpZM4HDebS.gif]
That explains a lot. Replacing "golay.c" with "fec.c" allows the build to proceed a little further, then it craps out. Replacing the first make rule with a pattern rule (instead of asking gcc to compile all the files in one go) makes it behave a little better.
It looks like there's some Reed Solomon stuff missing from fec.c, I guessed at that and got the thing to build but it segfaults on startup. Anyway, what I've done is on my fork, on the "make-it-build" branch:
Oh, the segfault is because it doesn't know what to do if given no sources (such as a file or fifo, use -i). I should fix that.
I don't enable ReedSolomon for just DMR since the RS code there is pitifully weak, as in it can correct at most one symbol error per Voice/Data Header frame. (In my experience those tend to either be error-free or have way more than one bad symbol). This is made doubly irrelevant by the fact that every DMR repeater I've seen sends those in bursts of, like, 16. I guess I could just do syndrome decoding and treat it like a fancy CRC (and omit the Berlekamp-Massey/Chein Search stages), but meh (unless enough people care).
Should probably add -DNO_REEDSOLOMON=1 to the Makefile.
Fixing docs currently.
On Wed, 13 Jan 2016, Phil Pemberton wrote:
That explains a lot. Replacing "golay.c" with "fec.c" allows the build to proceed a little further, then it craps out. Replacing the first make rule with a pattern rule (instead of asking gcc to compile all the files in one go) makes it behave a little better.
It looks like there's some Reed Solomon stuff missing from fec.c, I guessed at that and got the thing to build but it segfaults on startup. Anyway, what I've done is on my fork, on the "make-it-build" branch:
https://github.com/philpem/dsd-dmr/tree/make-it-build
— Reply to this email directly or view it on GitHub.[AHwzQ3SWQkUGXswTOeBBzQkSVooHgsXFks5pZtSegaJpZM4HDebS.gif]
Yeah, I noticed that and patched it so it doesn't segfault any more (see 63f746a...), instead politely telling you to use -i. Sadly it doesn't seem to hear anything: while "padsp ./dsd -xr" seems to work for the 'main' DSD (or at least Szechyjs's fork), all this one does (with "padsp ./dsd -i /dev/audio -xr") is pick up a few random NXDN packets in the noise.
I suspect I'm using the wrong DSP device or something, or it needs a sample format conversion. I'll wait on the updated documentation and see if I can make any sense of it -- it's getting pretty late here anyway. Thanks :)
Yeah I believe it's failing to autodetect between s16 and float, and unfortunately defaulting to float instead of s16. Fixing...
On Wed, 13 Jan 2016, Phil Pemberton wrote:
Yeah, I noticed that and patched it so it doesn't segfault any more (see 63f746a...), instead politely telling you to use -i. Sadly it doesn't seem to hear anything: while "padsp ./dsd -xr" seems to work for the 'main' DSD (or at least Szechyjs's fork), all this one does (with "padsp ./dsd -i /dev/audio -xr") is pick up a few random NXDN packets in the noise.
I suspect I'm using the wrong DSP device or something, or it needs a sample format conversion. I'll wait on the updated documentation and see if I can make any sense of it -- it's getting pretty late here anyway. Thanks :)
— Reply to this email directly or view it on GitHub.[AHwzQwa2TNytzPKpVSZZ59wSec7rVdNzks5pZuOVgaJpZM4HDebS.gif]
The current dsd-dmr master (7bf1bcb9...) appears to be unbuildable as committed.
Initially I received an error from make regarding line 16 of the Makefile beginning with four spaces instead of a tab. This was easily fixed.
Secondly, the prototype for dsd_gen_root_raised_cosine does not match: the header dsd.h specifies that it returns void, while the function actually returns a float.
After correcting the prototype in dsd.h, the build process stopped with:
So it appears this file is missing from the committed source.