Hi Jeroen,
Actually David's "freebeacon.c" code has 99% of a "parrot repeater" job done.
At present it receives, writes a decoded voice file as well as the audio from
the radio.
Then it starts the transmitter (GPIO pin or DTR) and then sends your supplied
callsign
(wav file) out, encoded codec2.
I'm not a C programming guru, only a "dabbler" so I'm "aving a go".
To change freebeacon.c from mode 1600 to 700D just change one line, 461 from
FREEDV_MODE_1600 to FREEDV_MODE_700D
it's that simple.
I'm trying to extend David's code to, not send back just a callsign but what it
actually
received, including any text strings. This text is not preserved in the saved
files but
is in the data stream I'm trying to collect.
As mentioned, this data is stored in f->packed_codec_bits and/or
f->packed_codec_bits_tx
If I try to get this from MY structure of tyoe freedv, I get:
error: dereferencing pointer to incomplete type ‘struct freedv’
fwrite(fdv->packed_codec_bits, sizeof(char), nout, ftmp);
My structure is named "fdv" not "f" as "I hate one letter variables".
So I added a function in codec2-dev/src/freedv_api.c to get it for me.
OK, I'm now getting codec2 data when sync is true but I need also,
when the data is valid.
Must go, late for church.
Alan VK2ZIW
On Sat, 14 Jul 2018 16:12:48 +0200, Jeroen Vreeken wrote
> Hi All,
>
> While not a compleet parrot repeater yet, I might have some usefull
> information.
> Every Sunday a net is held at our local VHF repeater PI3EHV.
> However due to interference some HAMs have difficulty receiving it (but
> can transmit to it fine) and they made the request to use our UHF
> repeater as they could hear it just fine.
> I created a small DML node using a Raspberry Pi 3 and a Nicerf SA818V
> module set to the frequency of PI2EHV.
> On the DML network it makes the stream 'vhf.pe1rxq.ampr.org' available.
>
> (It is fully capable of transmitting as well, but currently disabled
> due to legal issues). Every sunday morning it automaticly connects
> to the UHF repeater PI2EHV (the one I made a controller for last
> year) and for a few hours audio received from PI3EHV is available on
> UHF.
>
> I just finished describing the setup and installation process here:
> http://dmlinking.net/rpi3.html
> It uses my freedv_eth program which uses the codec_tx and codec_rx
> functions when transmitting/receiving in freedv mode.
> In order to build a freedv parrot repeater you could use the same setup
> with a few modifications:
> - Set rx_mode and tx_mode to freedv (obviously)
> - Connect a different radio (SSB capable)
> - Link to a parrot reflector such as parrot.pe1rxq.ampr.org (9990) or
> create a new one dedicated to freedv.
>
> There is a caveat at the moment though: I have not had time yet to
> integrate the new 700D mode, it is capable of the 'older' modes though.
> Also the signal detector (or squelch) is tuned for my 2400B setup,
> the levels might need tweaking for other modes. I plan to integrate
> 700D soon, it should be a nobrainer to add to freedv_eth, and on
> first look it shouldn't be hard to modify the codec_rx and codec_tx functions.
>
> If you don't use a Raspberry Pi most of the steps would still stay
> pretty much the same.
>
> 73,
> Jeroen
>
> On 07/11/2018 01:52 AM, David Rowe wrote:
> >> This is where I need help. Looking into "freedv_api.c" I can't find
> >> where the ofdm_demod()
> >> puts the data and thus how to do, what I want to do ie. remodulate so as
> >> to have the error
> >> correction done. I believe the data is in the structure type freedv "f".
> > Our emails of 5 July describe how to extend freedv_codecrx() to support
> > 700D. The demodulated and error corrected payload codec bits are placed
> > into f->packed_codec_bits.
> >
> > They are then returned via the freedv_codecrx() to the caller.
> >
> > IIRC Jeroen did some work in this area and there are examples in
> > freedv_tx.c and freedv_rx.c of sending data. Those unit tests would be
> > a good place to test any changes.
> >
> > Or perhaps implement the parrot repeater using the 1600 modem or similar
> > as a first step, as support exists for that in the freedv_api.
> >
> > - David
> >
> > ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Freetel-codec2 mailing list
> > Freetel-codec2@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/freetel-codec2
> >
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Freetel-codec2 mailing list
> Freetel-codec2@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freetel-codec2
Alan
Evil flourishes when good men do nothing.
Consider the Christmas child.
---------------------------------------------------------------------------
Alan Beard Unix Support Technician from 1984 to today
70 Wedmore Rd. Sun Solaris, AIX, HP/UX, Linux, SCO, MIPS
Emu Heights N.S.W. 2750 Routers, terminal servers, printers, terminals etc..
+61 2 47353013 (h) Support Programming, shell scripting, "C", assembler
0414 353013 (mobile) After uni, electronics tech
// Alan
int freedv_get_rx_codec_bits (struct freedv *f, unsigned char *bits_rx) {
memcpy(bits_rx, f->packed_codec_bits, f->nbyte_packed_codec_bits);
return f->nbyte_packed_codec_bits; }
int freedv_get_rx_codec_bits700D (struct freedv *f, unsigned char *bits_tx) {
memcpy(bits_tx, f->packed_codec_bits_tx, f->nbyte_packed_codec_bits);
return f->nbyte_packed_codec_bits; }
// Alan
int freedv_get_rx_codec_bits (struct freedv *freedv, unsigned char *bits_rx);
int freedv_get_rx_codec_bits700D (struct freedv *freedv, unsigned char *bits_tx);
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2