Hi all,
Major system crash, the SD card in my Odroid N2 crashed and so did the
switchmode p/s ??
I wrote a new SD card, found another p/s, running, loaded dev libraries
recompiled.
Still the same, freedv_rawdatarx() doesn't always return 14 bytes or a multiple
??
So my read-back may well be out of sync with the codec2 frames.
At this point, I'm not a good enough C programmer.
Alan VK2ZIW
On Fri, 3 Jul 2020 13:56:11 +1000, Al Beard wrote
> Hi Jeroen, David and developers,
>
>
> In the old, code on SourceForge SVN 3955, in freedv_api.c we have clearly
> defined locations of rx "packed_bits".
>
>
> f->packed_codec_bits = (unsigned char*)malloc(nbyte*sizeof(char));
> if (f->packed_codec_bits == NULL) return(NULL);
>
> So, to get said "packed_codec_bits" I added a function to the end of
> freedv_api.c and defined in .h
>
>
> So, in the new API, how do I extract 700C frames out from freedv_rawdatarx() ?
>
>
> I'd be happy with unpacked bits as the routine to pack is easy.
>
>
> BTW: my "parrot.c" code is taken from current "freebeacon.c" code, mode set
> to 700D.
>
>
>
>
> ==== last email ====
> It all looks to be working until.......
>
>
> 1) the received packed bits file is rubbish.
> 2) transmitting out the packed bits, doesn't read down my buffer quick enough.
> 3) squelch does not work properly. Sync stays up on noise. A quick whistle
> will get it out of sync. I've set squelch_en = 1 and given it a level.
>
>
> usage: ./parrot --dev 5 -v
>
>
> speaker to mic from file ve9qrp_700d.wav
>
>
> Compiling:
> Add parrot.c to freebeacon and add this to CMakeLists.txt
>
>
>
> ############ Parrot ################
> add_executable(parrot parrot.c)
> target_link_libraries(parrot ${FREEBEACON_LINK_LIBS} codec2)
> if(FREEBEACON_STATIC_DEPS)
> add_dependencies(parrot ${FREEBEACON_STATIC_DEPS})
> endif()
>
>
> install(TARGETS parrot RUNTIME DESTINATION bin)
> -----------
> then, as usual, mkdir build; cd build; cmake ../ ; make
>
> Running FreeDV GUI on the same machine, decodes ve9qrp_700d.wav
> just fine, from the same microphone input.
>
> -------------------------- In the previous parrot version ------------------
> I added a function in freedv_api.c to make available the packed_bits and that
> worked.
>
> I'm trying to NOT modify the freedv_api.
>
> Alan VK2ZIW
>
>
> On Sat, 27 Jun 2020 21:57:31 +0200, Jeroen Vreeken wrote
> > Hi Al,
> >
> > On first glance your code looks ok.
> > (Haven't looked at the whole thing in detail though)
> >
> > 73,
> > Jeroen PE1RXQ
> >
> > On 06/27/2020 01:37 PM, Al Beard wrote:
> > Hi Jeroen and David,
> >
> >
> > I fixed it, use freedv_rawdatatx().
> >
> >
> > Anyway, it compiles and needs testing.
> >
> >
> > Can you look at my code please?
> >
> >
> > Alan VK2ZIW
> >
> >
> >
> >
> > On Sat, 20 Jun 2020 21:56:31 +0200, JeroenVreeken wrote
> > > Hi Al,
> > >
> > > Yes, my repeater code is available,
> > > (https://github.com/JeroenVreeken/eth_ar),but it might be a bit overkill
> > > as it implements everythingneeded for a mixed mode UHF repeater. (And is
> > > poorlydocumented)
> > > But have a look if you get any usefull ideas from it.
> > >
> > > If you are targetting mode 700D for your setup thefreedv_rawdata
> > > functions are probably the best match.
> > > (freedv_datatx won't be usefull as 700D has no dedicatedVHF data channel).
> > > The only additional challenge you have is that you wantto locally listen
> > > to it.
> > > For that you can use the 'use_codecrx==1' snippet offreedv_mixed_rx.c as
> > > an example.
> > > It basicly does the same thing: receive the 'raw' codec2frames and
> > > decodes it to audio using codec2_decode.
> > >
> > > For you parrot repeater you just need one extra step:store the frames and
> > > send them again with freedv_rawdatatx()
> > >
> > > 73,
> > > Jeroen PE1RXQ
> > >
> > > On 06/19/2020 01:52 AM, Al Beard wrote:
> > > Hi Jeroen,
> > > >So what kind of 'data' do you want to repeat?
> > >
> > >
> > > First, the repeater will be on HF,80m, 40m or 20m.
> > > Built already is a MST3 kit alongwith a Banana Pi M2 Berry (Pi clone).
> > > (and a 500Gb spinning hard disk forstorage)
> > >
> > >
> > > What 'data'? Mode 700D, is what I expect is what most activityis.
> > >
> > > > An other thingthey are usefull for are repeaters (like yours and
> > > > mine)where you want to re-transmit the incomming data withoutloosing
> > > > quality by passing through an decoder/encoderagain.
> > >
> > >
> > > I did not know you had "repeater"code.
> > >
> > >
> > > I'm not trying to reinvent thewheel, I'm wanting to implement, build the
> > > saidrepeater.
> > >
> > >
> > > My reasoning in decoding to voicethe received signal is, when at the
> > > repeater site, it'd
> > > be great to be able to listen to theaudio.
> > >
> > >
> > > So, is your "repeater" codeavailable for me to implement.
> > >
> > >
> > > As mentioned, I'm not a "C" guru. Ican "tinker".
> > >
> > >
> > > MRFE6S9160 (somewhat more useful than a 73)
> > >
> > >
> > > Alan VK2ZIW
> > >
> > >
> > > On Thu, 18 Jun 2020 23:23:58 +0200,Jeroen Vreeken wrote
> > > > Hi Al,
> > > >
> > > > You might be confused by the different types of'data' we send.
> > > > A number of modes (2400A, 2400B, 800XA, 6000)have a dedicated data
> > > > channel (David sugested to call itthe 'VHF data channel'). When packets
> > > > of data aretransmitted with it a different sync word is used on airand
> > > > the freedv library will pass the received packets tocallback functions.
> > > > (In case of freedv_mixed_rx thefunction my_datarx())
> > > >
> > > > If such a data frame is received thefreedv_rx/freedv_rawdatarx function
> > > > will return zero toindicate there was no voice payload.
> > > >
> > > > The other modes only have the 'voice' datachannel (and a few varicode
> > > > text bits, which could also becalled 'data').
> > > > When the regular freedv_rx/freedv_tx functionsare used it will always
> > > > contain codec2 or lpcnet frames.
> > > > The freedv_rawdatarx/freedv_rawdatarx work onthe same data, but allow
> > > > you access the 'raw' bits that gointo the actual modem functions.
> > > > They are usefull if you want to send alternatedata (or alternate
> > > > codecs), but there is no way thereceiver 'knows' about this.
> > > > An other thing they are usefull for arerepeaters (like yours and mine)
> > > > where you want tore-transmit the incomming data without loosing quality
> > > > bypassing through an decoder/encoder again.
> > > >
> > > > So what kind of 'data'do you want to repeat?
> > > > Is it the voice codec data? then receivingwith freedv_rawdatarx and
> > > > sending withfreedv_rawdatatx will do the trick and can betriggered by
> > > > varicode text.
> > > > Is it the 'VHF' data channel? then you canuse callback functions for
> > > > the packets. To switch tothe frames instead of voice used freedv_datatx
> > > > insteadof the regular ones.
> > > > Whether 'data' wants to be repeated isindeed a good question, the text
> > > > like you used beforecould work, or in case of the VHF data channel
> > > > youcould select based on the destination address of apacket. (e.g. if
> > > > it is the 'broadcast' address thesender appearently wanted as many
> > > > people to know aspossible)
> > > >
> > > > 73,
> > > > Jeroen PE1RXQ
> > > >
> > > > On 06/18/2020 01:46 PM, Al Beard wrote:
> > > > Hi Jeroen,
> > > > I've just lookedat "freedv_mixed_rx.c" and it looks not to extract
> > > > adata frame,
> > > > only a codec2 frame orframes.
> > > >
> > > >
> > > > In my proposed repeater,once triggered, I'd want to repeat data frames.
> > > > Also, if only data framesare received, how do I determine that this
> > > > datastream
> > > > "wants" to be repeated?
> > > >
> > > >
> > > > Alan VK2ZIW
> > > >
> > > >
> > > > On Thu, 18 Jun 202016:34:25 +1000, Al Beard wrote
> > > > > Hi again Jeroen,
> > > > >
> > > > >
> > > > > Inadding codec2_decode(c2, ...), I now need to addto
> > > > > /usr/local/include/codec2/
> > > > > newamp2.h
> > > > > newamp1.h
> > > > > kiss_fftr.h
> > > > > kiss_fft.h
> > > > > defines.h
> > > > > codec2_fft.h
> > > > > codec2_internal.h
> > > > >
> > > > >
> > > > > and in the end, voidcodec2_decode() does not return how many samples
> > > > > of audio it haddecoded. So, if it were a data frame, it mightreturn
> > > > > zero.
> > > > >
> > > > >
> > > > > Still in progress.So far, it compiles, but not tested.
> > > > >
> > > > >
> > > > > Alan VK2ZIW
> > > > >
> > > > >
> > > >
> > > >---------------------------------------------------
> > > > Alan Beard
> > > >
> > > > OpenWebMail 2.53
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >_______________________________________________
Freetel-codec2 mailing
list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2
> > >
> > > ---------------------------------------------------
> > > Alan Beard
> > >
> > > OpenWebMail 2.53
> > >
> > >
> >
> > ---------------------------------------------------
> > Alan Beard
> >
> > OpenWebMail 2.53
> >
> >
>
> ---------------------------------------------------
> Alan VK2ZIW
>
> OpenWebMail 2.53, nothing in the cloud.
>
>
---------------------------------------------------
Alan VK2ZIW
OpenWebMail 2.53, nothing in the cloud.
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2