WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2007-Jun-22 08:01:48

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

Node Addressing

Someone asked:

I'm trying to pick off the source address of incoming data-packets - basically we have one receiver node and two transmitter nodes, and I'll just be streaming traffic to the dest. So here are my questions:

1. I noticed the following lines of code in the DATAPACKET switch statement:

                memcpy(ackPacket.srcAddr,myAddr,6);
                memcpy(ackPacket.destAddr,packet->srcAddr,6);

I tried using ackpacket.srcAddr/ackpacket.destAddr after this statement to get the addy, but I don't think it's valid (I get the same result on both ends, plus changing my computer IPs doesn't effect the number). Thus, I guess a more pertinant question is: how does addressing work in the MAC, and what should I look for to pick off and differentiate data from the two transmitter nodes?

2.  Can I comment out the ethernet_callback on the receiver node, so it won't send data the other way? (not that I really have to)

Offline

 

#2 2007-Jun-22 08:13:26

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

Re: Node Addressing

1) The addressing scheme in the refence design maps dip switch value on the FPGA board to wireless MAC address. At the top of the user code, you can see the struct I created to be a poor man's routing table (http://warp.rice.edu/trac/browser/Resea … aMac.c#L51). Notice that vector of 16 of these structs; there is one for every possible value of the 4-bit dip switch. In the main function, this vector is filled in with arbitrary, but known-to-all, MAC addresses that depend on the myID value lifted from the dipswitches (http://warp.rice.edu/trac/browser/Resea … Mac.c#L262).

Back to your specific problem, if you are seeing the same value for both srcAddr and destAddr, that likely means that you don't have unique myIDs for each of your boards. These addresses have absolutely nothing to do with the higher layers, so your PC's IP address isn't a concern. Another thing to keep in mind: the reference design is quite hardcoded to form a bridge between two nodes. Notice here that all packets originating from node 0 get sent to node 1 and vice versa. If you have only two transmitters and one receiver, you can modify the code to send all packets to the ID of your receiver. ACKS should automatically be returned to the two transmitters if you make sure they have different dip switch values.

2) If you are using a version of the design that still uses polling, you can just comment out the polling operation in the while loop of the main function. If you are using the new reference design, change "warpmac_enableEthernetInterrupt();" to "warpmac_disableEthernetInterrupt();."

Offline

 

Board footer