WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2013-Jun-22 17:39:59

truth
Member
Registered: 2013-May-29
Posts: 49

OFDM reference design problem

Hi,

I am using OFDM reference design.   I have configured noMac,c to FPGA boards (v3)  by SD cards.   Your website shows we must have two PCs and two boards for no noMac.c application.  I have some following questions.


1)  two PCs means two PC each with ISE design Suite?

2) How do I know the ping(address) of  these FPGA boards?

3) The packet is dummy packet in noMac.c right?   And How to observe the received data after connecting ethernet link ,  is it in SDK`s console?

Offline

 

#2 2013-Jun-22 22:26:33

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

Re: OFDM reference design problem

1)  two PCs means two PC each with ISE design Suite?

No. ISE is used to implement the design. Once the .bit file is generated, ISE is no longer used.

2) How do I know the ping(address) of  these FPGA boards?

nomac and csmamac implement wired-wireless bridges. At each WARP node every packet received via Ethernet is transmitted wirelessly, and every packet wireless packet received is transmitted via Ethernet. The nodes have no IP address. They don't even look at packet contents. If you want to use the OFDM ref design as a network connection between two PCs, you must configure the PCs however you would if they were connected directly via Ethernet. I suggest assigning static IP addresses in a non-routable range (10.0.0.1 and 10.0.0.2, for example).


3) The packet is dummy packet in noMac.c right?   And How to observe the received data after connecting ethernet link ,  is it in SDK`s console?

Dummy packet mode is an option in WARPMAC which generates traffic with random payloads at a programmed interval. In this mode the Ethernet interfaces are ignored. This is a useful mode for testing the wireless link in isolation (no dependence on external PCs), but will not enable a link between Ethernet devices connected to WARP nodes.

Offline

 

#3 2013-Jun-24 09:53:12

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

Thanks a lot.

I have  two more questions.

1) To detect the packet in communication,  Do I need to install packet sniffer software, such as Wireshark?

2) I do know there is C code we can use in SDK to get channel estimation data,  but I use SD card to configure two boards, not the Jtag USB,   so if I want to get the channel estimation data, how should I do?

Offline

 

#4 2013-Jun-24 15:12:42

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

Re: OFDM reference design problem

1) There is no requirement to use Wireshark. Wireshark will show all packets transiting a PC's Ethernet interface. This is a good way to understand exactly what is being transmitted and received.

2) You will need to modify the C code to implement the estimate gathering process you require, then offload the resulting data somehow. For low-bandwidth data (i.e. occasional estimate updates) you can print the data to the UART. For real-time updates you will need to use Ethernet, with a corresponding program on the PC to capture and process the packets containing channel estimates. You may want to look at WARPnet for an example of this kind of application.

Offline

 

#5 2013-Jun-24 21:40:51

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

Thanks murphpo.

I made a simple test. First I configure SD card to two FPGA boards with Nomac.c (not any change,so in SISO and via RF A).  Then I connect each PC(two total) with one FPGA board via ethernet(both ETHA),  And I set the IP for two PCs to be 10.0.0.4 and 10.0.0.5.  Finally I switch power on and observe the following phenomenon on FPGA board:

D21 blink;  D23 always on;  D25 off;  D13 and D12 alternate off and on, sometimes D15 and D14  alternate off and on;  D1 always on;  D2  blink;

What does these mean?   and I observe that both computer are sending packets but not receive any packet, and it says no internet access.

Offline

 

#6 2013-Jun-25 20:43:27

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

Re: OFDM reference design problem

The Ethernet LEDs indicate link status and Rx/Tx activity.

The user LEDs (near the hex displays) indicate wireless Rx events. The top LEDs alternate on every good packet reception. The bottom LEDs alternate on every reception with errors. If the link is performing well you should see the top LEDs alternate frequently (well, as frequently as you're sending Ethernet traffic).

A few debugging steps:
-Try the nomac.bit or .bin file provided in the OFDM ref design archive, to rule out any issues with the design you compiled locally

-Verify your PCs can actually communicate by connecting their Ethernet ports directly. If pings don't work with a directly connection they definitely won't work with a wireless one.

-Hard-code the ARP entries on each PC for the other (in an admin cmd.exe instance on the .5 PC, run 'arp -s 10.0.0.4 XX-XX-XX-XX-XX, where replacing the MAC address of the .4 PC; then do the reverse on the other PC). This will skip the ARP request step at the PCs, which will ensure they always send a packet when you run 'ping'.

Offline

 

#7 2013-Jun-26 21:53:59

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

Thanks again.

1)  I have tested the link and confirmed they can ping each other.  And when doing the Bridge(Nomac.c) application,  through Wireshark one laptop(IP address :10.0.0.5) shows some data from source:  10.0.0.4  (another laptop with the address I set), but the destination is 10.255.255.255 with info saying 'ethernet frame check sequence incorrect', what does this mean?  why the destination is not 10.0.0.5?

2)  In SDK, could we customize the packet payload instead of dummy packet?   I find some function like DataFromNetwork,  warpmac_pollDataSource may be useful  but could not find the right place in the C code.

