WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2014-Jun-25 09:06:17

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

w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

I need to use w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework.
I have connected two radios (W3) via Gig Ethernet switch and successfully tested WARPLab.
I am using SD cards to boot the radios and which bit files are needed to be copied while using WARPnet. In bit file directory there are download-warpnet.bit, download-csmamac.bit and download-nomac.bit. In the long run I plan to use WARPNet framework for my work and would appreciate if you can provide some example runs.

Thanks

Offline

 

#2 2014-Jun-25 11:40:31

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

What is your goal for this project?  While the OFDM reference design is useful, you might find the 802.11 Reference Design and the WARPnet 2.0 Experiment Framework a better fit for your application. 

To answer your questions about the OFDM reference design, the three bit files refer to the different applications within the OFDM Reference Design documentation.  As you can see from the descriptions, the Bridge application uses the noMAC bitstream.  The CSMA application uses the csmaMAC bitstream. The WARPnet application uses the warpnet bitstream.  To find more information on how to set up WARPnet 1.0, see the installation instructions and system requirements.

Offline

 

#3 2014-Jul-02 08:13:31

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Many thanks for your reply.
The reason for this project is to understand control and design of different MAC implementations in WARPnet python framework.  Nodes are connected by coax cable with 60dB attenuation. Both nodes are connected to a single laptop (with IP 10.0.0.250) using a Gbit Ethernet switch.
After following instructions in the link http://warpproject.org/trac/wiki/WARPnet1/Installation and copying download-warpnet.bit to SD cards (each node displays 0 and 1 at the start) , once tried with TxPower_vs_PER.py and TxPower_vs_BER.py cannot see any Tx and Rx packets recorded in twoNode_PER_Test_v0.m (this confirmed with running WireShark as well).
Would like to have your feedback on this issue.

Thanks

The server, client and ber_processor show the following:

===========================================================
warpnet_server:sudo python warpnet_server.py eth0 10101 dc:0e:a1:30:6b:10
Started WARPnet Server. Listening on port 10101.


Connected to 1
Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/log.py", line 88, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/log.py", line 73, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
    why = selectable.doRead()
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 214, in doRead
    return self._dataReceived(data)
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 220, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 180, in dataReceived
    self._consumeData()
  File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 225, in _consumeData
    self._consumePayload()
  File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 352, in _consumePayload
    self._processPayload()
  File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 398, in _processPayload
    self.stringReceived(self._payload.getvalue()[:-1])
  File "warpnet_server.py", line 478, in stringReceived
    self.factory.processor.controllerMsg(self.id, dataDict)
  File "warpnet_server.py", line 303, in controllerMsg
    self.procFunc[data['pktType']](controllerID, data)
  File "warpnet_server.py", line 433, in pc_data
    self.factory.nodeManager.sendToNode(controllerID, group, structID, node, dataToSend, availability, ETH_HEADER)
  File "warpnet_server.py", line 565, in sendToNode
    self.existingConnections[nodeID][2].sendStruct(cID, cGrp, structID, nodeID, data, access, ethernetType)
  File "warpnet_server.py", line 636, in sendStruct
    self.connection.sendData(structPacket, ethernetType)
  File "warpnet_server.py", line 733, in sendData
    ethPkt.set_ether_type(ethernetType)
  File "/usr/local/lib/python2.7/dist-packages/impacket/ImpactPacket.py", line 565, in set_ether_type
    self.set_word(12 + 4*self.tag_cnt, aValue)
exceptions.AttributeError: WARPnetEthernetHeader instance has no attribute 'tag_cnt'
Lost connection to 1



=================================================
ber_processor: sudo ./ber_processor
Starting WARPnet BER Processor
Attaching to device eth0
Applied filter 'ether proto 0x9494'

=======================================================

warpnet_client:python TxPower_vs_PER.py
Successfully connected to WARPnet Server
Registered Group ID 0
Connected to nodes
resending after timeout data 13
resending after timeout data 13
resending after timeout data 13
resending after timeout data 13
resending after timeout data 13
resending after timeout data 13
....
Request timed out
resending after timeout data 27
resending after timeout data 27
resending after timeout data 27
resending after timeout data 27
resending after timeout data 27
resending after timeout data 27
resending after timeout data 27
resending after timeout data 27
resending after timeout data 27
resending after timeout data 27
Request timed out
############################################
############# Experiment Done! #############
############################################

