WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2014-Nov-07 02:52:37

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Csma

Is there a function in ofdm reference design that returns current channel? Also, if i want to send a packet that contains only phyheader what should i write in txMacframe.header.length?

And another question: when switching to another channel how much time do i have to wait to try transmitting on that channel. I mean when i run warpphy_setchannel function do i need to usleep(?) ?

Last edited by juvebogdan (2014-Nov-07 04:50:12)

Offline

 

#2 2014-Nov-07 16:38:42

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

Re: Csma

Is there a function in ofdm reference design that returns current channel? Also, if i want to send a packet that contains only phyheader what should i write in txMacframe.header.length?

I believe if you set txMacframe.header.length=0 the WARPMAC framework will transmit a header-only packet, consisting of the 22-byte header and 2-byte (16-bit) checksum.

And another question: when switching to another channel how much time do i have to wait to try transmitting on that channel. I mean when i run warpphy_setchannel function do i need to usleep(?) ?

An explicit usleep() should not be required. The MAX2829 PLL settles to a new center frequency quickly - 25usec for 2.4GHz, 35-130usec for 5GHz. See the MAX2829 datasheet for details on settling time vs frequency band.

Offline

 

#3 2015-Jan-19 13:34:07

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Csma

What is the transmit power of WARP boards? I want to use BPSK with 12dBm, QPSK with 15dBm and QAM16 with 18dBm. Do i need to explicitly set trasnmit power with warpphy_setTxPower()? If so what value should i set as a parameter to achieve mentioned powers respectively?

Offline

 

#4 2015-Jan-20 09:53:30

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

Re: Csma

That function controls the Tx VGA gain in the MAX2829 transceiver. See this post for an explanation for how much gain is applied. That post is specifically for WARPLab, but the underlying explanation for the MAX2829 behavior is the same.

The gain applied by the MAX2829 is a relative amount specified in dB. The total amount of power produced by the chip is a function of the signal that drive into it. For the OFDM Reference Design, the best way to figure out the mapping between output power (in dBm) and gain selection is to use something like a spectrum analyzer that can directly measure the output power from the board.

Offline

 

#5 2015-Jan-21 04:23:49

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Csma

Thank you for your response.

Do you know the maximum transmit power? In some research papers i've read that it is 18 dBm (WARP v2). I have WARP v3

Also i want to transmit header only packet with no payload so i set txMacframe.header.length=0, but i want to transmit it using BPSK. Do i set txMacframe.header.fullrate = HDR_FULLRATE_BPSK or call warpmac_setBaseRate(BPSK);

Offline

 

#6 2015-Jan-21 09:20:18

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

Re: Csma

The maximum power of the WARP hardware depends on the waveform you are sending. I've seen WARP v3 transmit an 802.11 waveform up to around 21dBm, but you start to get degradations in the waveform up in that region through the PA. The 802.11 Reference Design provides a Tx power range from -9 dBm to +21 dBm. I'm not sure what the output power of the OFDM Reference Design is. You'd need a spectrum analyzer to directly measure it to be sure.

The OFDM Reference Design adopts the convention that Tx and Rx must have a priori knowledge on the rate selection of the MAC header. You are correct -- you want to use the warpmac_setBaseRate function to set the rate of the header-only packet. Since the receiver is now able to decode the header since it knows the rate, it then uses the fullrate field from that header to switch to whatever rate the payload uses. Since your packets have no payload, the value of fullrate won't matter.

It's worth noting that this behavior is unique to the OFDM Reference Design and is a little different than the 802.11 standard. In 802.11, the MAC header and following payload are encoded at the same rate. This rate is communicated to the receiver in the PHY header's SIGNAL field.

Offline

 

#7 2015-Jan-27 13:41:23

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Csma

I programmed WARP boards with CSMA and run iperf. I got these results:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\~9988888898>cd C:\Users\~9988888898\Desktop\iperf

C:\Users\~9988888898\Desktop\iperf>iper -s -u -i 1
'iper' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\~9988888898\Desktop\iperf>iperf -s -u -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 64.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.2 port 5001 connected with 10.0.0.1 port 56361
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams

