Sunday, February 1, 2015

Sampling RSSI values in 2.4GHz spectrum

Signals from nearby wi-fi enabled phone
When we need to check RSSI values around 2.4GHz frequency range, we need a spectrum analyzer which can sample signal strength in that frequency. However, since we don't have such an equipment, another easy way to achieve it is using a 2.4GHz transceiver chip which can be programmed to switch between different frequencies in 2.4GHz range and sample the signal strength in each channel. This has become much more easier since we have an app called rssi-scanner which comes with Contiki OS that can run on a Tmote Sky sensor node having a CC2420 transceiver  on board.

This is how I did it. First we have to checkout Contiki source code from the GitHub since currently released Contiki version which is 2.7 at the time of this writing (2015-02-01) does not have this app in the examples directory. It is available in the Sky directory but I didn't try it in that way. So, first we checkout the source code from GitHub using the following command.

git clone https://github.com/contiki-os/contiki.git

Now we should move into the rssi-scanner application which is available in the examples directory.

cd contiki/examples/rssi-scanner

Connect a Tmote Sky sensor mote into the Linux computer (mine is an Ubuntu 12.04 LTS) and run following command to program it with the rssi-scanner app.

make TARGET=sky rssi-scanner-cc2420.upload

Now our sampling device is ready. We need a program which runs on our computer and visualize the sampled RSSI values from Tmote Sky node. For that, we have a java program which is available in the same directory. We compile and run it using the following command. Make sure that your Tmote Sky device is mounted on your Linux computer as a serial device on /dev/ttyUSB0. Sometimes it can be /dev/ttyUSB1 or some other thing in which case, you have to change the command accordingly.

make ViewRSSI.class
make login MOTES=/dev/ttyUSB0 | java ViewRSSI

Now, a window should open where the RSSI values at different frequency channels around 2.4GHz spectrum is displayed in a beautiful graph. Since 802.15.4 and 802.11 both operate in the save 2.4GHz ISM band, I think we can use this RSSI scanner app to check how the channels get affected from both types of transmitters which coexist in a particular place.

Overlapping of 802.11 and 802.15.4 channels. (ref: [1])


References:

[1] Liang, Chieh-Jan Mike, et al. "Surviving wi-fi interference in low power zigbee networks." Proceedings of the 8th ACM Conference on Embedded Networked Sensor Systems (SenSys). ACM, 2010.
Link: http://dl.acm.org/citation.cfm?id=1870014



No comments:

Post a Comment