Offline

 

#4 2014-Jul-02 09:03:07

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Those errors look like they are happening in the Twisted package, which WARPnet 1.0 used for over-the-wire communication with the boards. I think the board isn't responding to the python script. Are you using WARP v3? If so, are you using Eth A for the connection back to the PC? I don't believe that we used Eth B for anything in the OFDM Reference Design.

Going back to a point that welsh was making earlier, unless you have made significant customizations to the OFDM Reference Design, there is really very little reason to stick with that design if you have WARP v3 hardware. The new 802.11 Reference Design + WARPnet 2.0 experiments framework is, frankly, superior in nearly every way. The basic idea is the same -- you can still control PHY and MAC parameters from Python using the new WARPnet 2.0 experiments framework. Also, it is *much* easier to use and get set up.

Here is the Getting Started guide for the new experiments framework
Here are some examples to try once you get everything set up

Offline

 

#5 2014-Sep-02 06:23:59

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Many thanks for your reply. I took your advice and switched to 802.11 Reference Design.
I have tested WARPnet 2.0 successfully on Windows 7 platform for following examples.
http://warpproject.org/trac/wiki/802.11 … ingStarted
http://warpproject.org/trac/wiki/802.11 … p/examples

I need to move the implementation and testing to a Ubuntu platform.
Once I tried python blink_node_leds.py it gives the Permission Denied socket error in Ubuntu platform.
In both (Windows and Ubuntu) I am using the version Mango_802_11_RefDes_v0.93_beta.

Thanks

============================================

$ python blink_node_leds.py
Traceback (most recent call last):
  File "blink_node_leds.py", line 30, in <module>
    wn_util.wn_identify_all_nodes(HOST_INTERFACES)
  File "/home/cognitive/WARP/RefDes_802_11_93/Python_Reference/wlan_exp/warpnet/util.py", line 143, in wn_identify_all_nodes
    host_config = wn_config.HostConfiguration(host_interfaces=my_host_interfaces)
  File "/home/cognitive/WARP/RefDes_802_11_93/Python_Reference/wlan_exp/warpnet/config.py", line 125, in __init__
    inf = wn_util._check_host_interface(interface, my_bcast_port)
  File "/home/cognitive/WARP/RefDes_802_11_93/Python_Reference/wlan_exp/warpnet/util.py", line 726, in _check_host_interface
    s.connect((test_ip_addr, bcast_port))
  File "/home/cognitive/anaconda/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 13] Permission denied

Offline

 

#6 2014-Sep-02 07:58:06

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

We had updated how we check the host IP address in order to make it more robust and unfortunately the code that works on Windows did not work on Mac and Ubuntu (originally I thought this was only a Mac issue but it looks like it applies to ubuntu as well).

There is a one line fix that you can find here.

Basically you cannot do a socket connect with a second argument of zero on a non-Windows OS (it has to be non-zero).  However, a value of zero works just fine on Windows (which is why we had not caught it until recently).  Please update the warpnet/util.py file with the appropriate fix.  I apologize for the inconvenience and this will be fixed in the next release.

Offline

 

#7 2014-Sep-02 08:47:17

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Many thanks for the reply. This is the only matching code in warpnet/util.py in the version Mango_802_11_RefDes_v0.93_beta (line 724 to 727) , which is different to the suggested link.

Thanks

-----------------------------------------------------------------------------------------------------------

# Create a temporary UDP socket to get the hostname
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    s.connect((test_ip_addr, bcast_port))
    socket_name = s.getsockname()[0]

Offline

 

#8 2014-Sep-02 09:26:47

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

I didn't read the error message fully and thought you had run in to the issue we have seen in the 0.95 reference design.  I just ran the v0.93 blink_node_leds.py script in a Ubuntu 12_04 virtual machine and it did not have any issues. 

