WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2008-Apr-22 09:14:51

omehanna
Member
From: NU-Egypt
Registered: 2008-Jan-18
Posts: 8

Multi WARP nodes (WARPLab)

Using the WARPLab, I'm thinking of connecting 6 WARP nodes to the same switch and try some stuff. I have some questions regarding this setup:

1. What are the Matlab code modifications required for this setup (How to address each node using Matlab after giving each board a unique address using the on board switches).

2. Is there any restrictions on the number of transmitting nodes and the receiving nodes (must be one to one or could be one to many)?

Offline

 

#2 2008-Apr-24 10:38:00

mduarte
Moderator
Registered: 2007-Feb-05
Posts: 18

Re: Multi WARP nodes (WARPLab)

omehanna wrote:

Using the WARPLab, I'm thinking of connecting 6 WARP nodes to the same switch and try some stuff. I have some questions regarding this setup:

1. What are the Matlab code modifications required for this setup (How to address each node using Matlab after giving each board a unique address using the on board switches).

We have modified the warplab_initialize.m function to facilitate connection to multiple nodes. You can download the new version of this function from here. The source code you are using remains exactly the same except for the warplab_initialize.m function. In other words, updating the warplab_initialize.m function in the source code to the new version doesn't affect any of the other functions in the source code, including the examples.

The socketHandles vector output by the warplab_initialize.m function contains the handles to address the boards based on the unique address specified in the board switches. socketHandles(1) is the handle for the magic sync, socketHandles(2) is the handle for the board showing address 1 in the display, socketHandles(3) is the handle for the board showing address 2 in the display, and in general socketHandles(N+1) is the handle for the board showing address N in the display. (The display is the 7 segment display on the board which shows the address set on the switch on the board).

Some examples on how to use the new warplab_initialize.m function:

1. If you have only two nodes then nothing changes, simply call
[socketHandles, packetNum] = warplab_initialize;
This is how it is used in all the examples and it remains the same with new warplab_initialize.m function, since the default number of nodes is set to 2. Notice that in all of the examples (except the TwoWay example) we used node 1 as transmitter and node 2 as receiver and we define
udp_Tx = socketHandles(2);
udp_RxA= socketHandles(3);

2. If you have more than two nodes, for example 3 nodes, then use
[socketHandles, packetNum] = warplab_initialize(3);
udp_node1 = socketHandles(2);
udp_node2= socketHandles(3);
udp_node3= socketHandles(4);

for 6 nodes use
[socketHandles, packetNum] = warplab_initialize(6);
udp_node1 = socketHandles(2);
udp_node2= socketHandles(3);
...
udp_node6= socketHandles(7);

The name of the variable to which you assing socketHandles(*) doesn't matter, just be consistent in the rest of the code.   


omehanna wrote:

2. Is there any restrictions on the number of transmitting nodes and the receiving nodes (must be one to one or could be one to many)?

There is no such restriction. Remeber that all the boards are programmed with the same bitstream, hence any board can be set as a transmitter or as a receiver. The key steps are enabling the radio path and starting the state machine. If you don't want to use a node then do not enable its radio path and do not start the state machine. The warplab_siso_example_TxRxTwoWay.m is an example in which node 1 is used first as a transmitter and node 2 as a receiver and then node 1 is used as a receiver and node 2 as a transmitter.

Offline

 

#3 2008-Apr-25 06:46:55

omehanna
Member
From: NU-Egypt
Registered: 2008-Jan-18
Posts: 8

Re: Multi WARP nodes (WARPLab)

Thanks for the detailed response

I've tried this and the problem I faced is with the gains of each node. How to assign different gains to each node when more than one transmitting or receiving nodes are working at the same time.

Offline

 

#4 2008-Apr-25 11:51:31

mduarte
Moderator
Registered: 2007-Feb-05
Posts: 18

Re: Multi WARP nodes (WARPLab)

The gains are part of the WARPLab options or parameters. The function warplab_setOptions is used to download the parameters to the boards. In all the examples provided, the parameters in the two boards (all the boards) are set to the same value by using the following lines of code

Code:

   
% Define the options vector; the order of options is set by the FPGA's code (C code)
optionsVector = [CaptOffset TxLength-1 TransMode CarrierChannel (RxGainBB + RxGainRF*2^16) (TxGainRF + TxGainBB*2^16)]; 
% Send options vector to the nodes
warplab_setOptions(socketHandles,optionsVector);

The first argument of the warplab_setOptions function is the node handle and the second argument is the optionsVector. In the above code we are giving as first argument all the socket handles hence the options vector is downloaded to all the boards.

If you want to download the options vector to only one of the nodes, lets say node with handle udp_node3, then you can use the warplab_setOptions function in the following way:

Code:

 warplab_setOptions([0 udp_node3],optionsVector);

* The zero in the first argument will be ignored but it is required due to the way the warplab_setOptions function reads the first argument.
* udp_node3 must be a valid handle assigned as explained before (for example udp_node3= socketHandles(4);).
* The options vector must be created in the following way:

Code:

optionsVector = [CaptOffset TxLength-1 TransMode CarrierChannel (RxGainBB + RxGainRF*2^16) (TxGainRF + TxGainBB*2^16)];

The order of the elements in the options vector does matter  (the order must match the order set in the FPGA's C code). Notice that even if you only want to download to the node the value of one parameter (the RxGainBB, for example) you still have to download the entire options vector again, so make sure that all the parameters in the options vector are set to the right values before downloading the optionsVector to the node. In future versions of the source code we will provide a function that allows you to download only one parameter at the time.

Offline

 

Board footer