WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2016-Feb-04 08:31:30

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Experiment with TokenMAC

Hi,
    I am using Mango 802.11 Reference Design v1.3 for the TokenMAC tutorial. I made all the changes to the design as described in the tutorial. But when I program one WARP v3 node as AP and another WARP node as STA , the STA are not associating with the AP at boot time. The left most DIP switch at AP and STA are in low state. But when I am using 802.11 Reference Design v1.3 without any change for TokenMAC, The STA can associate the AP at boot time.

Following is the output for STA at terminal

----- Mango 802.11 Reference Design -----
----- v1.3 ------------------------------
----- wlan_mac_nomac --------------------
Compiled Feb  4 2016 21:05:14

Note: this UART is currently printing from CPU_LOW. To view prints from
and interact with CPU_HIGH, raise the right-most User I/O DIP switch bit.
This switch can be toggled live while the design is running.

AD Readback: 0x0000002B
Initialization Finished


I don't know what this means "AD Readback: 0x0000002B".
Please help me. I spend lot of time for this issue but stuck here.

This implementation will be very helpful as I am working in a project which requires a Centralized TDMA based MAC protocol.

Thanks,
Kanchan

Last edited by kanchan (2016-Feb-04 10:53:55)

Offline

 

#2 2016-Feb-04 11:07:59

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Experiment with TokenMAC

1. Is your station receiving beacons from the AP (i.e. are the green LEDs incrementing regularly)?  If not, then check that the code you added to main() in wlan_mac_nomac.c, i.e.

Code:

    in_reservation = 0;
    wlan_mac_low_set_new_reservation_callback((void*)token_new_reservation);
    wlan_mac_low_set_adjust_reservation_ts_callback((void*)adjust_reservation_s_end);

occurs after wlan_mac_low_init() (or just before the while(1) loop).  wlan_mac_low_init() initializes all the callbacks to NULL so you need to make sure that the setting of the callbacks occurs after that.  That is an easy mistake to make. 

2. With the way that wlan_mac_low.c, initializes allow_new_mpdu_tx (i.e. to zero), each node starts in a state where it will not be able to transmit anything until it gets permission to do so from the AP through a Token offer.  Also, the AP doesn't offer a Token unless the station is part of its associated stations, so there is a bit of a deadlock at boot which means the AP and STA will not automatically associate.  Now, the best way around this is to use WLAN Exp to set the association state of the AP.  You can see how this is done in one of our examples.  Another way would be to alter the initialization state of the node, so each node has the ability to transmit after boot.  This is not as desirable because there is less control adding new STAs to the BSS, but would allow association without having to use WLAN Exp.

3. You should add a definition for IPC_MBOX_TOKEN_NEW_RESERVATION in the case statement for wlan_mac_high_process_ipc_msg().  This will make sure that there are no warning UART prints in CPU High due to receiving an "Unknown IPC message type":

Code:

		case IPC_MBOX_TOKEN_NEW_RESERVATION:
			// Do nothing
		break;

		case IPC_MBOX_TOKEN_END_RESERVATION:
		    token_new_reservation_callback();
		break;

Offline

 

#3 2016-Feb-04 12:11:30

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi,

   The green LEDs incrementing regularly for initial few second after that halts. I tried to associate the STA to AP using WLAN Exp but I find following error.

import wlan_exp.warpnet.config as wn_config
ImportError: No module named warpnet.config

I have another doubt. Is following the correct order for polling in wlan_mac_nomac.c within main function

while(1){

        //Poll PHY RX start
        wlan_mac_low_poll_frame_rx();
        poll_reservation_time();
        //Poll IPC rx
        wlan_mac_low_poll_ipc_rx();

    }

and wlan_mac_high.c means  wlan_mac_high_ap->wlan_mac_high_framework->wlan_mac_high.c
not the file  wlan_mac_shared->wlan_mac_high_framework->wlan_mac_high.c
   
as well as wlan_mac_low.c means
wlan_mac_low_nomac->wlan_mac_low_framework->wlan_mac_low.cwlan_mac_low.c

and
wlan_mac_ipc_util.h means wlan_mac_shared->wlan_mac-common->include->wlan_mac_ipc_util.h
not the file  wlan_mac_high_ap->wlan_mac_common->include->wlan_mac_ipc_util.h

Sorry for the stupid question.

Please reply.

thanks,
Kanchan