There might be some issues with your network configuration on your Ubuntu machine.  If you are using the default host interface (ie HOST_INTERFACES   = ['10.0.0.250']), then you need to have a valid network interface with an IP address of 10.0.0.250 and a mask of 255.255.255.0.  You can run 'ifconfig' to see your networking information.

As a standalone test so you don't have any WARPNet code in the mix, you can open a python interpreter (ie type python on the command line) and then run the following commands:

Code:

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(('10.0.0.255', 1))
s.getsockname()[0]

This code is trying to test that you have a valid network interface to use with WARPNet.

Offline

 

#9 2014-Sep-02 09:36:03

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Seems to get the same error:
================================

cognitive@tvws-client-1:~$ python
Python 2.7.5+ (default, Feb 27 2014, 19:37:08)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
>>> s.connect(('10.0.0.255', 1))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 13] Permission denied
>>> s.getsockname()[0]
'0.0.0.0'
>>>

Offline

 

#10 2014-Sep-02 09:40:03

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

What version of ubuntu are you running and what is your network configuration?

Offline

 

#11 2014-Sep-02 09:46:14

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Ubuntu version
--------------------------------------------

Distributor ID:    Ubuntu
Description:    Ubuntu 13.10
Release:    13.10
Codename:    saucy
cognitive@tvws-client-1:~$

Network configuration as in WARPnet 2.0 single Ubuntu machine (eth0 10.0.0.250) is connected to two WARP nodes (ETH B) via Gbit Ethernet switch.

Thanks

Offline

 

#12 2014-Sep-02 10:16:25

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

We'll see if we can get an Ubuntu 13.10 machine to reproduce this. In the meantime try disabling the _check_host_interface code (just add "return" at the top of the _check_host_interface def). It would be helpful to know whether the rest of the warpnet flow works on your system even if the _check_host_interface method fails.

Offline

 

#13 2014-Sep-02 10:40:38

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Managed to solve using ‘setsockopt’ for sending to a broadcast address. Let me know of any issues of using this in WARPnet framework.


# Code
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.connect(('10.0.0.255', 1))
s.getsockname()[0]


>>> import socket
>>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
>>> s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
>>> s.connect(('10.0.0.255', 1))
>>> s.getsockname()[0]
'10.0.0.250'
>>>

Offline

 

#14 2014-Sep-02 11:00:38

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

That is very strange.  We had tried this on VMs (both 12.04 and 13.10) and everything just seemed to work.  However, it looks like on a native install, it is trying to do something slightly different under the hood.  I was able to re-create this error on a natively installed Ubuntu client. 

This should not be an issue for the rest of the framework since we set the SO_BROADCAST flag on all the other sockets we open and use.  This was just a temporary socket to check the host interface IP address.  We'll add a try/except around this code for future releases and add in the broadcast since that should not cause any issues on Windows or Mac.

Offline

 

#15 2014-Oct-16 08:57:14

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

I have successfully tested WARPnet and other 802.11 examples using bit files copied to SD card. There are errors once tried to compile projects using Xilinx SDK platform. On further investigation it seems they are related to non existence of microblaze directory (thus header files such as xparameter.h, xil_io.h etc). Can you let me know how to proceed from here.

Thanks

Offline

 

#16 2014-Oct-16 09:29:36

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Those files are part of the BSP for each processor. Did you follow the "Creating the SDK Workspace" steps in the user guide? This process should import the known-good BSPs along with the application projects.

Offline

 

#17 2014-Oct-23 05:07:09

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

I have followed the steps mentioned in "http://warpproject.org/trac/wiki/802.11/Usage/SDK" but still without success.
Once tried with w3_Template_Project in "http://warpproject.org/trac/wiki/HardwareUsersGuides/WARPv3/TemplateProjects" compilation produces following errors,
--------------------------------------------------------------------------------------
make all
Building file: ../src/w3_example.c
Invoking: MicroBlaze gcc compiler
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../w3_TemplateProject_OnBoardPeriphs_v1p4_bsp/microblaze_0/include -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-div -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -MMD -MP -MF"src/w3_example.d" -MT"src/w3_example.d" -o "src/w3_example.o" "../src/w3_example.c"
../src/w3_example.c:2:25: fatal error: xparameters.h: No such file or directory
compilation terminated.
make: *** [src/w3_example.o] Error 1

