discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] PSK31 (from audio to radio)


From: Cinaed Simson
Subject: Re: [Discuss-gnuradio] PSK31 (from audio to radio)
Date: Sat, 10 Sep 2016 15:29:53 -0700
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 09/09/2016 06:40 PM, pen tester wrote:
> Hi,
>    Still playing around and I have a question about the value which
> should go in the Polyphase Resampler on the tx side please. Any advice
> on the AM rx too would be helpful :-)

Looking at transmit.

It appears you start with something in memory so call the initial
pressure x - it will be likely be as fast as it can go.

Next is a resampler which bumps up the sampling rate to x*32.

Skipping the filter - which is a can of worms in itself - the next
resampler bumps up the sampling rate to x*32*48.

So before you get to the multiply, you appear to have some serious
plumbing problem.

Also, I wouldn't be calling math functions to calculate tap values on a
filter. I'd recommend calculation those taps by hand inserting the
values in the filter.

I recommend simplifying it by calculating the everything in front of the
first resampler and stick in a file - create a little back pressure.

And then I would move the FIR filter on the side of the resamplers which
you expect to have the highest sampling rate - which makes one of those
resamplers redundant.

Suppose you can suck in the contents of the file on the filesystem at a
sampling rate of 32k. Then you would need a resampler which decimates at
32k and interpolates at 48k - or interpolates at 3 and decimates at 2 -
to match 32k to 48k.

Now the osomo sink is sampling at 1.2 Hz.

My guess is the 1.2 Hz a mistake - you appear to have meant 1.2 MHz (or
1.2e6) in which case you need to interpolate at 25 and decimate at 1 to
match 48k to 1.2M.

Disclaimer: don't confuse me with someone who knows what they're talking
about - I'm just making this up as I go along. It's simply what I would
do to clean it - it may be wrong.