Last edited by kanchan (2016-Feb-04 13:35:17)

Offline

 

#4 2016-Feb-04 14:34:11

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Experiment with TokenMAC

The green LEDs incrementing regularly for initial few second after that halts.

After all the code changes from the Token MAC app note, the steady state of the nodes after boot should have both hex displays show a value of "0" and the green LEDs of the STA should be incrementing regularly indicating it is receiving beacons from the AP.  If you are not seeing this, then there is an issue in the changes you made to the code.  This steady state should continue as long as the nodes are powered on (i.e. the green LEDs should not stop incrementing).

I would suggest using the UART output to see if anything is being printed to the screen.  You can also augment any code with prints if you have a question about behavior (just remember to remove them before starting your experiments).

I tried to associate the STA to AP using WLAN Exp but I find following error.

Are you able to use the examples with the default installation?  From the error message, it looks like you trying to use older code (in v1.3 the "warpnet" directory was changed to "transport" so you will need to update any of your code accordingly).

Is following the correct order for polling in wlan_mac_nomac.c within main function

The order of the polling functions should not matter. 

wlan_mac_high.c means  wlan_mac_high_ap->wlan_mac_high_framework->wlan_mac_high.c not the file  wlan_mac_shared->wlan_mac_high_framework->wlan_mac_high.c

The shared directories are linked within each project.  If you look at the underlying directory structure, there in only one wlan_mac_high.c file and that resides in <install_directory>\Mango_802.11_RefDes_v1.3.0\EDK_Projects\Mango_802.11_RefDes_v1.3.0\SDK_Workspace\wlan_mac_shared\wlan_mac_high_framework\.  This is then linked into each of the projects that needs access to that file by linking the wlan_mac_high_framework directory.  So wlan_mac_high_ap->wlan_mac_high_framework->wlan_mac_high.c  is the same file as wlan_mac_shared->wlan_mac_high_framework->wlan_mac_high.c.  Generally, when you access them through the SDK IDE, I would use the wlan_mac_high_ap->wlan_mac_high_framework->wlan_mac_high.c since the SDK does some under the hood application of #if in order to shade code appropriately.  This is the same for all shared files.

Offline

 

#5 2016-Feb-05 05:33:26

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi,
I made all the necessary change to the code. But still not able to associate the STA to AP. For WLAN Exp when I run blink_node_leds.py the AP node's display blinking but not the STA node's display. And when try to associate the STA to AP using WLAN Exp ,I find the following error.

Resetting the network config for all nodes on network 10.0.0.0.
ERROR:  Node W3-a-00548
    Node is not responding.  Please ensure that the
    node is powered on and is properly configured.


    Error: Max retransmissions without reply from node

ERROR:  Invalid response from node:
        Number of arguments in response ([]) does not match
        number of expected arguments (1)

Response [0] (0 bytes):

Node Types:
    0x00000000 = '{'class': 'Node(network_config)', 'description': 'Default Node'}'
    0x00010101 = '{'class': 'node_ap.WlanExpNodeAp(network_config, defaults.WLAN_EXP_LOW_DCF)', 'description': 'WLAN Exp (AP/DCF) '}'
    0x00010102 = '{'class': 'node_ap.WlanExpNodeAp(network_config, defaults.WLAN_EXP_LOW_NOMAC)', 'description': 'WLAN Exp (AP/NOMAC) '}'
    0x00010301 = '{'class': 'node_ibss.WlanExpNodeIBSS(network_config, defaults.WLAN_EXP_LOW_DCF)', 'description': 'WLAN Exp (IBSS/DCF) '}'
    0x00010202 = '{'class': 'node_sta.WlanExpNodeSta(network_config, defaults.WLAN_EXP_LOW_NOMAC)', 'description': 'WLAN Exp (STA/NOMAC)'}'
    0x00010201 = '{'class': 'node_sta.WlanExpNodeSta(network_config, defaults.WLAN_EXP_LOW_DCF)', 'description': 'WLAN Exp (STA/DCF)'}'
    0x00010302 = '{'class': 'node_ibss.WlanExpNodeIBSS(network_config, defaults.WLAN_EXP_LOW_NOMAC)', 'description': 'WLAN Exp (IBSS/NOMAC) '}'

ERROR:  Node W3-a-00545
    Unknown node type: 0xffffffff

