WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2013-May-27 09:37:01

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

new cognitive MAC protocol

Hi everyone,

I am a newbie with warp. I am working on cognitive radio and i want to design a new cognitive mac protocol and implement it on WARP. So i have few questions to know exactly what can be done with the boards.
First, to have an idea, i have read the CSMA MAC proposed. So I want to know for example, how to create new packet types (for the cognitive protocol) in addition to the 2 types on CSMA (DATA and ACK). Also, in the literature, a lot of protocols use TDMA. So i want to know if there is a way to implement the notion of time slot and how to deal with tight synchronization problem.   

Thank you for help

Offline

 

#2 2013-May-27 10:18:59

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

Re: new cognitive MAC protocol

taherchan wrote:

So I want to know for example, how to create new packet types (for the cognitive protocol) in addition to the 2 types on CSMA (DATA and ACK).

Yes, you can easily create new packet types and fill them into the MAC header so that your receiver knows what they are. For example, one of our workshop exercises uses a toy MAC protocol called COGMAC that has another type of packet that contains the channel number that a server will hop to so that clients can also hop there and stay connected.

taherchan wrote:

Also, in the literature, a lot of protocols use TDMA. So i want to know if there is a way to implement the notion of time slot and how to deal with tight synchronization problem.

This is possible, but is more challenging. One thing you could do use create a new type of packet that everyone in the network uses to start a warp_timer when received.This would be the beginning of a time slot. Periodically, you could exchange these packets to keep these timing windows synchronized.

Offline

 

#3 2013-May-27 18:14:35

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Than for your replies.
I have a question concerning the OFDM Reference Design - CSMA Link. I wanted to try this application but i have problems to make it work.
I downloaded the file "download-csmamac.bit" from the last reference Design on the SD card (following the steps in the website). I set the DIP SW SW2 correctly (i think because the LEDs D6 D7 are showing respectively on the 2 boards 00 and 01). But i could not ping the PC connected to the WARP ( I tried a connection with a switch between the 2 PC to confirm that the problem is within my configuration on the WARP and )

Thank you for help

Offline

 

#4 2013-May-27 23:46:36

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

Re: new cognitive MAC protocol

A few ideas-

-What's the RF link between WARP nodes (antennas? cable+attenuator?) and how far apart are the nodes?

-Are both PCs configured for 1Gb links with auto MDI/MDI-X enable (i.e. do the PCs establish a good 1Gb Ethernet link with both WARP nodes? The OFDM ref design only implements a 1Gb non-crossover Ethernet configuration).

-Does the NOMAC example work any differently?

-Do you see the Tx LED (green LED near "RF A") blink when the PC sends an Ethernet packet? Do the user LEDs (D8-D11) blink to indicate reception of packets? Do the top 2 or bottom 2 LEDs blink (top = good Rx packet, bottom = bad Rx packet)?

Offline

 

#5 2013-May-28 15:23:41

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

-i am using antennas and they are very close
- For the cables i have non crossover ones. And i worked with the same cables with WARPLAB. But how do I know that is working properly? The 3 LEDs next to each Gb interface what do they represent?
- I did not tried yet noMAC  but i will now.
- For the Tx LED (green LED near "RF A"), it is not working (D1 is red and D2 is tuned off) and none of the user LEDs (D8-D11) is blinking.
What i have done, is i downloaded the .bit file in the memory card, i set propoerly the dIP SW for the corresponding SLOT. I set properly the DIP SW for the node ID like in here http://warpproject.org/trac/wiki/WARPLa … ngStarted.
I connected my 2 laptops to each ETH A. when i turned on the WARP, D6 was was blinking strangely displaying 1 and 0. so i tried ETH B. Then i get from the 7seg 00 and 01 respectively . But for both interfaces, user LEDs are not blinking. So i don't know what i did wrong exactly.

Offline

 

#6 2013-May-29 13:43:14

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

Re: new cognitive MAC protocol

The OFDM ref design only uses ETH A. When using csmamac the left hex display shows the current re-transmit count (see code in timer_callback). You should see the RF A green Tx LED (D2) blink very briefly for every wireless transmission. You may need to increase the packet rate to actually see it illuminate. Try hard-coding an ARP entry on one PC to a broadcast address (arp -s 10.0.0.244 ff-ff-ff-ff-ff-ff) and then send lots of pings to that address. You should see the Tx LED light up, and some activity on the user LEDs at the other node to indicate packet receptions.

Offline

 

#7 2013-Jun-12 22:42:39

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Hi everybody,

