Making new block with GRC or write python

Dear List,

To make my question on
https://www.mail-archive.com/[email protected]/msg48001.html more
clear, I would like to add more details.

I want to implement a bidirectional two-way relaying network using 3
USRPs
and GNU Radio. The model is at *attachment 1. *
*1st slot: *Two end nodes (A, B) send information to relay node (R) in
different frequencies. Relay node receives both and make a bitwise XOR
mapping.
2nd slot: Relay node sends the XORed message to end nodes. Each end
nodes
performs another XOR on this message and its original message to extract
information from other end node.

For time synchronization, the following protocol using a beacon added in
relay node has been proposed:
*Node A, B *(see in attachment 2):

  • Wait for beacon
  • Receive beacon
  • Transmit message
  • Wait for message from relay
  • Receive message from relay
  • Restart
    *Node R *(see in attachment 3):
  • Transmit the beacon
  • Wait for the two messages to be received,
  • Check for error
  • Combine the messages,
  • Transmit the combined message,
  • Restart

My question is should I make this process by making some new blocks in
GRC
or writing python script? In addition, how to tell a RX/TX chain to
start/stop since these USRPs work in half-duplex mode?

Thank you so much.
Hoang

Ngo K. Hoang
Faculty of Electronics and Telecommunications -
University of Engineering and Technology (UET) - Vietnam National
University, Hanoi (VNU)
Vice-president of Student Association of UET
Alternative email: [email protected]
Mobilephone: +84.163.682.7874

On Mon, Apr 21, 2014 at 4:47 AM, Hoang Ngo K.
[email protected]wrote:

mapping.

  • Wait for message from relay
    My question is should I make this process by making some new blocks in GRC
    or writing python script? In addition, how to tell a RX/TX chain to
    start/stop since these USRPs work in half-duplex mode?

Thank you so much.
Hoang

Take a look at gr-mac:
https://github.com/jmalsbury/gr-mac

It’s all done in GRC and would be an appropriate starting point. GRC
produces Python code, so you can always take that and work in Python
when
you get into a place with GRC that you can’t do what you want.

Tom

Thank you Tom,

I’ve installed gr-mac and try on running some flow graph.
Some blocks there give output as message, but I want to take complex
samples. How could I convert from message to complex?
I used Message Source for that purpose but this error appears:
*NameError: global name ‘blocks_message_soure_0_msgg_in’ is not defined
*

Best,
Hoang