WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2017-Feb-28 16:50:29

JannieLee
Member
Registered: 2016-Oct-30
Posts: 20

Few questions about 802.11 Reference Design

Hi all,

I am currently using 802.11 reference design and configuring a WARP v3 board as a STA. I connected STA with a commercial router. When I use wireshark to capture packet, I found that after establishing connection with router, STA remained in idle state, and the router consistently send QoS Null Function(no data) to STA. I want to send data frame from STA to router, how can I modify the program?

Another question is about measure signal strength from STA side. I want to measure not only the received signal strength but also the transmitted one. How can I do that?

Any help and answer will be appreciated!
Have a good day.

Jannie

Offline

 

#2 2017-Mar-01 15:30:19

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

Re: Few questions about 802.11 Reference Design

JannieLee wrote:

I am currently using 802.11 reference design and configuring a WARP v3 board as a STA. I connected STA with a commercial router. When I use wireshark to capture packet, I found that after establishing connection with router, STA remained in idle state, and the router consistently send QoS Null Function(no data) to STA. I want to send data frame from STA to router, how can I modify the program?

Once the STA is associated to an AP, any packets created by the LTG framework or packets received through Ethernet portal will result in transmissions whose RA is the AP it is associated with. You can start generating traffic locally by turning on the LTG via the wlan_exp Experiments Framework or by hooking up a computer to Eth A and sending traffic to the portal.


JannieLee wrote:

Another question is about measure signal strength from STA side. I want to measure not only the received signal strength but also the transmitted one. How can I do that?

You can set the Tx power directly with wlan_exp. The accuracy is within a couple of dB for the range of supported Tx powers. If you want to measure the Tx power, you'd need ground truth with some external equipment like a spectrum analyzer or vector signal analyzer. That's how we calibrated the Tx power commands. There isn't a way to measure it without external test equipment because you can't be sure whether you are seeing attenuation on the Rx or Tx side.

Offline

 

#3 2017-Mar-02 15:07:49

JannieLee
Member
Registered: 2016-Oct-30
Posts: 20

Re: Few questions about 802.11 Reference Design

Thanks for quick reply. I am new of WARP. There is one thing I am still not sure, in the wlan_exp framework, we utilize two WARP board and initialize them as STA and AP separately, while what I want is modifying the LTG function to transmit frame from STA to router, can I directly command the AP initialization part and manually set the SSID of router?

Thanks for kind help.

Offline

 

#4 2017-Mar-02 16:26:55

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

Re: Few questions about 802.11 Reference Design

There is one thing I am still not sure, in the wlan_exp framework, we utilize two WARP board and initialize them as STA and AP separately, while what I want is modifying the LTG function to transmit frame from STA to router, can I directly command the AP initialization part and manually set the SSID of router?

You'll have to be more specific about what you're trying to build. What do you mean by "router" here?

One wlan_exp script can control multiple nodes running the 802.11 ref design (most of our example scripts use 2 nodes). You can use wlan_exp to associate the AP and STA nodes (look at 'configure_bss' and 'add_association' in our examples). Once the AP and STA are associated you can start LTG traffic flows in either direction (AP -> STA and STA -> AP).

Offline

 

#5 2017-Mar-02 19:58:56

JannieLee
Member
Registered: 2016-Oct-30
Posts: 20

Re: Few questions about 802.11 Reference Design

Sorry for I didn't explain clearly. When I said "router", I mean a commercial AP, which I can't modify and control it. But I want to transmit some specific frame from STA to it and receive some response from this commercial AP.

Offline

 

#6 2017-Mar-02 22:04:12

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

Re: Few questions about 802.11 Reference Design

Sorry for I didn't explain clearly. When I said "router", I mean a commercial AP, which I can't modify and control it. But I want to transmit some specific frame from STA to it and receive some response from this commercial AP.

This is possible. First you must associate the WARP STA with the Wi-Fi AP:
  -Configure the Wi-Fi router with a known SSID (network name) and open security (no WPA)
  -Configure the STA to join the router's network, either by:
    -Using the n_sta.join_network(ssid=<your_ssid>) Python method (wlan_exp docs)
    -Changing the default value of the access_point_ssid variable in wlan_mac_sta.c

When the STA has joined the Wi-Fi AP's network, the STA hex display will update to show its AID (association ID). Once the STA is associated with the Wi-Fi AP you can start an LTG flow from the STA. You need to know the AP's MAC address to pass as the dest_addr value to FlowConfigCBR(). For example, to start an LTG flow with 100 byte packets at 100 msec intervals:

Code:

# assumes n_sta is STA node object - refer to wlan_exp examples 
wifi_ap_mac_addr = 0x000000000000 # replace this with the actual MAC address
ltg_id = n_sta.ltg_configure(wlan_exp_ltg.FlowConfigCBR(dest_addr=wifi_ap_mac_addr, payload_length=100, interval=0.1), auto_start=False)

Offline

 

#7 2017-Mar-06 16:25:27

JannieLee
Member
Registered: 2016-Oct-30
Posts: 20

Re: Few questions about 802.11 Reference Design