Traceback (most recent call last):
  File "throughput_two_nodes.py", line 64, in <module>
    nodes = wlan_exp_util.init_nodes(nodes_config, network_config)
  File "E:\sdr\EXPERIMENT\created\Mango_802.11_RefDes_v1.4.0\Python_Reference\wlan_exp\util.py", line 434, in init_nodes
    return util.init_nodes(nodes_config, network_config, node_factory, network_reset, output)
  File "E:\sdr\EXPERIMENT\created\Mango_802.11_RefDes_v1.4.0\Python_Reference\wlan_exp\transport\util.py", line 107, in init_nodes
    raise ex.ConfigError(msg)
wlan_exp.transport.exception.ConfigError: Config Error:

ERROR:  Was not able to initialize all nodes.  The following
nodes were not able to be initialized:
    W3-a-00548
    W3-a-00545

However the STA node is properly connected to the switch.


Please help me figure out the problem.

Thanks,
Kanchan

Offline

 

#6 2016-Feb-05 08:29:07

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Experiment with TokenMAC

What version of the reference design are you using? 

The Token MAC App note was built on version 1.3.0.  However, from the code above it looks like you are trying to use version 1.4.0.  You should use version 1.3.0 for your work with the Token MAC App note.  I do not know if there are additional changes needed for the 1.4.0 codebase to make the Token MAC App note work.

It is straight forward to use different versions of the WLAN Exp framework by using the PYTHONPATH variable either on the command line or in an IDE like Spyder.

The Python error looks like you are either not programming your Station correctly or that it is not connected to the host correctly (i.e. the Ethernet B port is not plugged in to the switch used for WLAN Exp).  Each node has a "node type" (i.e. a combination of CPU High and CPU Low projects that is represented by a 32 bit value).  The WLAN Exp framework uses that value to dynamically create the correct class of node for you during initialization.  It looks like your Station did not respond and therefore the code was not able to determine the node type.

When you connect the nodes:
  - AP: 
    - Ethernet A port -- Nothing or Directly to a host computer or Network that can access the internet
    - Ethernet B port -- Switch used for WLAN Exp network
  - STA:
    - Ethernet A port -- Nothing or Directly to a host computer
    - Ethernet B port -- Switch used for WLAN Exp network

Offline

 

#7 2016-Feb-05 09:19:33

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi,
  I am using 802.11 Reference Design v1.3. For WLAN Exp when I run blink_node_leds.py the AP node's display blinking but not the STA node's display. And while running throughput_two_nodes.py I get following error

Initializing experiment

Resetting the network config for all nodes on network 10.0.0.0.
ERROR:  Node W3-a-00545
    Node is not responding.  Please ensure that the
    node is powered on and is properly configured.


    Error: Max retransmissions without reply from node

Initializing W3-a-00548
Traceback (most recent call last):
  File "throughput_two_nodes.py", line 61, in <module>
    nodes = wlan_exp_util.init_nodes(nodes_config, network_config)
  File "E:\sdr\EXPERIMENT\created\Mango_802.11_RefDes_v1.3.0\Python_Reference\wlan_exp\util.py", line 434, in init_nodes
    return wn_util.wn_init_nodes(nodes_config, network_config, node_factory, network_reset, output)
  File "E:\sdr\EXPERIMENT\created\Mango_802.11_RefDes_v1.3.0\Python_Reference\wlan_exp\warpnet\util.py", line 107, in wn_init_nodes
    raise wn_ex.ConfigError(msg)
wlan_exp.warpnet.exception.ConfigError: Config Error:

ERROR:  Was not able to initialize all nodes.  The following
nodes were not able to be initialized:
    W3-a-00545


The node ' W3-a-00545' is the STA node. Only AP node responding. If I interchange the node same thing happens.

Please look at the code which I made change here

https://www.dropbox.com/s/tawk2eeo149zj … 0.rar?dl=0



Thanks,
Kanchan

Last edited by kanchan (2016-Feb-05 10:12:58)

Offline

 

#8 2016-Feb-05 21:46:29

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 4964

Re: Experiment with TokenMAC

The errors above indicate problems in your setup. You should confirm our reference wlan_exp scripts work normally before attempting to modify the C code or Python script. The experiments framework user guide gives step-by-step instructions for setting everything up. Once setup, you must then add your node's serial numbers to the Python script you're using.