I am trying to to generate .bit file for the cogMAC project (server and client) but i am facing few problems.
So i was following the tutorial from here http://warpproject.org/trac/wiki/OFDMRe … t_Creation .
But when i arrive to the step "The project will now build to completion, printing elfcheck passed" i got this error "src/MAC/COGMAC/cogmac_server.c:18:30: fatal error: ascii_characters.h: No such file or directory compilation terminated." But i already included the path for the WARPMAC and I see all the files on the WAPMAC directory
And  by comparing my project to CSMAMAC and NOMAC I can see that  under Includes "C:\w3_OFDM_ReferenceDesign_v18p1\SDK_Workspace\w3_OFDM_ReferenceDesign_v18p1_bsp\microblaze_0\include" does not exist.
Also for  the step  "Assign Code Sections to iocm, Data sections to docm, Heap/Stack to xps_bram_if_cntlr_1", I don't have "docm"  i have only "xps_bram_if_cntlr_0" "xps_bram_if_cntlr_1" "xps_bram_if_cntlr_2" as choice.

Thank you for help

Offline

 

#8 2013-Jun-13 09:07:49

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

Re: new cognitive MAC protocol

Are you able to build nomac and csmamac successfully?

Try changing the #include in cogmac_server/client to match the paths used in csmamac.c (i.e. #include "util/ascii_characters.h")

Offline

 

#9 2013-Jun-13 15:47:05

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Thank you for your answer.
Yes I am able to build nomac and csmamac successfully.
I will try this and I'll let you know.
Thank you again

Offline

 

#10 2013-Jun-13 21:02:16

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Hi,

So after after changing  the #include the build succeed.
But for the next step which is "Assign Code Sections to iocm, Data sections to docm, Heap/Stack to xps_bram_if_cntlr_1", I don't have "docm" and "iocm".  i have only "xps_bram_if_cntlr_0" "xps_bram_if_cntlr_1" "xps_bram_if_cntlr_2" and DDR_"GB as choice. So what are the associations that i have to do?
and for the step "Debugger Options: Set the ISOCM field to: 0x00000000 isocmsize 65536 isocmdcrstartadr 0x100" (I am using xilinx design tools 14.1 and warp v3)

Thank you for help

Offline

 

#11 2013-Jun-13 22:14:54

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

Re: new cognitive MAC protocol

But for the next step which is "Assign Code Sections to iocm, Data sections to docm, Heap/Stack to xps_bram_if_cntlr_1", I don't have "docm" and "iocm".  i have only "xps_bram_if_cntlr_0" "xps_bram_if_cntlr_1" "xps_bram_if_cntlr_2" and DDR_"GB as choice. So what are the associations that i have to do?

