Hi,
I am now working on MoteWorks with IRIS motes. I want to modify RF power
using XCommand component, through XServeterm tool. In order to achieve this
I wrote this code:
module RFPowerM {
.....
uses interface RF230Control; // the two interfaces are in
RF230ControlM
uses interface SplitControl;
.....
}
Implementation {
......
event result_t XCommand.received(XCommandOp *opcode) {
switch(opcode -> cmd) {
.........
case XCOMMAND_SET_RF_POWER:
rfPower = opcode -> param.rf_power;
if (call RF230Control.SetRFPower(rfPower))
call Leds.yellowToggle();
break;
.........
}
}
When I run this program (default RF power was 0), the yellow led toggled as
soon as I sent command 'set_rfpower 1 15' through XServeterm, and by
'get_config 1' I can see the RF power was set to 15 (before I run this
program, I run another program using MoteConfig to set the power to 15,
which was the lowest, also I removed the antenna so the distance was limited
to 4 meters).
However, the transmit distance has not been any shorter. It seemed that the
command was useless.
Is there anything wrong with my code? How to use the interface
'SplitControl'?
Thanks very much for your patience!
Xavier
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help