If the guides above do not resolve the issue, please provide a complete description of your setup (Ethernet connections among PC and WARP nodes, OS, Python version, etc.). Please also share the output of the WARP nodes' UARTs for CPU High (user guide explains how to select CPU High's UART).

Offline

 

#9 2016-Feb-06 00:04:22

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi,
    I read the whole tutorial again and did all the necessary change to 802.11 Reference Design v1.3 for the extension of TokenMAC. After the change at boot time STA can not associate with AP but can associate  using WLAN Exp. Using WLAN Exp association only happens for dcf mac not for nomac.

following is the output when I am running throughput_two_nodes.py for dcf mac

Initializing W3-a-00545
Initializing W3-a-00548

Experimental Setup:

Node 1:
    Description = WLAN EXP AP W3-a-00548: ID     1
    Channel     =    1 (2412 MHz)
    Rate        = 18.0 Mbps (QPSK 3/4)


Node 2:
    Description = WLAN EXP STA W3-a-00545: ID     0
    Channel     =    1 (2412 MHz)
    Rate        = 18.0 Mbps (QPSK 3/4)



Run Experiment:

Testing Node 1 -> Node 2 throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps

Testing Node 2 -> Node 1 throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps

Testing Head-to-Head throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps


However when I am running throughput_two_nodes.py for nomac following error happens


Initializing experiment

Resetting the network config for all nodes on network 10.0.0.0.
Initializing W3-a-00545
ERROR:  Node W3-a-00548
    Node is not responding.  Please ensure that the
    node is powered on and is properly configured.


    Error: Max retransmissions without reply from node

Traceback (most recent call last):
  File "throughput_two_nodes.py", line 61, in <module>
    nodes = wlan_exp_util.init_nodes(nodes_config, network_config)
  File "E:\sdr\EXPERIMENT\created\original\Mango_802.11_RefDes_v1.3.0\Python_Reference\wlan_exp\util.py", line 434, in init_nodes
    return wn_util.wn_init_nodes(nodes_config, network_config, node_factory, network_reset, output)
  File "E:\sdr\EXPERIMENT\created\original\Mango_802.11_RefDes_v1.3.0\Python_Reference\wlan_exp\warpnet\util.py", line 107, in wn_init_nodes
    raise wn_ex.ConfigError(msg)
wlan_exp.warpnet.exception.ConfigError: Config Error:

ERROR:  Was not able to initialize all nodes.  The following
nodes were not able to be initialized:
    W3-a-00548



Following is the UART output for the STA node while programming using nomac

***********************************************
     ***** WARP v3 Clock Config Core *****
      Program Assembly Date: 24 Jan 2015

No config data in EEPROM - Using Defaults
No Clock Module Detected
Clock Config Complete - Continuing Boot Process
*********************************
----- Mango 802.11 Reference Design -----
----- v1.3 ------------------------------
----- wlan_mac_sta ----------------------
Compiled Feb  6 2016 11:15:18

------------------------
DRAM SODIMM Detected
Tx Queue of 3413 placed in DRAM: using 13652 kB
Initializing Event log (1044664320 bytes) at 0xC1BBB000
BSS Info list (len 768) placed in DRAM: using 60 kB
1 Eth Tx BDs placed in BRAM: using 64 B
239 Eth Rx BDs placed in BRAM: using 14 kB
------------------------
WARPNet v2.1.0 WLAN EXP v1.3.0 (compiled Feb  6 2016 09:35:44)
  ETH B MAC Address: 40:D8:55:04:24:2D
  ETH B IP  Address: 10.0.0.0  (1000 Mbps)
  Configuring ETH B for AXI FIFO mode with 1536 byte buffers (1 receive, 1 send)
  Listening on UDP ports 9500 (unicast) and 9750 (broadcast)
  Not waiting for Ethernet link.  Current status is: not ready.
    Make sure link is ready before using WARPNet.
  WLAN EXP STA Init
End WARPNet WLAN Exp initialization
WLAN MAC Station boot complete:
  Default SSID : WARP-AP
  Channel      : 4
  MAC Addr     : 40-D8-55-04-24-2C


Press the Esc key in your terminal to access the UART menu


and following is the UART output for AP while programming using nomac

***********************************************
     ***** WARP v3 Clock Config Core *****
      Program Assembly Date: 24 Jan 2015

