X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=apps%2Ftests%2Fcc2420%2FTestSecurity%2FBaseStation%2FBaseStationP.nc;h=7dfd3ebcf3ea6956db3994a298fcd89fa77c3270;hb=cdd3f40183dcd6b0afb3b1ce7c73efb204f0c9ad;hp=2e647c7f83c6429b89f9c2ab7de285cc82cd507f;hpb=313b72645b514918ac30fed555c34160853a0dfc;p=tinyos-2.x.git diff --git a/apps/tests/cc2420/TestSecurity/BaseStation/BaseStationP.nc b/apps/tests/cc2420/TestSecurity/BaseStation/BaseStationP.nc index 2e647c7f..7dfd3ebc 100644 --- a/apps/tests/cc2420/TestSecurity/BaseStation/BaseStationP.nc +++ b/apps/tests/cc2420/TestSecurity/BaseStation/BaseStationP.nc @@ -63,6 +63,8 @@ module BaseStationP @safe() { interface Packet as RadioPacket; interface AMPacket as RadioAMPacket; + interface CC2420Keys; + interface Leds; } } @@ -84,6 +86,8 @@ implementation uint8_t radioIn, radioOut; bool radioBusy, radioFull; + uint8_t key[16] = {0x98,0x67,0x7F,0xAF,0xD6,0xAD,0xB7,0x0C,0x59,0xE8,0xD9,0x47,0xC9,0x71,0x15,0x0F}; + task void uartSendTask(); task void radioSendTask(); @@ -117,6 +121,7 @@ implementation event void RadioControl.startDone(error_t error) { if (error == SUCCESS) { radioFull = FALSE; + call CC2420Keys.setKey(1, key); } } @@ -129,6 +134,8 @@ implementation event void SerialControl.stopDone(error_t error) {} event void RadioControl.stopDone(error_t error) {} + event void CC2420Keys.setKeyDone(uint8_t keyNo, uint8_t* skey) {} + uint8_t count = 0; message_t* ONE receive(message_t* ONE msg, void* payload, uint8_t len);