Offline

 

#8 2013-Jun-27 09:36:08

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

Re: OFDM reference design problem

truth wrote:

Thanks again.
1)  I have tested the link and confirmed they can ping each other.  And when doing the Bridge(Nomac.c) application,  through Wireshark one laptop(IP address :10.0.0.5) shows some data from source:  10.0.0.4  (another laptop with the address I set), but the destination is 10.255.255.255 with info saying 'ethernet frame check sequence incorrect', what does this mean?  why the destination is not 10.0.0.5?

WARP can't distinguish packets coming from your computer that are meant for 10.0.0.5 from any other packet coming out of your computer. It's a true Ethernet bridge, sending any and all traffic that it sees on the Ethernet port. That means that, from the perspective of your 10.0.0.5 computer, you will see all packets from 10.0.0.4 -- even ones that do not have a destination of 10.0.0.5. I suspect the packets you are seeing to 10.255.255.255 are just broadcast traffic coming from your 10.0.0.4 PC. Any number of services can send broadcast packets (e.g. dropbox, scanner/printer commands, etc.). You should be able to ping 10.0.0.5 from 10.0.0.4 in this state. Can you?

truth wrote:

2)  In SDK, could we customize the packet payload instead of dummy packet?   I find some function like DataFromNetwork,  warpmac_pollDataSource may be useful  but could not find the right place in the C code.

The OFDM Reference Design PHY and MAC don't care what the payload bytes are. You can change them to whatever you want. When dummy packet mode is off, warpmac_pollDataSource calls emacRx_handler. This function uses DMA to move bytes from the Ethernet MAC into the address pointed to by pktBufPtr. These are the actual payload bytes that the PHY will send. By default, these are full Ethernet frames since they just came from the Ethernet MAC for Ethernet bridging. However, these bytes can be anything you want to send.

Offline

 

#9 2013-Jul-02 22:01:30

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

Thanks again.
two more problems:

1)  After carefully reading the c code,  in warpnet.c  I find the   'unsigned char arpTemplate[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x17, 0xf2, 0xc6, 0x5f, 0x30, 0x08, 0x06, 0x00, 0x01, 0x08, 0x00, 0x06, 0x04, 0x00, 0x01, 0x00, 0x17, 0xf2, 0xc6, 0x5f, 0x30, 0xC0, 0xA8, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xA8, 0xFE, 0xFE};'    should be the payload of the packet,  right?

2) I have set up the communication of modified bridge(Nomac.c which I set the dummypacket mode to be 0),  but why I can`t find the data above?  all the packets I receive another PC are using DropBox Lan sync Discovery protocol or NBNS (NETBIOS name service) protocol?

Offline

 

#10 2013-Jul-03 08:29:54

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

Re: OFDM reference design problem

WARPnet is something else entirely. Are you trying to use that framework? If you just want to have two PCs communicate to each other through a WARP wireless bridge, then you don't need that framework. As we said earlier, you will see all packets from your 10.0.0.4 computer in Wireshark on your 10.0.0.5 computer. This includes DropBox discovery packets as well as any other traffic. It's as if the boards are connected over Ethernet, but in this case Ethernet is actually bridged over a custom wireless link provided by the OFDM Reference Design.

Offline

 

#11 2013-Jul-04 09:41:34

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

So could you just figure out  the place exactly where I can modify the payload?

Offline

 

#12 2013-Jul-04 09:58:18

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

HI chunter,  it`s not the warpnetframework,  I don`t use that one.  It`s the warpnet.c(a C code file) in warpmac for Nomac.c,  what I want to know is how to customize the payload in the code.

Offline

 

#13 2013-Jul-04 10:26:17

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

Re: OFDM reference design problem

warpnet.c is not used in nomac or csmamac. In these applications the packet payloads are copies of Ethernet packets, with a custom MAC header pre-pended.

Offline

 

#14 2013-Jul-04 11:27:26

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

murphpo wrote:

warpnet.c is not used in nomac or csmamac. In these applications the packet payloads are copies of Ethernet packets, with a custom MAC header pre-pended.

So is there any way we can do to modify the ethernet packet?  My research is to send back the channel estimation as the payload.  Thanks a lot

Offline

 

#15 2013-Jul-04 11:41:21

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

Hi murphpo,  after reading the code,

1) I find some connections between these C codes,  the address "EMAC_FIFO_BaseAddr+XLLF_RDFD_OFFSET" seems act as the the place to store the arpTemplate[] (in warpnet.c). It looks very likely arpTemplate[] is just the payload.

