FSK modulation

Hi,

I would like to ask a few questions regarding USRP, UHD and GNU Radio.
I have 2 USRP devices and one module I bought that’s able transmitt and
receive on 433.92 MHz. I installed UHD on 2 computers (both with Win XP
OS), connected to each one a USRP1 that has a WBX daughterboard and a
Log Periodic type antenna by Kent Electronics that’s on Ettus order
page. Both USRP’s are recognized.

  1. I would like to send some data packets that will have FSK and GFSK
    modulation. With one USRP I will receive data coming from the module and
    data coming from the second USRP. Each packet will have some data in it
    to be identified, so that I could log it. As I am a newbie I would like
    to ask if there are any test examples for GRC or simply Python to modify
    it to meet my requirements. Honestly I don’t know where to start. There
    are blocks for AM, FM, DPSK, GMSK, QAM and others, each one heaving a
    MOD and DEMOD block but no blocks for FSK.

  2. My packets will have the following layout a Preamble, a Header for
    identification, a number of bytes of data, and CRC data at the end. At
    transmitter I send data packets (many 1/0 values that are put on a
    carrier signal - in FSK signal we have a frequency for the 1 and a
    different frequency for 0). If there were a block to demodulate FSK
    modulated sugnals it would pass me some 1 0 1 0 1 1 0 1 1 1 1 1 0 0 1
    … from which I would have to recognize my header, if I recognize it,
    then the next byte of data should be the representation of the length of
    data, to know how many bytes I will have to receive until I reach to the
    end where I will have to know the length of my CRC data. After I receive
    the CRC the packet is finished, I can process data that I will put
    previously into a buffer and start to interprete bytes of data (who sent
    the packet, etc.). If CRC is not the same as received then it means it
    has errors and data is not usable. Is it correct how
    I’m thinking the problem or I should tink in a different way.

  3. My first steps will be to try some source code in Python but after
    that I plan to make my own interface to control these devices (the
    second USRP and the module). I don’t really know how to get the I/Q data
    from USRP, how to set different parameters likecenter frequencyand
    others. There’s any partial or full documentation related to this. If I
    could use the Visual Studio I would be able to make some GUI. If there’s
    no souce code written for FSK maybe based on other codes written for
    other modulation types, I will make one, but ther’s little chance for
    that to work, anyway I will have to know how to get I/Q data from USRP,
    how to write .rbf file toFPGA, and others.

Thank you very much.

Pascal.

On 29/04/2011 2:05 PM, Pascal M. wrote:

modulation. With one USRP I will receive data coming from the module
and data coming from the second USRP. Each packet will have some data
in it to be identified, so that I could log it. As I am a newbie I
would like to ask if there are any test examples for GRC or simply
Python to modify it to meet my requirements. Honestly I don’t know
where to start. There are blocks for AM, FM, DPSK, GMSK, QAM and
others, each one heaving a MOD and DEMOD block but no blocks for FSK.
One thing to observe is that FM and FSK are essentially the same thing,
with FM having a “continuous” modulation input, and FSK having
a “discrete” (1s and 0s) input.
rors and data is not usable. Is it correct how I’m thinking the problem
or I should tink in a different way.
to get I/Q data from USRP, how to write .rbf file to FPGA, and others.

Use the source, Luke. All of the source code for Gnu Radio, UHD, and
the FPGA code is all there. If you want to build your own interface
to the hardware, all the information is there, in the form of the
source code, to do so. But I have to ask–why? Unless you have some
very-stringent requirements, it doesn’t sound like what you want to
do can’t be accomplished with UHD+Gnu Radio. In terms of interesting
intellectual exercises, I can think of others that would be more
productive than re-inventing Gnu Radio and UHD.

Hi Marcus,

yes I read a while ago and I will use code from FM.

GNURadio is a very interesting software development toolkit. It’s very
usefull when trying to make some research, to try out many interesting
things, but if you intend to make something that will be installed on
certain computers in hundreds of different locations, you can’t tell
that they should install GNURadio, and install Python and Install I
don’t know how many dependencies, and an application will run some
python code that will glue together some functions written in C++ and so
on; you have to give a single executable, that will interact with some
DLL files like the UHD to get data from different SDR platforms (the
USRP in my case or maybe other Ettus devices).

In Visual Studio I can make a professional GUI. As you said, yes I can
use UHD to program USRP’s FPGA, to get I/Q data and after that I could
make my own software (containing GNURadio source code) to be able to do
many interesting things. Anyway if GNURadio is compiled
(gnuradio-core.dll) I could call functions directly from this DLL (I saw
how functions are exported), anyway I don’t know if functions use
anything from boost and other libraries. So the idea is to be able to
make own GUI in Visual Studio not python, to use functions from these
libraries (UHD, gnuradio-core and others that might help) to make a
fully functional software without the need to install Python; I will use
some custom scripting language to set different parameters and specify
some other libraries to modulate/demodulate or respectively
encode/decode data.

The only thing to make my custom software is to find out how to use and
how to call different functions from compiled DLL files and for this I
will use example source codes.

So as a final word GNURadio together with UHD are very valuable, what I
don’t like is python, and the idea that I would have to run some extra
program to glue together C++ blocks, I like native code :). Anyway at
the beginning I will use these tools to learn, and to make the project,
after that I will move everything to my software. I was only interested
if what I described at point nr. 2 is correct, with the received data,
and the logic.

Thanks you Marcus for your answers. Have a nice day.

Pascal.


From: Marcus D. Leech [email protected]
To: [email protected]
Sent: Friday, April 29, 2011 9:18 PM
Subject: Re: [Discuss-gnuradio] FSK modulation

On 29/04/2011 2:05 PM, Pascal M. wrote:
Hi,

I would like to ask a few questions regarding USRP, UHD and GNU Radio. I have 2
USRP devices and one module I bought that’s able transmitt and receive on 433.92
MHz. I installed UHD on 2 computers (both with Win XP OS), connected to each one a
USRP1 that has a WBX daughterboard and a Log Periodic type antenna by Kent
Electronics that’s on Ettus order page. Both USRP’s are recognized.

  1. I would like to send some data packets that will have FSK and GFSK modulation.
    With one USRP I will receive data coming from the module and data coming from the
    second USRP. Each packet will have some data in it to be identified, so that I
    could log it. As I am a newbie I would like to ask if there are any test examples
    for GRC or simply Python to modify it to meet my requirements. Honestly I don’t
    know where to start. There are blocks for AM, FM, DPSK, GMSK, QAM and others, each
    one heaving a MOD and DEMOD block but no blocks for FSK.
    One thing to observe is that FM and FSK are essentially the same thing,
    with FM having a “continuous” modulation input, and FSK having
    a “discrete” (1s and 0s) input.
    rors and data is not usable. Is it correct how I’m thinking the
    problem or I should tink in a different way.
  1. My first steps will be to try some source code in Python but after that I plan
    to make my own interface to control these devices (the second USRP and the
    module). I don’t really know how to get the I/Q data from USRP, how to set
    different parameters likecenter frequencyand others. There’s any partial or full
    documentation related to this. If I could use the Visual Studio I would be able to
    make some GUI. If there’s no souce code written for FSK maybe based on other codes
    written for other modulation types, I will make one, but ther’s little chance for
    that to work, anyway I will have to know how to get I/Q data from USRP, how to
    write .rbf file toFPGA, and others.

Use the source, Luke. All of the source code for Gnu Radio, UHD, and the
FPGA code is all there. If you want to build your own interface
to the hardware, all the information is there, in the form of the
source code, to do so. But I have to ask–why? Unless you have
some
very-stringent requirements, it doesn’t sound like what you want
to do can’t be accomplished with UHD+Gnu Radio. In terms of
interesting
intellectual exercises, I can think of others that would be more
productive than re-inventing Gnu Radio and UHD.

run some python code that will glue together some functions written in
anything from boost and other libraries. So the idea is to be able to

Pascal.

While I agree that the GUI elements within Gnu Radio leave something to
be desired in terms of functionality and beauty, I think that concepts
within Gnu Radio+UHD are quite sound, and it would be a shame to
abandon them.

I have my own application that uses Gnu Radio “under the skirts”, but
uses an entirely different GUI, based on XForms, and it communicates
with the Gnu Radio flow-graph (which was constructed with GRC) via
both the XMLRPC server code, and FIFO files (although this is for
Linux, not Windows).

But you should also know that you no longer need to use Python to
“string together” underlying C++ blocks. It can all be done from
C++ these days. There are some hierarchical blocks that were only
implemented in Python, but all of the core “stuff” you can string
together using C++, instead of Python.

Feel free to build your application any way you want, but the fact is
that, these days, just about all software has a daunting
dependency graph. Fact of life. You can either re-invent
everything within your own code, so that it’s standalone, or you can
rely on the excellent work of others, and focus more on whatever
functionality you’re bringing to the table.

HI Pascal,

If you google for GRC tutorials, you should easily find some good ones
on the web. FSK is definitely possible to the best of my knowledge.

Data packets with header,… CRC can be transmitted but I think you need
to store the bit sequence in a file and the received and demodulated
data also gets stored in a file. I think it might be possible to
dynamically generate CRC, data and all, but this needs some special
custom block at least within GRC (anyone please feel free to correct
me). If you do figure out how to do this, please do write up a tutorial
on this :slight_smile:

