[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Socket in GNU
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Socket in GNU |
Date: |
Wed, 5 Sep 2007 14:06:20 -0700 |
User-agent: |
Mutt/1.5.9i |
On Wed, Sep 05, 2007 at 04:26:09PM -0400, KC Huang wrote:
> Hi:
>
> I want to use Click to implement MAC and GNUradio to implement PHY, which are
> connected by unix socket. Now, I have written a client socket in C++ signal
> block of GNU and a server socket in Click. But I don't know what should I do
> next in Gnuradio? Should I have to connect this socket
> to "gr_file_descriptor_source(or sink)"? or what should I do that can let
> Click to control the packet in GNU?
>
> Any Comments will be appreciated!!
> Thanks!
> KC Huang
Hi KC,
Sorry for the delay getting back to you.
You really didn't need a client socket block in GNU Radio, you could
have created the socket in python, then passed the file descriptor to
gr_file_descriptor_*, or more likely, just have handled the socket i/o
between Click and GNU Radio in Python.
If you haven't already, I suggest you take a look at
gnuradio-examples/python/digital/{benchmark_rx,benchmark_tx,tunnel}.py
and see how we move packets between Python and the PHY implemented in
GNU Radio.
tunnel.py uses the tap/tun interface to get packets to/from the
kernel. In your case, instead of using tap/tun, just use your unix
domain socket. tunnel.py implements a carrier sense MAC.
You'll want to ignore that, and concentrate on the flow of packets
between the kernel, the python code and the PHY implemented in GNU
Radio. What you're trying to do is quite similar.
Eric