public inbox for linux-hams@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Platt <dplatt@radagast.org>
To: linux-hams@vger.kernel.org
Subject: Re: 300bps Packet
Date: Tue, 23 Nov 2010 11:33:03 -0800	[thread overview]
Message-ID: <4CEC16EF.8060106@radagast.org> (raw)
In-Reply-To: <6CE4D96A7B544D30919A49105B458915@LIVINGROOM>

Tsutsumi Family wrote:
> John,
> 
> My experience is the same and it can transmit two tones at 400 bps lowest.
> 
> I wish to analyze the source codes but have not yet done due to my software
> capability limitation.

It looks to me as if the immediate cause of this may lie in the
following code in afsk/modem.c:

        if (params[0]) {
                s->bps = strtoul(params[0], NULL, 0);
                if (s->bps < 100)
                        s->bps = 100;
                if (s->bps > 9600)
                        s->bps= 9600;
        } else
                s->bps = 1200;
        if (params[1]) {
                s->f0 = strtoul(params[1], NULL, 0);
                if (s->f0 > s->bps * 4)
                        s->f0 = s->bps * 4;
        } else
                s->f0 = 1200;
        if (params[2]) {
                s->f1 = strtoul(params[2], NULL, 0);
                if (s->f1 > s->bps * 4)
                        s->f1 = s->bps * 4;
        } else
                s->f1 = 2200;
        s->notdiff = params[3] ? !strtoul(params[3], NULL, 0) : 0;
        *samplerate = 8 * s->bps;

The modem-configuration code appears to be insisting that the
frequencies being used, must be no less than four times the
bit-rate.  The audio sample-generation rate is then set to
8x the bit-rate.

I *think* this is being done, in order to limit the number
of times that the loop down in "modsendbits" must iterate
for each individual bit-symbol being transmitted... looks
like no more than two audio output samples are being
generated per bit.

As a result of this approach, if you try to set the bit
rate to below 575 bits/second, the upper frequency (f1)
can no longer be sustained at 2200 Hz... the software starts
to decrease it.  At 300 bits/second, it ends up being
reduced all the way down to 1200 Hz (4 * 300) and you end
up transmitting a monotone.

For the transmit side of things, you could probably fix
this by changing the logic in this section.  If one were
to disable the logic which selectively reduces s->f0 and
s->f1, one would need to change the final calculation
of *samplerate, and increase the sample rate actually
being used.

It looks to me as if a similar - and probably much hairier -
set of changes would be needed to the demodulator code
further down in this file.  The demodulator is setting
up and using a set of digital filters, through which the
incoming samples are being fed.  You'd need to make changes
to run the receiver/demodulator at a higher sampling rate,
with longer filters, and more samples being captured prior
to being fed into the demodulator filter chain.

So, making this sort of change would be a job for someone
willing to dig through the DSP logic in the modulator and
demodulator, and generalize it a bit (and quite possibly
reduce its performance in the interest of generality).


  reply	other threads:[~2010-11-23 19:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23  5:26 300bps Packet John Goerzen
2010-11-23  6:17 ` Ray Wells
2010-11-23  7:41   ` Tsutsumi Family
2010-11-23 19:33     ` Dave Platt [this message]
2010-11-24 10:31       ` Tsutsumi Family
2010-11-24 11:22         ` Andrew Errington
2010-11-24 13:09           ` Tsutsumi Family
2010-11-24 18:37         ` Dave Platt
2010-11-25 10:43           ` Tsutsumi Family
     [not found]             ` <4CEEB394.3020305@trinnet.net>
2010-11-26  2:52               ` 300bps Packet (and EHAS) Tsutsumi Family
2010-11-26  5:23                 ` 300bps Packet (and EHAS) - what is pam, psk, and newpsk, David Ranch
2010-11-26  6:57                   ` Dave Platt
     [not found]                     ` <4CF0040D.3000303@trinnet.net>
2010-11-26 22:10                       ` Tomi Manninen
2010-11-27 17:30                         ` David Ranch
2010-11-27 19:50                           ` Ray Wells
2010-11-24  6:51 ` 300bps Packet Phil
2010-11-24 12:38   ` John Goerzen
2010-11-25  1:51     ` Phil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CEC16EF.8060106@radagast.org \
    --to=dplatt@radagast.org \
    --cc=linux-hams@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox