EliasOenal / multimon-ng

GNU General Public License v2.0
923 stars 206 forks source link

POCSAG decoder fails unless fed data in large chunks #213

Closed luarvique closed 4 months ago

luarvique commented 4 months ago

When running multimon-ng 1.1.9 executable and feeding it IQ input via a pipe, POCSAG decoders spew garbage unless the data is written in chunks of at least 512 complete IQ samples at a time. The FLEX decoder appears to be unaffected though.

The problem was found when running a background POCSAG/FLEX decoder in OpenWebRX+ as opposed to running it interactively. In the interactive mode, OpenWebRX+ has a Squelch() module in its DSP chain that buffers data in 1024-sample chunks. In the background mode, where Squelch() is not present and data arrives in smaller increments, POCSAG breaks.

I can obviously implement buffering at the input to multimon-ng, but it probably better be addressed in the multimon-ng code as well.

EliasOenal commented 4 months ago

Thanks for the report, I'd be happy to accept a PR for this issue.

luarvique commented 4 months ago

I have not got to the point of finding the exact culprit inside multimon-ng. Will try looking at it this upcoming week, but if you know where it may be, don't wait for me =)

EliasOenal commented 4 months ago

This issue is related to: #197 #91 #70

luarvique commented 4 months ago

Fixed with pull request #214. Came down to incorrect subsample tracking between separate portions of incoming data. The same issue might be present in some other decoders, I have not checked.

luarvique commented 4 months ago

I am seeing the same subsampling issue in demod_fmsfsk.c. You may want to check the rest.

luarvique commented 4 months ago

Thanks for the report, I'd be happy to accept a PR for this issue.

The PR is waiting for your review and approval. I will wait fixing remaining decoders (such as FMSFSK) until the current PR is merged in.

luarvique commented 4 months ago

PR got merged, so closing this one. Will make similar fixes to other decoders that use the same subsampling method.