[  3]  0.0- 1.0 sec   415 KBytes  3.40 Mbits/sec   5.337 ms  481/  770 (62%)
[  3]  1.0- 2.0 sec   429 KBytes  3.52 Mbits/sec   3.759 ms  543/  842 (64%)
[  3]  2.0- 3.0 sec   459 KBytes  3.76 Mbits/sec   5.324 ms  581/  901 (64%)
[  3]  3.0- 4.0 sec   422 KBytes  3.46 Mbits/sec   8.025 ms  511/  805 (63%)
[  3]  4.0- 5.0 sec   455 KBytes  3.73 Mbits/sec   7.156 ms  534/  851 (63%)
[  3]  5.0- 6.0 sec   423 KBytes  3.47 Mbits/sec   3.991 ms  608/  903 (67%)
[  3]  6.0- 7.0 sec   469 KBytes  3.85 Mbits/sec   7.619 ms  479/  806 (59%)
[  3]  7.0- 8.0 sec   528 KBytes  4.33 Mbits/sec   1.915 ms  525/  893 (59%)
[  3]  8.0- 9.0 sec   419 KBytes  3.43 Mbits/sec   7.205 ms  525/  817 (64%)
[  3]  9.0-10.0 sec   469 KBytes  3.85 Mbits/sec   3.912 ms  529/  856 (62%)
[  3]  0.0-10.3 sec  4.42 MBytes  3.61 Mbits/sec  15.692 ms 5351/ 8503 (63%)
[  4] local 10.0.0.2 port 5001 connected with 10.0.0.1 port 56882
[  4]  0.0- 1.0 sec   498 KBytes  4.08 Mbits/sec   3.494 ms  464/  811 (57%)
[  4]  1.0- 2.0 sec   643 KBytes  5.27 Mbits/sec   3.221 ms  403/  851 (47%)
[  4]  2.0- 3.0 sec   599 KBytes  4.90 Mbits/sec   2.852 ms  432/  849 (51%)
[  4]  3.0- 4.0 sec   551 KBytes  4.52 Mbits/sec   4.153 ms  448/  832 (54%)
[  4]  4.0- 5.0 sec   527 KBytes  4.32 Mbits/sec   5.567 ms  496/  863 (57%)
[  4]  5.0- 6.0 sec   402 KBytes  3.29 Mbits/sec   9.516 ms  502/  782 (64%)
[  4]  6.0- 7.0 sec   544 KBytes  4.46 Mbits/sec   3.407 ms  550/  929 (59%)
[  4]  7.0- 8.0 sec   512 KBytes  4.20 Mbits/sec   2.896 ms  494/  851 (58%)
[  4]  8.0- 9.0 sec   590 KBytes  4.83 Mbits/sec   3.519 ms  439/  850 (52%)
[  4]  9.0-10.0 sec   596 KBytes  4.88 Mbits/sec   2.001 ms  435/  850 (51%)
[  4]  0.0-10.1 sec  5.37 MBytes  4.45 Mbits/sec   6.823 ms 4674/ 8503 (55%)
[  4]  0.0-10.1 sec  1 datagrams received out-of-order

I didn't expect this? Why is the loss this high?

I also tried ad-hoc network between my two computers without WARP boards and got same results but with 0% loss but i expected at least 6Mbits/sec since i used 802.11b

Offline

 

#8 2015-Jan-27 14:57:51

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

Re: Csma

juvebogdan wrote:

I didn't expect this? Why is the loss this high?

I also tried ad-hoc network between my two computers without WARP boards and got same results but with 0% loss but i expected at least 6Mbits/sec since i used 802.11b

What bandwidth were you requesting on the client iperf session?. You'd expect to see large loss rates if you are asking for a bandwidth larger than you can achieve (which, according to your terminal output is ~3-5 Mbps). Those "lost" packets aren't over-the-air decoding failures, they are packets that arrived too quickly at your transmitting board and were dropped at the wire. Note: the 802.11 Reference Design has a Tx queue in the DRAM that does a much better job than the OFDM Reference Design at buffering packets for transmission rather than dropping them. This doesn't matter for fixed rate UDP traffic, but it makes a huge difference for bursty TCP traffic.

The fact you didn't see any losses on a Wi-Fi link between computers probably means that the requested iperf bandwidth was sufficiently low that you didn't overwhelm the Tx queue.

Offline

 

#9 2015-Jan-27 15:50:03

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Csma

On the client i set

iperf -c 10.0.0.2 -u -b 10m

Offline

 

#10 2015-Jan-28 20:53:28

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

Re: Csma

What modulation/coding rates did you set in the CSMA code? The iperf command above will generate 10Mb/s of traffic. If you set the PHY rate lower than this you would expect to see many packet losses over the wireless link.

Offline

 

#11 2015-Jan-31 07:46:44

juvebogdan
Member
Registered: 2013-Sep-17
Posts: 76

Re: Csma

i've set HDR_FULLRATE_QPSK and HDR_CODE_RATE_34.

Offline

 

#12 2015-Feb-01 13:03:11

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

Re: Csma

In the OFDM Reference Design the PHY datarate for QPSK modulation at 3/4 rate code is 9Mb/s (48 subcarriers/80 samples * 2 bits/subcarrier * 10Msamp/sec * 3 data bits/4 coded bits). With PHY overhead (preamble, training) and MAC overhead (carrier sensing, ACKs) the achievable throughout is less than 9Mb/s.

Offline

 

Board footer