Offline

 

#18 2014-Oct-23 08:45:20

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Have you done the Introduction to the Xilinx Software Development Kit (SDK) tutorial?

xparameters.h is part of the BSP, so you should check that the projects are referencing the correct BSP.

Offline

 

#19 2014-Oct-23 09:25:23

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

I have successfully completed the SDK tutorial.
On further investigation it seems that microblaze_0 folder in missing from bsp directory for 802.11 designs.
Is this something that can be fixed at this end or is it included in the original zip file?
Thanks

Offline

 

#20 2014-Oct-23 09:34:49

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

The microblaze_0 folder will be created when the SDK compiles the BSP. If you're certain you've imported the projects correctly, there may be a problem in the BSP compilation. Click on the SDK console tab to view the compiler output. The console shows the output for whichever SDK project you last selected. To view the BSP compiler output you may need to click one of the software projects (nomac, for example), then click on the BSP project. A successful BSP compilation ends with the message "Finished building libraries". If the BSP fails to build the BSP resources required by the software projects will not be created, possibly leading to the error you see above.

Offline

 

#21 2014-Nov-06 06:11:06

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

802.11 Reference Design still gives the same problem, BSP compilation is not successful and it gives the error messages:
ERROR:EDK - standalone () - couldn't execute "mb-ar": no such file or directory

I am using ISE 14.4 version on Ubuntu 64 bit machine.

Offline

 

#22 2014-Nov-06 09:25:01

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

ERROR:EDK - standalone () - couldn't execute "mb-ar": no such file or directory

This error indicates a problem with the SDK tools themselves. mb-ar is part of the compiler suite provided by the SDK. This problem should not be unique to the 802.11 Reference Design. Have you used the same tools with any other designs?

Offline

 

#23 2014-Nov-06 09:31:14

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Another thing you might try is to delete the current BSP and create a new BSP with the same name.  The main thing is to make sure that all the settings are the same as the reference design BSP.  (i.e. "ETH_A_uses_xilnet" is set to zero in the WARPxilnet library configuration; you have all the same versions of the libraries; etc.).

Offline

 

#24 2014-Nov-10 09:18:26

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

Murphpo,
Many thanks for your comments.
You are correct, this is not only 802.11 specific problem, it is not even possible to compile the w3_template project in
http://warpproject.org/trac/wiki/Exerci … structions
The following errors are occurred when building the bsp. Any suggestions on how to proceed from here.
Thanks in advance

------------------------------------------------------------------------------------------------------------------
make -k all
libgen -hw ../w3_TemplateProject_OnBoardPeriphs_v1p4_hw_platform/system.xml\
           -lp .. -lp /home/cognitive/WARP/repository/WARP/edk_user_repository\
           -pe microblaze_0 \
           -log libgen.log \
           system.mss
libgen
Xilinx EDK 14.4 Build EDK_P.49d
Copyright (c) 1995-2012 Xilinx, Inc.  All rights reserved.

Command Line: libgen -hw
../w3_TemplateProject_OnBoardPeriphs_v1p4_hw_platform/system.xml -lp .. -lp
/home/cognitive/WARP/repository/WARP/edk_user_repository -pe microblaze_0 -log
libgen.log system.mss


Staging source files.
Running DRCs.
Running generate.
Running post_generate.
ERROR:EDK - standalone () - couldn't execute "mb-ar": no such file or directory
ERROR:EDK:3417 - Error(s) while running TCL procedure post_generate().
make: *** [microblaze_0/lib/libxil.a] Error 2
make: Target `all' not remade because of errors.

Offline

 

#25 2014-Nov-10 09:58:45

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

Re: w3_OFDM_ReferenceDesign_v18p1 within WARPNet framework

ERROR:EDK - standalone () - couldn't execute "mb-ar": no such file or directory

Same error as above - the SDK front-end can't find the compiler tools. Something broke the SDK install. Have you renamed the folder containing the Xilinx tools? Are you running the SDK from the Xilinx Design Tools entry in the Start Menu (a shortcut which sets up the PATH variable per-launch)?

Offline

 

Board footer