2) I think warpnet.c is doing something in Nomac.c because warpmac.c includes warpnet.h.  Could you check that again?

thanks

Offline

 

#16 2013-Jul-04 13:20:26

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

Re: OFDM reference design problem

The variable arpTemplate[] is only used by the function warpnet_sendGratuitousArp(). warpnet_sendGratuitousArp() is not called anywhere in the reference design. We use this function in warpnet experiments that require each node to transmit a packet once at boot to identify themselves to the Ethernet switch.

Offline

 

#17 2013-Jul-04 14:09:46

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

So is there any way we can do to modify the ethernet packet?  My research is to send back the channel estimation as the payload.  Thanks a lot

Offline

 

#18 2013-Jul-04 21:47:45

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

ask for your help again!

My prupose is to transmit a packet I create.

IN Nomac.c,  I define unsigned char arpData[] = { 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB} as the payload I want to send;And in the end of the code I write:
"warpmac_enableDataFromNetwork();

    warpmac_setDummyPacketMode(0);
    void* bufferAdd = (void *)warpphy_getBuffAddr(0);
    memcpy((void *)bufferAdd,(void *)&arpData[0],sizeof(arpData));
    warpmac_prepPktToNetwork(bufferAdd, sizeof(arpData));
    warpmac_startPktToNetwork(sizeof(arpData));


   
    while(1)
    {
        warpmac_pollPeripherals();
    }

    return 0;
}"

Could you point is there any mistake I make?   And I guess I also need to do sth in 'void dataFromNetworkLayer_callback(Xuint32 length, char* payload)',

Offline

 

#19 2013-Jul-04 22:57:25

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

Re: OFDM reference design problem

My prupose is to transmit a packet I create.

Are you trying to create a packet and send it via the OFDM PHY or via Ethernet? What happens when you run the code you posted? At the very least you will need to add an Ethernet header to your payload (look at any packet in Wireshark- there is always a header before the payload). Also, be sure the Ethernet link is active before you attempt to send any packets. It's likely the link is still negotiating for the first few seconds after boot.

Offline

 

#20 2013-Jul-05 14:26:29

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

murphpo wrote:

My prupose is to transmit a packet I create.

Are you trying to create a packet and send it via the OFDM PHY or via Ethernet? What happens when you run the code you posted? At the very least you will need to add an Ethernet header to your payload (look at any packet in Wireshark- there is always a header before the payload). Also, be sure the Ethernet link is active before you attempt to send any packets. It's likely the link is still negotiating for the first few seconds after boot.

Thanks a lot
I creat the packet in my PC and send it through the bridge application in OFDM reference design.  So the flow is packet->ethernet->FPGA Board->phy radio->FPGA board->ethernet->PC.

I run the code and there is no error when compiling but there is no change in wireshark.

What do you mean by saying the ethernet link is active?   how could I judge whether it is active?

Offline

 

#21 2013-Jul-05 23:24:27

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

Re: OFDM reference design problem

What do you mean by saying the ethernet link is active?   how could I judge whether it is active?

Watch the status LEDs near the Ethernet connector and on the connected device (your PC NIC or the switch). The link will go active a few seconds after the MicroBlaze boots.

Offline

 

#22 2013-Jul-07 19:40:08

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

Thanks again,    I try the bridge application firstly and also connect two PCs directly with ethernet link secondly.  I find the packets in two cases are almost the same through WireShark.    So I conclude my bridge application can work.  Now the problem confusing me is that I just can`t control the packet content,   from reading your code in SDK, I think there is a way to do so.  Could you provide the code to transmit a packet with payload(for example char :[01 02 03 04 05 06 05 04 03 02 01]) from one PC to another by Nomac.c?

Offline

 

#23 2013-Jul-08 08:36:59

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

Re: OFDM reference design problem

You'd have to write a PC application to do that. One PC will have to open a socket to the other to send custom data. You might also look into using MATLAB for that as there are a number of ways of doing TCP/IP communication between two computers running MATLAB. The fact that the underlying link will be the OFDM Reference Design shouldn't matter much to the two computers.

Offline

 

#24 2013-Jul-08 10:18:47

truth
Member
Registered: 2013-May-29
Posts: 49

Re: OFDM reference design problem

Actually my final goal is sending back the CSI information ,  as far as I know CSI has been calculated in OFDM_MIMO system.  So in this case do I still need to write a PC application or just to modify the C code in SDK.   I plan to use Nomac.c as the basic thing to run my project.

Offline

 

#25 2013-Jul-08 10:30:42

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

Re: OFDM reference design problem

Then you'll need to modify the C code in the SDK to create a valid Ethernet frame somewhere in memory that contains the information you want to send to the PC. Then you can hand off that Ethernet frame you create to the Ethernet MAC the same way WARPMAC does with the PHY receive buffer.

Offline

 

Board footer