RangeTest
All
SmartMesh IP
devices contain a "radiotest" mode. This can be used to verify antenna matching during manufacturing. Here, we use it to verify the communication range between two motes.
This documentation was put together using
SmartMesh IP
running the "SmartMesh IP mote, ver 1.3.0.24" firmware
Overview and Principle
We will be testing the range between 2 motes:
- the transmitter mote will be configured in "radiotest" mode to continuously be sending a 40B packet every 5ms, round robin over 4 frequencies (2.405GHz, 2.425GHz, 2.445GHz, 2.465GHz).
- the receiver mote will be configured in "radiotest" mode to listen for 2 seconds on of those frequencies. During this window, the receiver mote SHOULD receive 100 packets if the link is perfect. If the motes are far appart and/or the link is obstructed, less than 100 packets will be received, which indicate a less-than-ideal link. We call "Packet Delivery Ratio" (PDR) the portion of packet received. A link with PDR 100% is perfect, a link with PDR 0% is non=-existant.
The transmitter is sending on average a packet every 10ms, and the receiver listen for approximately 2s, so the number of expected packets received is approximately 100.
Having less-the-perfect links in your network perfectly normal! The deployment recommendations are that each node should have at least 3 other nodes in its neighborhood which which it has link with >50% PDR.
To conduct a range test, you can move the transmitter mote further and further.
Configure the Transmitter Mote
The transmitter mote is configured in radiotest mode over it's CLI interface by the following command:
set mode slave <power cycle the board> radiotest tx pk 0x1111 8 0 40 5000
At this point, the transmitter mote is continuously transmitting packets. Sending a 40 byte packet takes approximately 1280us. Then the mote waits 5000us and sends another packet on another channel. The total is roughly 160 packets per second, or 40 packets per second on each of the four channels.
If you have an IEEE802.15.4-compliant sniffer board listening to one of the channels the transmitter is transmitting on, you can see that the frames transmitted contain a simple incrementing number.
Use the CLI interface on the Receiver Mote
On the receiver mote, you can type the following CLI command to have the mote listen for 2 seconds on channel 0 (2.405GHz)
set mode slave <power cycle the board> radiotest rx 0x1 2 <wait 2 seconds> > Radio Test. RX finished.
The board has now stopped listening. Type the following command to see the number of packets received:
> radiotest stat Radio Test Statistics OkCnt : 97 FailCnt : 1
The OkCnt
counter indicates the number of packets received with a good CRC.
The FailCnt
counter indicates the number of packets received with a bad CRC.
In the example above, the receiver has received 97 good packets, 1 with a bad CRC, and 2 packets were not received at all. The PDR of that link is hence 97%.
The RangeTest
app does the same thing as what you just typed over the CLI, but automatically switching between channels.
Use the RangeTest
app on the Receiver Mote
- Double-click on the
RangeTest.py
file to start the application Connect to the manager by using the
connect
command:connect COM19
The application automatically starts, printing every 2 seconds a new bargraph with the number of packets received per channel
channel=0 -------------------------------------------| 87 channel=4 ---------------------------------------------| 90 channel=8 ----------------------------------------------| 92 * channel=12 --------------------------------------------| 88 Total: 357 packets (89.25%)