No config data in EEPROM - Using Defaults
No Clock Module Detected
Clock Config Complete - Continuing Boot Process
*********************************
----- Mango 802.11 Reference Design -----
----- v1.3 ------------------------------
----- wlan_mac_ap -----------------------
Compiled Feb  6 2016 11:10:42

------------------------
DRAM SODIMM Detected
Tx Queue of 3413 placed in DRAM: using 13652 kB
Initializing Event log (1044664320 bytes) at 0xC1BBB000
BSS Info list (len 768) placed in DRAM: using 60 kB
1 Eth Tx BDs placed in BRAM: using 64 B
239 Eth Rx BDs placed in BRAM: using 14 kB
------------------------
WARPNet v2.1.0 WLAN EXP v1.3.0 (compiled Feb  6 2016 09:35:27)
  ETH B MAC Address: 40:D8:55:04:24:2D
  ETH B IP  Address: 10.0.0.0  (1000 Mbps)
  Configuring ETH B for AXI FIFO mode with 1536 byte buffers (1 receive, 1 send)
  Listening on UDP ports 9500 (unicast) and 9750 (broadcast)
  Not waiting for Ethernet link.  Current status is: not ready.
    Make sure link is ready before using WARPNet.
End WARPNet WLAN Exp initialization
WLAN MAC AP boot complete:
  SSID    : WARP-AP
  Channel : 1
  MAC Addr: 40-D8-55-04-24-2C


Press the Esc key in your terminal to access the UART menu

While programming AP and STA with nomac the Green LED on both the node are in steady state.

and following is the code which I made change

https://www.dropbox.com/s/tawk2eeo149zj … 0.rar?dl=0

Please help me to resolve the issue.

Thanks in advance for your reply!!!

kanchan.

Last edited by kanchan (2016-Feb-08 12:39:28)

Offline

 

#10 2016-Feb-08 17:37:07

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Experiment with TokenMAC

I'm not exactly sure why you are seeing that issue.  I would go ahead and make sure that you clean your workspace (right click on a project and select "Clean Project") for each project.  Depending on how you made the changes (i.e. in the IDE or outside the IDE in a text editor), the build can sometimes get out of sync with your files which can result in a bad state.

Offline

 

#11 2016-Feb-08 21:44:44

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi,
    I clean and rebuild the project but now I find following unexpected result

for first execution of throughput_two_nodes.py throughput is around 15.0 Mbps which is expected.
for the second execution throughput is around 8.0 Mbps
for third execution throughput 0 Mbps
for next onward again same error occur which happens before

following is the out put for different execution of the program throughput_two_nodes.py

for 1st execution
---------------------------------------

Testing Node 1 -> Node 2 throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  8.07 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps

Testing Node 2 -> Node 1 throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  7.67 Mbps

Testing Head-to-Head throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  7.67 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  7.15 Mbps


for 2nd execution
---------------------------------------   
   
Testing Node 1 -> Node 2 throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  8.06 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps

Testing Node 2 -> Node 1 throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  1.23 Mbps

Testing Head-to-Head throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps


for 3rd execution
---------------------------------------   
   
Testing Node 1 -> Node 2 throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps

Testing Node 2 -> Node 1 throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps

Testing Head-to-Head throughput for rate 18.0 Mbps (QPSK 3/4) ...
    Node 1 -> Node 2:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps
    Node 2 -> Node 1:  Rate = 18.0 Mbps   Throughput =  0.00 Mbps


for next execution onward
---------------------------------------   

Initializing experiment

Resetting the network config for all nodes on network 10.0.0.0.
ERROR:  Node W3-a-00545
    Node is not responding.  Please ensure that the
    node is powered on and is properly configured.


    Error: Max retransmissions without reply from node

Initializing W3-a-00548
Traceback (most recent call last):
  File "throughput_two_nodes.py", line 61, in <module>
    nodes = wlan_exp_util.init_nodes(nodes_config, network_config)
  File "E:\sdr\EXPERIMENT\created\original\Mango_802.11_RefDes_v1.3.0\Python_Reference\wlan_exp\util.py", line 434, in init_nodes
    return wn_util.wn_init_nodes(nodes_config, network_config, node_factory, network_reset, output)
  File "E:\sdr\EXPERIMENT\created\original\Mango_802.11_RefDes_v1.3.0\Python_Reference\wlan_exp\warpnet\util.py", line 107, in wn_init_nodes
    raise wn_ex.ConfigError(msg)
