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

343 views
223 views

Published on

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.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
343
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

  1. 1. 05.12.12 Daniele Antonioli 606082 1 Wireless Sensor Networks Lab Work #3 MAC Protocol Point to point Non Beacon Enable Network
  2. 2. 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
  3. 3. 05.12.12 Daniele Antonioli 606082 3 Non Beacon Enable Network
  4. 4. 05.12.12 Daniele Antonioli 606082 4 Non Beacon Enable Network Unslotted CSMA/CA Protocol
  5. 5. 05.12.12 Daniele Antonioli 606082 5 Theoretical Results Bemin ; Average Delay Payload ; #ReTx ; Plost
  6. 6. 05.12.12 Daniele Antonioli 606082 6 Experiment
  7. 7. 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;
  8. 8. 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; ...................... } }
  9. 9. 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;
  10. 10. 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); }
  11. 11. 05.12.12 Daniele Antonioli 606082 11 How to verify BEmin's change
  12. 12. 05.12.12 Daniele Antonioli 606082 12 How to verify BEmin's change
  13. 13. 05.12.12 Daniele Antonioli 606082 13 Measured Results ● Delays Statistics ● Throughput Statistics
  14. 14. 05.12.12 Daniele Antonioli 606082 14 Delays Statistics
  15. 15. 05.12.12 Daniele Antonioli 606082 15 Delays Statistics
  16. 16. 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]
  17. 17. 05.12.12 Daniele Antonioli 606082 17 Throughput Statistics Payload = 4B Data = 16B Payload = 17B Data = 29B Payload = 48B Data = 64B # ReTx = 0/50 # ReTx = 0/50 # ReTx = 27/50 # PkLoss = 0 # PkLoss = 0 # PkLoss = 3 Payload = 4B Data = 16B Payload = 17B Data = 29B Payload = 48B Data = 64B # ReTx = 0/50 # ReTx = 0/50 # ReTx = 27/50 # PkLoss = 0 # PkLoss = 0 # PkLoss = 2

×