Forum: GNU Radio MAC physical interface GNU Radio.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
693b1f5a410ceaa1ea5831359e6fc6e1?d=identicon&s=25 Radha Krishna Ganti (Guest)
on 2008-12-05 00:29
(Received via mailing list)
Hello all,

   I am kind of new to gnu radio. I want to implement a   CSMA/CA type
MAC
protocols  on the radio.
I have some basic questions regarding the implementation.

1) How easy is to implement a  packet based CSMA/CA on the gnu radio? Is
there any existing  code  that  is public?

2) Reading all the mailing lists, I have seen that most  people
implement
the CSMA type MAC protocols in Click modular router
and then interface it to the  gnuradio (UT Austin fellows have done
this).
How easy is this interface? Is it straight forward?
Can some one point me to such an existing interface?

3) What do you recommend?  In our experiments the physical layer will be
controlled by the mac and we would also want constant control
information
from the physical layer.

         a) Gnuradio (CSMA+PHY)

          b) Gnuradio (PHY) + Click modular router (CSMA/routing).

4) I have read in some posts about the inband-signaling code. Where can
I
find more information about what it is? Will this solve the problems I
have
mentioned above without using click.




Thanks a lot in anticipation
-RadhaKrishna Ganti
D0072e69d706bb3ca211d33a1b536e2c?d=identicon&s=25 Johnathan Corgan (Guest)
on 2008-12-06 19:14
(Received via mailing list)
On Thu, 2008-12-04 at 18:29 -0500, Radha Krishna Ganti wrote:

> 1) How easy is to implement a  packet based CSMA/CA on the gnu radio?
> Is there any existing  code  that  is public?

You can get a basic idea on how to implement CSMA by looking at the GNU
Radio example in the "digital" directory.

Basically, there are two flowgraphs operating in parallel, one for the
TX side and one for the RX side.

The RX flowgraph has a USRP source, PHY demodulator, and packet
deframer.  It terminates in a message sink that turns the received data
into a queue of packets to be queried by non-GNU Radio code.

The TX flowgraph has a message source block into which non-GNU Radio
code deposits packet payloads to be transmitted.  The remainder of the
TX flowgraph graph does the packetization, modulation, and transmission
to the USRP via a sink block.

Both of these flowgraphs are continuously running and in separate
threads.

The CSMA MAC is implemented entirely outside these GNU Radio flowgraphs.
When the upper layer wants to transmit a packet payload, the code
queries a block in the RX flowgraph to determine the current RX channel
power estimation.  If it is below a configurable threshold, the payload
gets deposited into the TX message source queue.  If the power is above
the threshold, the MAC code exponentially backs off and retries.

The upper layer gets its received payloads (again outside GNU Radio
proper, and in its own thread) by querying the RX flowgraph message
sink.

An important concept to understand here is that GNU Radio itself is only
being used to handle the PHY aspects of the link, and is continuously
running in "background" threads.  The CSMA MAC code is running
independently and is simply calling functions that have been defined
(and made thread-safe) in either the RX or TX flowgraphs to decide what
to do.

This is a very crude MAC, or in the words of Eric Blossom, "the simplest
thing could possibly work."  Still, it illustrates the separation of PHY
and MAC operation.  A more complicated MAC would be implemented as a
state machine that sequences through its logic based on transitions
triggered by packet reception, upper layer TX requests, etc., while the
GNU Radio flowgraphs simply run in the background and do the PHY work.

> I have read in some posts about the inband-signaling code. Where can I
> find more information about what it is? Will this solve the problems I
> have mentioned above without using click.

The in-band signaling code is an effort to add timed transmit and
receive functionality to the existing streaming mode the USRP operates
in.  This is absolutely crucial to implement more complicated MAC
functionality such as TDMA, RTS/CTS, etc.

However, the current GNU Radio "infinite stream" dataflow architecture
is not very well suited to working this way.  An alternative signal
processing graph architecture has been designed, the "mblock" library,
which works entirely in the message passing domain and fits these needs
very well.  The in-band signaling code is built in this domain and works
well.  The mblock domain is also well suited for writing MAC layer code
(this was its original purpose in being created.)

Unfortunately, right now, the choice is to either use the mblock library
or use the existing gr-block library, but not both.  Several attempts
have been made to bridge these two domains but nothing satisfactory has
resulted.  So we are now looking at essentially adding mblock-like
functionality to the existing gr-block library.  The lack of this
integration has prevented any real adoption of the mblock architecture.

Once this is done, it will very straightforward to implement either
streaming or message passing semantics (or both) in a gr-block.  Writing
integrated PHY/MAC code will be much simpler.

Regarding the Click code, I don't have enough experience with it to
really say, but one thing going for it is that it exists, is debugged,
and has been bridged to existing GNU Radio PHY code successfully.  So,
if you're trying to get something done now, that will save you a lot of
time.

If you're willing to work on the bleeding edge, you can work with us as
we start with the above additions to the gr-block architecture.

-Johnathan
Bfd4cab4e5b485b5db6e975ecda6ed7a?d=identicon&s=25 vibha s. (vibha_s)
on 2013-08-29 11:39
Hello all,

   I am kind of new to gnu radio. I want to implement a   CSMA/CA type
MAC
protocols  on the radio.
I have some basic questions regarding the implementation.

1) How easy is to implement a  packet based CSMA/CA on the gnu radio? Is
there any existing  code  that  is public?

2) Reading all the mailing lists, I have seen that most  people
implement
the CSMA type MAC protocols in Click modular router
and then interface it to the  gnuradio (UT Austin fellows have done
this).
How easy is this interface? Is it straight forward?
Can some one point me to such an existing interface?

3) What do you recommend?  In our experiments the physical layer will be
controlled by the mac and we would also want constant control
information
from the physical layer.

         a) Gnuradio (CSMA+PHY)

          b) Gnuradio (PHY) + Click modular router (CSMA/routing).
This topic is locked and can not be replied to.