wireless sensor networks: mac protocol of a point-to-point nbe network

17
05.12.12 Daniele Antonioli 606082 1 Wireless Sensor Networks Lab Work #3 MAC Protocol Point to point Non Beacon Enable Network

Upload: daniele-antonioli

Post on 14-Dec-2014

115 views

Category:

Technology


1 download

DESCRIPTION

Lab measure on a coordinator and a sensor exchanging data in Non Beacon Enable mode. Check the randomness of the access to the channel by varying BE min . Evaluate the throughput by varying the payload of the packets transmitted.

TRANSCRIPT

Page 1: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 1

Wireless Sensor Networks

Lab Work #3

MAC ProtocolPoint to point

Non Beacon Enable Network

Page 2: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 2

Outline

● Check the randomness of the access to the channel by varying BEmin

● Evaluate the throughput by varying the Payload of the packets transmitted

Page 3: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 3

Non Beacon Enable Network

Page 4: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 4

Non Beacon Enable Network

Unslotted CSMA/CA Protocol

Page 5: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 5

Theoretical Results

Bemin ; Average Delay

Payload ; #ReTx ; Plost

Page 6: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 6

Experiment

Page 7: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 7

How to transmit 50 consecutive packets

case stateDataTx:

App_Tx(); if (count<50)

{count++; gState = stateDataTx;

} else

gState = stateListen; // TS_SendEvent(gAppTaskID_c, gAppEvtDummyEvent_c);

break;

Page 8: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 8

How to change the Payload

static void App_Tx(void){ if( (mcPendingPackets < mDefaultValueOfMaxPendingDataPackets_c) && (mpPacket == NULL) )

................................................... mpPacket->msgData.dataReq.pMsdu = "oooo"; mpPacket->msgType = gMcpsDataReq_c; /* Create the header using coordinator information gained during the scan procedure. Also use the short address we were assigned by the coordinator during association. */ FLib_MemCpy(mpPacket->msgData.dataReq.dstAddr, mCoordInfo.coordAddress, 8); FLib_MemCpy(mpPacket->msgData.dataReq.srcAddr, maMyAddress, 8); FLib_MemCpy(mpPacket->msgData.dataReq.dstPanId, mCoordInfo.coordPanId, 2); FLib_MemCpy(mpPacket->msgData.dataReq.srcPanId, mCoordInfo.coordPanId, 2); mpPacket->msgData.dataReq.dstAddrMode = mCoordInfo.coordAddrMode; mpPacket->msgData.dataReq.srcAddrMode = mAddrMode; mpPacket->msgData.dataReq.msduLength = 4; ...................... }

}

Page 9: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 9

How to change MAC parameter BEmin

case stateSetParam: UartUtil_Print("Setto BEmin", gAllowToBlock_d);

uint8_t param1[1];

*param1=0; App_SetMacPib_Example(gMPibMinBe_c,param1);

uint8_t param[1]; mlmeMessage_t mlmeGet;

mlmeGet.msgType=gMlmeGetReq_c; mlmeGet.msgData.getReq.pibAttribute=gMPibMinBe_c;

mlmeGet.msgData.getReq.pibAttributeValue=param; MSG_Send(NWK_MLME, &mlmeGet);

UartUtil_Print("Getto BEmin", gAllowToBlock_d); UartUtil_PrintHex(param, 1, 0);

gState=stateDataTx; TS_SendEvent(gAppTaskID_c,gAppEvtDummyEvent_c);

break;

Page 10: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 10

How to change MAC parameter BEmin

uint8_t App_SetMacPib_Example(uint8_t attribute, uint8_t *pValue)

{ mlmeMessage_t mlmeSet;

/* Create and execute the Set request */ mlmeSet.msgType = gMlmeSetReq_c;

mlmeSet.msgData.setReq.pibAttribute = attribute; mlmeSet.msgData.setReq.pibAttributeValue = pValue;

return MSG_Send(NWK_MLME, &mlmeSet);}

Page 11: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 11

How to verify BEmin's change

Page 12: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 12

How to verify BEmin's change

Page 13: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 13

Measured Results

● Delays Statistics

● Throughput Statistics

Page 14: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 14

Delays Statistics

Page 15: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 15

Delays Statistics

Page 16: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 16

Delays Comparison

● Bemin=0;● Average

Delay=1263[μsec];● Max

Variation=38[μsec].

● Bemin=3;● Average Delay=

1372[μsec];● Max

Variation=200[μsec].

Averages Difference = 109[μsec]

Min Sniffer Uncertainty = ±360[μsec]

Page 17: Wireless Sensor Networks: MAC protocol of a point-to-point NBE network

05.12.12 Daniele Antonioli 606082 17

Throughput Statistics

Payload = 4BData = 16B

Payload = 17BData = 29B

Payload = 48BData = 64B

# ReTx = 0/50 # ReTx = 0/50 # ReTx = 27/50

# PkLoss = 0 # PkLoss = 0 # PkLoss = 3

Payload = 4BData = 16B

Payload = 17BData = 29B

Payload = 48BData = 64B

# ReTx = 0/50 # ReTx = 0/50 # ReTx = 27/50

# PkLoss = 0 # PkLoss = 0 # PkLoss = 2