wlan_exp.warpnet.exception.ConfigError: Config Error:

ERROR:  Was not able to initialize all nodes.  The following
nodes were not able to be initialized:
    W3-a-00545


After re-program the board with the design again following error persist
---------------------------------------------------------

Initializing experiment

Resetting the network config for all nodes on network 10.0.0.0.
ERROR:  Node W3-a-00545
    Node is not responding.  Please ensure that the
    node is powered on and is properly configured.


    Error: Max retransmissions without reply from node

Initializing W3-a-00548
Traceback (most recent call last):
  File "throughput_two_nodes.py", line 61, in <module>
    nodes = wlan_exp_util.init_nodes(nodes_config, network_config)
  File "E:\sdr\EXPERIMENT\created\original\Mango_802.11_RefDes_v1.3.0\Python_Reference\wlan_exp\util.py", line 434, in init_nodes
    return wn_util.wn_init_nodes(nodes_config, network_config, node_factory, network_reset, output)
  File "E:\sdr\EXPERIMENT\created\original\Mango_802.11_RefDes_v1.3.0\Python_Reference\wlan_exp\warpnet\util.py", line 107, in wn_init_nodes
    raise wn_ex.ConfigError(msg)
wlan_exp.warpnet.exception.ConfigError: Config Error:

ERROR:  Was not able to initialize all nodes.  The following
nodes were not able to be initialized:
    W3-a-00545


Please suggest what can I do now on this issue.


Thanks,
Kanchan

Last edited by kanchan (2016-Feb-08 22:39:45)

Offline

 

#12 2016-Feb-09 10:03:41

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Experiment with TokenMAC

Unfortunately, I am unable to replicate the issue.  I have used your code and it is stable across many tests even with a decent amount of times between re-runs. 

There might be some issue with your host computer.  You might try re-booting and see if that solves the problem.  A couple of questions:
  - What OS are you using?
  - What version Python are you using?
  - How are you invoking the throughput script?

One thing you can do to debug is to run Wireshark and see that the host is actually trying to communicate with the node.  Also look at the UART output to see what changes for each run for each node.

Offline

 

#13 2016-Feb-10 04:33:06

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi,

    I am using windows 10.
    Python version 2.7.6
    and I am invoking throughput_two_nodes.py from anaconda command prompt. I reboot the system run it again but not a single time it works all the time it is showing node  initialization problem for nomac. dcf mac working fine. But last day it works only for first three run for nomac.  In wireshark I find that only ARP message is broadcasted. I am really exhausted with this problem from the last one week. Please help me is there any other way to work on it. Is it problem with windows 10 or python version. Then I will install windows 7 on my PC.

Thanks,
Kanchan

Offline

 

#14 2016-Feb-10 13:07:54

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: Experiment with TokenMAC

The python version looks fine.  We are only using Windows 7 and have not tested on Windows 10. 

One thing that might help is to turn off the firewall for the WLAN Exp network.  Users have had problems in the past with aggressive firewalls.

Also, I just wanted to confirm that you see the same type of behavior with the stock 1.3 release (i.e. you can run throughput_two_nodes.py fine the first time, then subsequent runs start having issues just like what you posted with nomac).  Thanks.

Offline

 

#15 2016-Feb-16 04:21:36

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi,
    I shifted to os window 10 to windows 7. Now all the time when I run the experiment STA can associate to AP using Wlan Exp.But most of the time I am getting throughput zero with throughput_two_nodes.py . Few times it is working fine. I think there may be some problem in my Ethernet controller. So I am planning to run the whole experiment on different PC.

Thanks,
Kanchan

Offline

 

#16 2016-Mar-12 07:58:37

enu13
Member
Registered: 2016-Mar-07
Posts: 6

Re: Experiment with TokenMAC

`

Last edited by enu13 (2016-Mar-12 08:19:12)

Offline

 

#17 2016-Mar-12 08:04:13

enu13
Member
Registered: 2016-Mar-07
Posts: 6

Re: Experiment with TokenMAC

`

Last edited by enu13 (2016-Mar-12 08:19:25)

Offline

 

#18 2016-Mar-12 08:08:38

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi,
After a long investigation I find this is not the problem with my desktop. I have tested it on different machine.

Here is what I find
Following is code snap from frame_receive() in wlan_mac_nomac.c