You can easily get I/Q data at least with python and GRC. Alexandru
Csete, a poster on this forum has written some good examples that cover
all of the above (you can easily google his website and download all the
GRC examples that he has written; thank you Alex!!).

Best regards,
-Vijay

— On Fri, 4/29/11, Pascal M. [email protected] wrote:

From: Pascal M. [email protected]
Subject: [Discuss-gnuradio] FSK modulation
To: “[email protected][email protected]
Date: Friday, April 29, 2011, 2:05 PM

Hi,
I would like to ask a few questions regarding USRP, UHD and GNU Radio.
I have 2 USRP devices and one module I bought that’s able transmitt and
receive on 433.92 MHz. I installed UHD on 2 computers (both with Win XP
OS), connected to each one a USRP1 that has a WBX daughterboard and a
Log Periodic type antenna by Kent Electronics that’s on Ettus order
page. Both USRP’s are recognized.

  1. I would like to send some data packets that will have FSK and GFSK
    modulation. With one USRP I will receive data coming from the module and
    data coming from the second USRP. Each packet will have some data in it
    to be identified, so that I could log it. As I am a newbie I would like
    to ask if there are any test examples for GRC or simply Python to modify
    it to
    meet my requirements. Honestly I don’t know where to start. There are
    blocks for AM, FM, DPSK, GMSK, QAM and others, each one heaving a MOD
    and DEMOD block but no blocks for FSK.
  2. My packets will have the following layout a Preamble, a Header for
    identification, a number of bytes of data, and CRC data at the end. At
    transmitter I send data packets (many 1/0 values that are put on a
    carrier signal - in FSK signal we have a frequency for the 1 and a
    different frequency for 0). If there were a block to demodulate FSK
    modulated sugnals it would pass me some 1 0 1 0 1 1 0 1 1 1 1 1 0 0 1
    … from which I would have to recognize my header, if I recognize it,
    then the next byte of data should be the representation of the length of
    data, to know how many bytes I will have to receive until I reach to the
    end where I will have to know the length of my CRC data. After I receive
    the CRC the packet is finished, I can process data that I
    will put previously into a buffer and start to interprete bytes of data
    (who sent the packet, etc.). If CRC is not the same as received then it
    means it has errors and data is not usable. Is it correct how I’m
    thinking the problem or I should tink in a different way.
  3. My first steps will be to try some source code in Python but after
    that I plan to make my own interface to control these devices (the
    second USRP and the module). I don’t really know how to get the I/Q data
    from USRP, how to set different parameters likecenter frequencyand
    others. There’s any partial or full documentation related to this. If I
    could use the Visual Studio I would be able to make some GUI. If there’s
    no souce code written for FSK maybe based on other codes written for
    other modulation types, I will make one, but ther’s little chance for
    that to work, anyway I will have to know
    how to get I/Q data from USRP, how to write .rbf file toFPGA, and
    others.
    Thank you very much.
    Pascal.
    -----Inline Attachment Follows-----

On 26 Jul 2012 13:26, Joana Gonçalves wrote:

Hello, I am trying
to use GRC to demodulate FSK signal. I use the USRP1 to receive data
from the radio and I can see when the radio is transmitting or not
trough FFT Sink. The problem is that I need to copy to a file what the
radio is sending and I can t receive the correct data . I attached my
block diagram.

I’m looking forward to your helpful.

Regards

Jo

Well, for one, your scope sink is being lied to about what the
actual sample rate is. How does the sample stream get to 57.6ksps from
2M?

Why are you subtracting a constant “9” from the output of the
demod?

Jo -

You’ll need to provide more details. You are clearly dumping the data
to a
file, but what is wrong with the samples? Have you plotted the samples
in
your file and confirmed that it at least looks how you expect it to?
Are
you getting the number of samples you expect? Is it the right data
type?

You’ll need to do some more investigating and provide more details for
us
to be able to help you.

Cheers,
Ben

On Thu, Jul 26, 2012 at 10:26 AM, Joana Gonalves <

Joana -

I am not familiar with the software you are using or the radio you are
using to transmit, so I can’t help on that end.

Again, have you tried plotting the samples you are taking, either on an
FFT
or a Scope, to see what you are getting? What analysis have you done on
your samples to figure out what is happening, and what have you
discovered?

It will be impossible for anyone to help you if all we know is “this is
my
flowgraph and the samples aren’t right”. To get good help, you really
need
to start investigating stuff, and sharing information you find in hopes
that someone will recognize what might be happening.

Cheers,
Ben

On Fri, Jul 27, 2012 at 2:59 AM, Joana Gonalves <