Hi I have a problem of channel detection.
The radio chip used is CC2420. The code is based on on TinyOS-1.x. I want to use CCA to search or detect other channels. Following is part of my code that related to this: uint16_t count = 0; for(ccaCheck = 0; ccaCheck < 400; ccaCheck++) if(!call CC2420RadioControl.getCcaStatus()) count++; if(count > 100) debug(DBG_ERR, "channel =%i is detected \n", call CC2420Control.GetPreset()); The definition of getCcaStatus is : command bool CC2420RadioControl.getCcaStatus(){ return TOSH_READ_RADIO_CCA_PIN(); } However, in my test, it seems incorrect. i use two nodes: One is working on channel 11 and sending out packets at data rate of 2 packets per second. The other node, woking on channel 21, does not send any packets. It uses above code to detect channel. The ouput is: channel = 21 is detected channel = 21 is detected That is not correct. It should not output anything. In my understanding, if CCA pin is low, then the channel has not transmission activity Is my understanding correct? What is wrong with my code? Thanks for any advice. -- Renjie Huang Sensorweb Research Laboratory http://sensorweb.vancouver.wsu.edu/ Washington State University
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help