You can assign code and data to xps_bram_if_cntlr_0 and xps_bram_if_cntlr_1. xps_bram_if_cntlr_2 must not have any assignments (it's the PHY packet buffer).

and for the step "Debugger Options: Set the ISOCM field to: 0x00000000 isocmsize 65536 isocmdcrstartadr 0x100" (I am using xilinx design tools 14.1 and warp v3)

That step is a workaround for an SDK/XMD bug for the PPC405 in Virtex-4 chips. You can skip that step for WARP v3.

Offline

 

#12 2013-Jun-14 08:29:38

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Hi,

Thank you again for answering
For the cogmac_client in the step  "The project will now build to completion, printing elfcheck passed" after setting the path for the WARPMAC i got this error "w3_OFDM_ReferenceDesign_v18p1/SDK_Workspace/src/MAC/COGMAC_client/cogmac_client_hw.c:419: undefined reference to `XIo_Out32' collect2: ld returned 1 exit status". The code is here : "http://warpproject.org/trac/browser/ResearchApps/MAC/Workshop_MACs/COGMAC_client" right.

Thank you

Offline

 

#13 2013-Jun-14 08:44:57

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

Re: new cognitive MAC protocol

XIo_Out32 has been renamed Xil_Out32, and XIo_In32 is now Xil_In32. You'll have to change all references to these macros in the cogmac code.

Offline

 

#14 2013-Jun-14 10:37:43

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

thank you.

Ok but where do i have to change it because i don't see "Xlo_Out32" in the cogmac_client_hw.c

Thank you

Offline

 

#15 2013-Jun-14 11:24:24

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

Re: new cognitive MAC protocol

w3_OFDM_ReferenceDesign_v18p1/SDK_Workspace/src/MAC/COGMAC_client/cogmac_client_hw.c:419:

What's on line 419? It's probably a macro that wraps a call to XIo_Out32.

Offline

 

#16 2013-Jun-14 14:03:18

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Hi,

The error (undefined reference to `XIo_Out32') is the same for all of this : "mimo_ofdmTxRx_setMatch0", "mimo_ofdmTxRx_setMatch1", "mimo_ofdmTxRx_setAction0" and "PHY_HEADERTRANSLATE_SET"

Thank you for help

Offline

 

#17 2013-Jun-14 14:27:25

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

Re: new cognitive MAC protocol

Sorry, I was wrong above- XIo_Out32/In32 are still defined (so are the Xil_ versions, I think; just in a different header).

What includes does your top-level MAC have? Does it match the reference MACs for the current ref design?

Code:

#include "util/ascii_characters.h"
#include "util/ofdm_txrx_mimo_regMacros.h"
#include "util/ofdm_agc_mimo_regMacros.h"

xio.h is included via ofdm_txrx_mimo_regMacros.h. Your code must include xio.h via some route (directly or via another include).

Offline

 

#18 2013-Jun-14 15:32:39

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Hi,

So i added:
#include "util/ascii_characters.h"
#include "util/ofdm_txrx_mimo_regMacros.h"
#include "util/ofdm_agc_mimo_regMacros.h"
and it builded successfully.

Thank you for the help.

Offline

 

#19 2013-Jun-18 10:18:39

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Hi everybody,

I have a little question.
So I have tested the NoMAC and and CSMAC. So everything is working when I use Iperf, with wireshark I can see that all the packets are received by the destination. The problem is when I try streaming for example using MPEG TS with VLC. On the destination i can't find any stream to read with VLC. I have noticed, with wireshark, that on the source the protocol of the packets is MPEG TS but for the destination it is only UDP. And it is not a problem of firewall because i tried the same config by connecting the 2 laptops directly and i streamed a video. So I don't know exactly what is the problem.

Thank you for help

Offline

 

#20 2013-Jun-18 15:51:06

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Hi again,

I am trying to use cogmac_server and cogmac_client.  I generated the 2 bitstreams and downloaded them to the boards.
I set cogmac server DIP LED as 000 initially...and IP as 10.0.0.20 and for cogmac client as 001 and IP as 10.0.0.1. I can see that on the server node LED 06 is changing (I presume that is the channel hopping).
However, Nothing is changing on the client node and i can't ping the pc attached to the client.
I already tried nomac and csmac and they are working fine except the little thing that i mentioned in my previous message.

Thank you for help.

Offline

 

#21 2013-Jun-18 19:48:21

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

Re: new cognitive MAC protocol

So I have tested the NoMAC and and CSMAC. So everything is working when I use Iperf, with wireshark I can see that all the packets are received by the destination. The problem is when I try streaming for example using MPEG TS with VLC. On the destination i can't find any stream to read with VLC. I have noticed, with wireshark, that on the source the protocol of the packets is MPEG TS but for the destination it is only UDP. And it is not a problem of firewall because i tried the same config by connecting the 2 laptops directly and i streamed a video. So I don't know exactly what is the problem.

I'm not sure what this problem is. If Wireshark is showing received packets, then it seems the OFDM ref design is working. Maybe try other encodings from the VLC source (i.e. raw instead of MPEG TS)?

I am trying to use cogmac_server and cogmac_client.  I generated the 2 bitstreams and downloaded them to the boards.
I set cogmac server DIP LED as 000 initially...and IP as 10.0.0.20 and for cogmac client as 001 and IP as 10.0.0.1. I can see that on the server node LED 06 is changing (I presume that is the channel hopping).
However, Nothing is changing on the client node and i can't ping the pc attached to the client.

You'll have to dig into the code and figure out whether the client is receiving any packets. I would suggest adding prints to the goodHeader callback to see if the node is receiving anything.

Also worth trying would be to modify the server and client code to disable frequency hopping to ensure they're actually working normally if tuned to the same channel.

Offline

 

#22 2013-Jun-19 09:54:13

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Thank you for answering.

So to figure out whether the client is receiving any packets and see the messages, i have to connect to the using the UART on a PC and a terminal like putty?

Thank you for help

Offline

 

#23 2013-Jun-19 22:49:01

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

Re: new cognitive MAC protocol

So to figure out whether the client is receiving any packets and see the messages, i have to connect to the using the UART on a PC and a terminal like putty?

That's a useful debugging setup, yes. Pings not working is a very high level observation- we need to isolate variables to understand why the link doesn't appear to work. Disabling channel hopping is a good first step. Observing whether the Rx node receives any packets is another.

Offline

 

#24 2013-Jun-20 15:19:22

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

thank you for the aswer. So i will do that.
I have another question. So by chance i discovered in the forum that there is  function to setup the DIF timer (ofdm_txrx_mimo_WriteReg_Rx_PktDet_setDIFSPeriod()), so I want to know if there is any document or regrouping the functions creating in the WARPMAC framework.

Thank you

Offline

 

#25 2013-Jun-20 17:19:02

taherchan
Member
Registered: 2013-Apr-01
Posts: 31

Re: new cognitive MAC protocol

Hi again,

I want to implement RTS/CTS mechanism but i don't know how to do that and  from where to start.
Can anybody help me with this.

thank you

Offline

 

Board footer