WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2007-Apr-15 19:32:52

zrcao
Member
From: Vienna, VA
Registered: 2007-Jan-24
Posts: 121

WARP addressing scheme in OFDM reference design

This post is regarding the WARP addressing scheme used by OFDM reference design. The followings are some pieces of codes from csmaMac.c.

Code:

	myID = warpmac_getMyId();

	//Create an arbitrary address for this node
	unsigned char tmpAddr[6] = {0x16,0x24,0x63,0x53,0xe2,0xc2+myID};
	memcpy(myAddr,tmpAddr,6);

	//Fill an arbitrary routing table so that nodes know each others' addresses
	unsigned char i;
	for(i=0;i<16;i++){
		routeTable[i].addr[0] = myAddr[0];
		routeTable[i].addr[1] = myAddr[1];
		routeTable[i].addr[2] = myAddr[2];
		routeTable[i].addr[3] = myAddr[3];
		routeTable[i].addr[4] = myAddr[4];
		routeTable[i].addr[5] = myAddr[5]+i-myID;
	}


.......

#ifndef MULTIHOPMODE
   memcpy(txBuffer.destAddr,routeTable[(myID+1)%2].addr,6);
#endif

#ifdef MULTIHOPMODE
     memcpy(txBuffer.destAddr,routeTable[2].addr,6);
#endif

I have the following questions:

1. What is the dest MAC for ethernet packets coming out of a host PC ---- the MAC address of another host PC, or the MAC address of the WARP board? How does the host PC acquire the dest MAC address? Since WARP is below the IP layer, ARP doesn't work here.
2. Is it true that WARP encapsulates the whole host PC ethernet packet, including preamble, src and dest address fields, into the data part of WARP MACframe, then add another pair of WARP dest/src address fields as well as other fields?
3. If #ifndef MULTIHOPMODE, why the destination is routeTable[(myID+1)%2]?
4. If # ifdef MULTIHOPMODE, why the next hop is always routeTable[2]?
5. Related with above questions, in your design, how does a WARP figure out  the WARP dest address based on the dest address of the ethernet packet it gets from its host PC?

Last edited by zrcao (2007-Apr-15 19:37:43)

Offline

 

#2 2007-Apr-15 19:49:25

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

Re: WARP addressing scheme in OFDM reference design

1) The PCs at either end of the wireless link are tricked into believing that they are connected via a direct Ethernet link. Thus, the PCs acquire the destination wired MAC addresses using ARP.

2) Yes. The full Ethernet packet is pre-pended by a 24-byte MAC header and post-pended by a 4-byte checksum. The receiving node strips away these extra 28 bytes before sending the packet over Ethernet.

3/4) This code implements two modes- single and multi-hop. In single-hop, all wireless traffic is addressed to one other node. Node 0 always sends to node 1, and node 1 always sends to node 0. In multi-hop mode, nodes 0 and 1 address every packet to node 2. Node 2 implements a MAC-level relay. It re-addresses each received packet to either node 0 or 1 then retransmits it. The other entries in routeTable (indicies 2-15) are currently unused.

5) The destination wireless MAC addresses are currently hard-coded at each node.

Offline

 

Board footer