> 
> Transmit
> 
>   * Simply trying make the working PSK31 audio tx to tx over HackRF
>     instead using [1] and updates from Tim's response
>   * Screenshot: http://pasteboard.co/1dLjHxMAU.png
> 
> 
> Receive
> 
>   * Simply trying to make the working PSK31 audio rx work using a RTLSDR
>     instead based on [2]
>   * The first line is an attempt to take in the AM signal and just pass
>     it on to [2]
>   * For the AM rx, I used [3] as a guide
>   * Screenshot: http://pasteboard.co/1dLZWV9mv.png
> 
> 
> [1] https://github.com/tkuester/gr-psk31/
> <https://github.com/tkuester/gr-psk31/> (examples/psk31_tx.grc)
> [2] https://github.com/tkuester/gr-psk31/
> <https://github.com/tkuester/gr-psk31/> (examples/psk31_rx.grc)
> [3] https://www.csun.edu/~skatz/katzpage/sdr_project/sdr/grc_tutorial3.pdf
> <https://www.csun.edu/%7Eskatz/katzpage/sdr_project/sdr/grc_tutorial3.pdf> 
> 
> On 6 September 2016 at 05:49, pen tester <address@hidden
> <mailto:address@hidden>> wrote:
> 
>     Tim,
>        Yes, your graphs are really useful :-) Thank you for responding
>     in such detail! 
> 
>        Here is what I am up to:
> 
>     Transmit side:
> 
>       * I made your changes to your transmit graph [1]
>       * All the changes were fine but I was confused about the use of
>         the Polyphase Resampler as I could not get the values to work
>         without underflows when executing i.e. "UUUU..."
>       * So instead (this is probably wrong) I tried using a Rational
>         Resampler with an Interpolation of 1e6 and a Decimation of 48e3.
>       * Updated version: http://pasteboard.co/hmyGOGTE4.png
>         <http://pasteboard.co/hmyGOGTE4.png>
>       * Either way, the tx graph looks healthier - just need some advice
>         on the resampler perhaps?
> 
> 
>     Receive side:
> 
>       * I am using the start of this receive graph [2] as it was using
>         radio rx already 
>       * and just modifying the demod portion to be more like your rx graph 
>       * Updated version: http://pasteboard.co/hmzrMBAIi.png
>         <http://pasteboard.co/hmzrMBAIi.png>
>       * I also need advice from anyone who could point in the right
>         direction on the AM rx side please?
> 
> 
>     [1] https://github.com/tkuester/gr-psk31/
>     <https://github.com/tkuester/gr-psk31/> (examples/psk31_tx.grc)
>     [2] https://github.com/argilo/sdr-examples
>     <https://github.com/argilo/sdr-examples> (tutorial/6_psk.grc)
>     [3] https://github.com/tkuester/gr-psk31/
>     <https://github.com/tkuester/gr-psk31/> (examples/psk31_rx.grc)
> 
>     On 4 September 2016 at 12:33, Tim K <address@hidden
>     <mailto:address@hidden>> wrote:
> 
>         Hey hey!
> 
>         Glad to see someone using this. (And that it's apparently still
>         working! Goodness... I need to clean this up...)
> 
>         I'm giving advice freehand right now, as I don't have my radios
>         with me to test this. There are definitely more elegant ways for
>         this solution, this is just the quickest I could think of
>         without reverse engineering what I wrote forever ago.
> 
>         Since this is AM, I think you'll only need the Real port on your
>         "Float to Complex" block. You can attach the "Null Source" to
>         the Imaginary port. Do a quick check to make sure the real
>         signal's not exceeding +/- 1... you might want to attenuate it
>         to +/- 0.7 for now, someone else should comment.
> 
>         As far as the transmit side goes, I'd leave everything up to the
>         "Multiply" block untouched. Consider that your "audio input" to
>         the radio. After that...
>          - Multiply Const (set to 0.7 for safety)
>          - Polyphase Resampler (float/float) set to (1e6 / 48e3) - This
>         gets your sample rate up to radio speeds
>          - Float to Complex (in the Real port, Null Source to the Imag
>         port) - This makes your signal "complex AM"
>          - Send the Complex stream into your Osmocom Sink (set to 1e6
>         sps) - And transmit!
> 
>         If I remember correctly, some radios don't like working at
>         non-integer sample rates. (The hackRF may be ok though...)
> 
>         Play gently with your TX gain until you can see it on another
>         radio. (IIRC the HackRF is simplex... perhaps an RTL?) Use AM to
>         demodulate.
> 
>         I've been meaning to do a write up on this for a while. If I
>         ever get around to it, I'll make sure to CC you.
> 
>         - Tim
> 
> 
>         On Fri, Sep 2, 2016 at 11:55 PM, pen tester
>         <address@hidden <mailto:address@hidden>> wrote:
> 
>             Hi,
>             I am trying to get a simple working example of PSk31 working
>             (transmitting with a hackrf and receiving with a rtlsdr
>             dongle). Here is what I have so far.
> 
> 
>             Working PSK31 tx and rx with a sound card
>             ==========================================
>             Transmit: https://github.com/tkuester/gr-psk31/
>             <https://github.com/tkuester/gr-psk31/> (examples/psk31_tx.grc)
>             Receive: https://github.com/tkuester/gr-psk31/
>             <https://github.com/tkuester/gr-psk31/> (examples/psk31_rx.grc)
> 
>             These work great for sending a PSK31 message over audio card
>             and receiving with the audio card.
> 
>             I just slightly modified them to take input from the "Audio
>             Source" block instead of a "Wav File Source" to use the
>             sound card directly:
> 
>             Transmit Graph:
>             http://www.megafileupload.com/7sm9/psk31_tx.grc
>             <http://www.megafileupload.com/7sm9/psk31_tx.grc> 
>             Transmit Image: http://pasteboard.co/giNm3kNzC.png
>             <http://pasteboard.co/giNm3kNzC.png> or
>             http://www.megafileupload.com/7smc/psk31_tx-audiocard.png
>             <http://www.megafileupload.com/7smc/psk31_tx-audiocard.png>
> 
>             Receive Graph:
>             http://www.megafileupload.com/7sma/psk31_rx.grc
>             <http://www.megafileupload.com/7sma/psk31_rx.grc>
>             Receive Image: http://pasteboard.co/giOlxtWUf.png
>             <http://pasteboard.co/giOlxtWUf.png> or
>             http://www.megafileupload.com/7smb/psk31_rx-audiocard.png
>             <http://www.megafileupload.com/7smb/psk31_rx-audiocard.png>
> 
>             Turning up the audio a little and tuning to 2003 approx on
>             the rx graph results in reception of the sent message "Hello
>             World!"
> 
> 
> 
>             Reference version for using hackrf instead of sound card
>             ==========================================================
>             Next, I wanted to modify these to audio versions to work
>             over Radio using a HackRF and RTLSDR dongle.
> 
>             These graphs seems very useful but I couldn't get it working
>             end to end for some reason.
> 
>             Transmit: https://github.com/argilo/sdr-examples
>             <https://github.com/argilo/sdr-examples> (multi_tx.grc)
>             Receive:  https://github.com/argilo/sdr-examples
>             <https://github.com/argilo/sdr-examples> (tutorial/6_psk.grc)
> 
>             I made some changes to the freq to be in range for RTLSDR
>             .e.g changed freq from 441e6 in ref graph, changed to 841e6. 
> 
> 
> 
>             My merged attempt
>             =================
>             The attempt I am currently trying to get working is based on
>             the audio soundcard flies for the transmit:
> 
>             Transmit: Using  audio tx (psk31_tx_attempt2): where I just
>             replaced the audio sink with the Osmocom sink (not sure what
>             else is needed here for transmission over hackrf)
> 
>             Transmit Graph:
>             http://www.megafileupload.com/7smi/psk31_tx-attempt2.grc
>             <http://www.megafileupload.com/7smi/psk31_tx-attempt2.grc>
>             Transmit Image: http://pasteboard.co/giOMGNqD9.png
>             <http://pasteboard.co/giOMGNqD9.png> or
>             http://www.megafileupload.com/7sme/psk31_tx-attempt2.png
>             <http://www.megafileupload.com/7sme/psk31_tx-attempt2.png>
> 
>             Receive Graph:
>             http://www.megafileupload.com/7smh/6_psk-hackrf.grc
>             <http://www.megafileupload.com/7smh/6_psk-hackrf.grc>
>             Receive Image: http://pasteboard.co/giPflR4TI.png
>             <http://pasteboard.co/giPflR4TI.png> or
>             http://www.megafileupload.com/7smf/6_psk_hackrf.png
>             <http://www.megafileupload.com/7smf/6_psk_hackrf.png>
> 
>             For the receive, I just left radio rx part in and replaced
>             the decoder parts with decoding logic from
>             https://github.com/tkuester/gr-psk31/
>             <https://github.com/tkuester/gr-psk31/>
>             (examples/psk31_rx.grc). I made other minor changes such as
>             freq and sample rates.
> 
> 
> 
>             My question
>             ============
>             So in summary, just looking for a little guidance on my
>             merged attempt to get psk31 out over a hackrf and received
>             using a RTLSDR. Any advice for a learner would be great :-)
> 
> 
> 
>             _______________________________________________
>             Discuss-gnuradio mailing list
>             address@hidden <mailto:address@hidden>
>             https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>             <https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]