while(wlan_mac_get_last_byte_index() <MAC_HW_LASTBYTE_TOKEN){

    }
This while loop is used so that node can receive first few bytes before processing the packet header. But most of the cases when I run the implementation with default settings green light on board is not incrementing . That means the node is not receiving any packet.But if I change MAC_HW_LASTBYTE_TOKEN to 13 then then the node can receive packets. I understand that MAC_HW_LASTBYTE_TOKEN=sizeof(mac_frame_custom_token) +3 total 23B. So here a node is looping in the while to receive few byte first before processing the packet. But the problem is with MAC_HW_LASTBYTE_TOKEN=23. for MAC_HW_LASTBYTE_TOKEN=13 node receiving packet but the throughput received by each node using throughput_two_nodes.py is not what is expected.There is some random effect.

In the dcf I find that the same while loop is like
while(wlan_mac_get_last_byte_index() < MAC_HW_LASTBYTE_ADDR1){
        if(DBG_PRINT) xil_printf("Waiting for Rx Bytes (%d < %d)\n", wlan_mac_get_last_byte_index(), MAC_HW_LASTBYTE_ADDR1);
    };
   
here MAC_HW_LASTBYTE_ADDR1=13.

Then why in TOKEN_MAC it is not working. Can you please give me some light.


thanks,
kanchan

Last edited by kanchan (2016-Mar-12 09:06:28)

Offline

 

#19 2016-Mar-12 11:41:15

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 4964

Re: Experiment with TokenMAC

You might be running into the issue discussed in this thread, where the Rx PHY doesn't properly reset upon reception of a corrupt 11n waveform. The C code fix in this post is a good workaround when using the v1.4 ref design. We have fixed the underlying PHY bug in the forthcoming v1.5 release of the ref design.

Offline

 

#20 2016-Mar-13 00:08:19

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi,
   It seems I am very unfortunate for the face that I have made the change in while loop of frame_receive() function of wlan_mac_nomac.c file but still nodes are not able to receive packet. The made is done in v1.3 reference design. I did the same change in v1.4 reference design. In case of v1.4 node only able to receive packet for first few seconds. Please can you give me any other suggestion to make the implementation of TokenMAC work.

Thanks,
Kanchan

Offline

 

#21 2016-Mar-15 16:32:43

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 4964

Re: Experiment with TokenMAC

You'll have to give us more information about what you're observing.

Does the node always get stuck in the "while(wlan_mac_get_last_byte_index() < MAC_HW_LASTBYTE_ADDR1)" loop, even after using the patch I linked to above?

Does this happen in your environment even when you're using the default reference design (i.e. without TokenMAC changes)?

Offline

 

#22 2016-Mar-16 13:39:29

kanchan
Member
Registered: 2015-Feb-24
Posts: 22

Re: Experiment with TokenMAC

Hi murphpo,
         The TokenMAC implementation get struck in the following while loop with reference design v1.3.

while(wlan_mac_get_last_byte_index() <MAC_HW_LASTBYTE_TOKEN){
mac_hw_status = wlan_mac_get_status();
  if(((mac_hw_status & WLAN_MAC_STATUS_MASK_RX_PHY_ACTIVE) == 0) && (wlan_mac_get_last_byte_index() == 0)) {
      //Rx PHY is idle, but we're still waiting for bytes - bad MAC/PHY status, ignore Rx, unblock Rx PHY, and return
      wlan_mac_dcf_hw_rx_finish();
      wlan_mac_dcf_hw_unblock_rx_phy();
      return return_value;
   }
}
But when I set MAC_HW_LASTBYTE_TOKEN=13 node can receive packet. But as a result I get random throughput. This is expected as value of MAC_HW_LASTBYTE_TOKEN should be at least 20.

The original reference design without any change working fine. Even with this while loop the original design working fine. For TokenMAC implementation in v1.4 first few second node can receive packet. After that it get struck. I am struggling with the TokenMAC implementation for last two months. Please Please help me out. Meanwhile I am trying to debug more to get the actual reason of this problem.

Thanks,
Kanchan

Last edited by kanchan (2016-Mar-16 13:39:53)

Offline

 

#23 2016-Jun-28 09:35:43

warp_user
Member
Registered: 2014-Feb-27
Posts: 70

Re: Experiment with TokenMAC

welsh wrote:

1. Is your station receiving beacons from the AP (i.e. are the green LEDs incrementing regularly)?  If not, then check that the code you added to main() in wlan_mac_nomac.c, i.e.

Code:

    in_reservation = 0;
    wlan_mac_low_set_new_reservation_callback((void*)token_new_reservation);
    wlan_mac_low_set_adjust_reservation_ts_callback((void*)adjust_reservation_s_end);

occurs after wlan_mac_low_init() (or just before the while(1) loop).  wlan_mac_low_init() initializes all the callbacks to NULL so you need to make sure that the setting of the callbacks occurs after that.  That is an easy mistake to make. 

2. With the way that wlan_mac_low.c, initializes allow_new_mpdu_tx (i.e. to zero), each node starts in a state where it will not be able to transmit anything until it gets permission to do so from the AP through a Token offer.  Also, the AP doesn't offer a Token unless the station is part of its associated stations, so there is a bit of a deadlock at boot which means the AP and STA will not automatically associate.  Now, the best way around this is to use WLAN Exp to set the association state of the AP.  You can see how this is done in one of our examples.  Another way would be to alter the initialization state of the node, so each node has the ability to transmit after boot.  This is not as desirable because there is less control adding new STAs to the BSS, but would allow association without having to use WLAN Exp.

3. You should add a definition for IPC_MBOX_TOKEN_NEW_RESERVATION in the case statement for wlan_mac_high_process_ipc_msg().  This will make sure that there are no warning UART prints in CPU High due to receiving an "Unknown IPC message type":

Code:

		case IPC_MBOX_TOKEN_NEW_RESERVATION:
			// Do nothing
		break;

		case IPC_MBOX_TOKEN_END_RESERVATION:
		    token_new_reservation_callback();
		break;

I am having similar problems when trying to experiment with Token MAC using the WARPnet framework. Can you please elaborate what is meant by adding a definition to for IPC_MBOX_TOKEN_NEW_RESERVATION as specified above.
I have followed modifications suggested in http://warpproject.org/forums/viewtopic.php?id=3063 but without success.

Can you provide any additional help to test Token MAC implementation.
Thanks

Offline

 

#24 2016-Jun-29 10:27:51

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1184

Re: Experiment with TokenMAC

warp_user wrote:

I am having similar problems when trying to experiment with Token MAC using the WARPnet framework.

Can you be more specific on the problems you are running into implementing the application note? What version of the reference design you are using? The app note was built back on v1.3 of the design. Implementing the changes on the latest v1.5.1 design should be largely identical except for a handful straightforward changes. For example, app note refers to "wlan_mac_ipc_util.h" as the location for the "IPC_MBOX_" definitions. That file doesn't exist any more, but you can find the "IPC_MBOX_" definitions in wlan_mac_mailbox.util.h.

warp_user wrote:

Can you please elaborate what is meant by adding a definition to for IPC_MBOX_TOKEN_NEW_RESERVATION as specified above.

From "Code Common to CPU_HIGH and CPU_LOW" section in the app note, the "IPC_MBOX_" definitions are nothing more than arbitrary but agreed-upon numbers that are common to CPU_HIGH and CPU_LOW. These numbers are used in messages passed between the processors' mailboxes so that each can understand what the others want them to do. The application note asks you to add "IPC_MBOX_TOKEN_NEW_RESERVATION" alongside the other existing definitions already in use by the default reference design.

Offline

 

#25 2016-Jul-01 03:45:47

warp_user
Member
Registered: 2014-Feb-27
Posts: 70

Re: Experiment with TokenMAC

I have used v1.3 and only included nomac in the SDK.
Once modifications are done as specified in https://warpproject.org/trac/wiki/802.1 … token_mac, the code compiles successfully. Then I generated the bit files and used SD cards to run the design in WARP Hardware.
But when I tried to characterize with WARPnet (using the steps specified in
https://warpproject.org/trac/wiki/802.1 … terization) there are no data generated for AP. I have used 'log_capture_two_node_two_flow.py' in WARPnet framework.
Nodes are identified and initialized successfully.
There is data in sta_two_node_two_flow_capture.hdf5 but nothing in    ap_two_node_two_flow_capture.hdf5. I have used 'log_process_summary.py' to read those hdf5 files.
Then I have used Wireshark monitor mode to sniff packets during the operation and  cannot see any token_offer and token_request being generated.

Any help to get this working is appreciated.

Thanks in advance

Offline

 

Board footer