Hi,
Thanks for your kind help. I created a .py file as you mentioned above as a script, I ran it but nothing happened. It seems that the ltg function wasn't called correctly. Need I add the network_config and initialize the node with util.init_node() in this script?

Offline

 

#8 2017-Mar-06 17:20:22

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

Re: Few questions about 802.11 Reference Design

Need I add the network_config and initialize the node with util.init_node() in this script?

Yes- the code I posted above assumes you have already connected to the STA node and configured a wlan_exp node object. I suggest modifying one of the example wlan_exp scripts, keeping the normal node and network initialization code from the example.

Offline

 

#9 2017-Mar-08 13:10:31

JannieLee
Member
Registered: 2016-Oct-30
Posts: 20

Re: Few questions about 802.11 Reference Design

Thanks for your helpful advice. It works.

I have another question about rx power measurement. I want to measure the rx power from sta side, but when I simply run the example script "log_capture_two_node_two_flow" and another log_ capture script, there is an error I don't know how to fix it. It shows"   

raise ValueError("The SSID type was {0}".format(type(ssid)))

ValueError: The SSID type was <class 'bool'>"

I didn't change the SSID value. Could you please give me some hints? Thank you!

Offline

 

#10 2017-Mar-09 09:01:59

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

Re: Few questions about 802.11 Reference Design

You have to provide more details about your setup for us to help debug the issue. Ideally we could try to reproduce the bug but we can only do this if we understand the setup.
* What version of the 802.11 ref design?
* What version of Python?
* What network topology (# of AP, # of STA, other Wi-Fi devices, etc)
* Have you made any changes to the C code, wlan_exp Python code or Python example script?

Offline

 

#11 2017-Mar-09 14:13:56

JannieLee
Member
Registered: 2016-Oct-30
Posts: 20

Re: Few questions about 802.11 Reference Design

Hi, I am using 802.11 ref v1.5.3 design and v3.5 python. I configured two WARPs in my experiment, one is working as AP, another is working as a STA. I connected them with a ethernet switch with ETHB cable. At first I modified the program to meet my experiment requirements, but it didn't work. Then I switched to run the example log capture scripts, but this error happened, it never happened before. I tried a lot method to fixed but I failed. I didn't change the python code and the c code.

Thank you.

Offline

 

#12 2017-Mar-09 14:47:26

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

Re: Few questions about 802.11 Reference Design

Can you provide the full output of the script, including the printout of where the exception is occurring? Is the problem in the configure_bss() call for the AP node? Or the add_association() call?

It's possible the problem is related to Python 3.5 (we've had some Py3 compatibility issues). It would be worth trying a recent Python 2.7; I'm currently using 2.7.12.

Offline

 

#13 2017-Mar-09 15:47:27

JannieLee
Member
Registered: 2016-Oct-30
Posts: 20

Re: Few questions about 802.11 Reference Design

I pasted the output from console as below and changed some privacy information.


Initializing experiment

Resetting the network config for all nodes on network 10.0.0.0.
Initializing W3-a-00792
Initializing W3-a-00794
Initializing the time of all nodes on network 10.0.0.0 to: 0

Experimental Setup:
Traceback (most recent call last):

  File "<ipython-input-1-b3afa171deb1>", line 1, in <module>
    runfile('C:/Users/J/Desktop/warp/Mango_802.11_RefDes_v1.5.3/Python_Reference/examples/log/log_capture_two_node_two_flow.py', wdir='C:/Users/J/Desktop/warp/Mango_802.11_RefDes_v1.5.3/Python_Reference/examples/log')

  File "C:\Users\J\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
    execfile(filename, namespace)

  File "C:\Users\J\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/J/Desktop/warp/Mango_802.11_RefDes_v1.5.3/Python_Reference/examples/log/log_capture_two_node_two_flow.py", line 152, in <module>
    node.configure_bss(channel=CHANNEL)

  File "C:\Users\J\Desktop\warp\Mango_802.11_RefDes_v1.5.3\Python_Reference\wlan_exp\node_sta.py", line 73, in configure_bss
    beacon_interval=beacon_interval, ht_capable=ht_capable))

  File "C:\Users\J\Desktop\warp\Mango_802.11_RefDes_v1.5.3\Python_Reference\wlan_exp\cmds.py", line 1532, in __init__
    ht_capable=ht_capable)

  File "C:\Users\J\Desktop\warp\Mango_802.11_RefDes_v1.5.3\Python_Reference\wlan_exp\info.py", line 750, in __init__
    raise ValueError("The SSID type was {0}".format(type(ssid)))

ValueError: The SSID type was <class 'bool'>

Offline

 

#14 2017-Mar-09 20:11:42

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

Re: Few questions about 802.11 Reference Design

That's a strange error... What is the value of the SSID variable at the top of your script? In the reference script it's set to the string "WARP Log 2 Node 2 Flow Ex".

Offline

 

#15 2017-Mar-10 06:57:07

JannieLee
Member
Registered: 2016-Oct-30
Posts: 20

Re: Few questions about 802.11 Reference Design

Thanks for your help. I found the error, the value of ssid was wrongly initialized as "False" in node_sta.py, maybe I changed it incautiously somehow.
Thanks again!

Offline

 

Board footer