- 浏览: 887193 次
- 性别:
- 来自: 太原
文章分类
- 全部博客 (198)
- Linux/Unix (38)
- TinyOS / NS-2 for『WSN』 (44)
- 思想的拼图 (5)
- 开源 OpenSource (2)
- Framework 开发框架 (0)
- Software Engineering 软件工程 (2)
- IT项目管理 (6)
- Networking 网络技术 (2)
- Java (6)
- C语言 ANSI C (22)
- .NET / C# (9)
- C++ (12)
- Web 语言 Html/Xml (5)
- Groovy on Grails (1)
- Algorithm 算法 (1)
- Database 数据库技术 (5)
- Tools (21)
- VM 虚拟机 (3)
- WSN (wireless sensor network) (2)
- Linux 命令专辑 (3)
- PHP (0)
- 办公软件 (3)
最新评论
-
cfczdws:
感谢楼主,查了半天终于发现居然是htmlentities()做 ...
htmlentities()函数把中文转成了乱码 -
decoxiaohan:
这本书的名字 有谁知道????~~~
OMNeT++中文用户手册(完全版) -
huonie:
怎么下载啊
OMNeT++中文用户手册(完全版) -
huonie:
没有内容啊
OMNeT++中文用户手册(完全版) -
kyx0413:
谢谢先 先看看
OMNeT++中文用户手册(完全版)
使用 CC2420Packet 中 setPower 来改变每个消息包的tx power
There are 8 discrete power levels each corresponds to RF transmit power
>> > Power level Transmitted power level
>> > 31 0dbm
>> > 27 -1dbm
>> > 23 -3dbm
>> > 19 -5dbm
>> > 15 -7dbm
>> > 11 -10dbm
>> > 7 -15dbm
>> > 3 -25dbm
原文
Hi Prem,
As Christian pointed out, to reduce the transmission range you have to
reduce the transmission power. In Tinyos 2 with a platform with the
cc2420 (such as MicaZ and the Tmotes), you can use either a flag in the
makefile:
CFLAGS += "-DCC2420_DEF_RFPOWER=1"
or you can dynamically change the tx power at runtime (individually for
every packet) with something like (wire in the CC2420PacketC module):
call CC2420Packet.setPower(&rpacket, 1);
You'll have to issue that call for every packet prior to sending it.
Reducing the TX power to its minimum I get a maximum transmission range
of roughly 3 meters under ideal conditions.
Cheers,
Urs
/** * Set transmission power for a given packet. Valid ranges are * between 0 and 31. * * @param p_msg the message. * @param power transmission power. */ async command void setPower( message_t* p_msg, uint8_t power );
There are 8 discrete power levels each corresponds to RF transmit power
>> > Power level Transmitted power level
>> > 31 0dbm
>> > 27 -1dbm
>> > 23 -3dbm
>> > 19 -5dbm
>> > 15 -7dbm
>> > 11 -10dbm
>> > 7 -15dbm
>> > 3 -25dbm
原文
引用
I'm looking to control the default radio power level at runtime for
Telos motes using TinyOS-2.x. In tos/chips/cc2420/CC2420Power.nc I
see the following comment:
"[This] does not include transmission power, see the CC2420Config interface."
However, the CC2420Config interface does not include any command to
set the default radio power level. The file
tos/chips/cc2420/CC2420ControlP.nc includes a state variable
'm_tx_power' that is initialized to CC2420_DEF_RFPOWER; however, that
variable is never used. The file tos/chips/cc2420/CC2420TransmitP.nc
directly uses CC2420_DEF_RFPOWER to set the default power level:
if ( !tx_power ) {
// If our packet's tx_power wasn't configured to anything but 0,
// send it using the default RF power. This assumes the
// packet's metadata is all set to 0's on boot.
tx_power = CC2420_DEF_RFPOWER;
}
It looks to me like the original intent was to provide a software
interface for setting the default radio power level via the
CC2420Config, but that its realization got lost along the way. With
the current implementation, I cannot see a way to set the default
radio power in software.
One way to resolve this would be to add two new commands to the
CC2420Config interface:
command uint8_t getDefaultTxPower();
command void setDefaultTxPower(uint8_t txPower);
Then, in CC2420ControlP add implementations of those commands (again,
'm_tx_power' is already declared in this module and initialized to
CC2420_DEF_RFPOWER):
command uint8_t CC2420Config.getDefaultTxPower() {
return m_tx_power;
}
command uint8_t CC2420Config.setDefaultTxPower(uint8_t txPower) {
m_tx_power = txPower;
}
Then, in CC2420TransmitP use the CC2420Config interface, and call the
getDefaultTxPower command to set the default power:
if ( !tx_power ) {
// If our packet's tx_power wasn't configured to anything but 0,
// send it using the default RF power. This assumes the
// packet's metadata is all set to 0's on boot.
tx_power = call CC2420Config.getDefaultTxPower();
}
Does this seem reasonable? Am I missing some other mechanism to set
the default radio power level in software?
Thanks in advance for your assistance.
Looks like the comments are out of date with respect to the implementation.
Based on experiences in implementing protocols, the general approach TinyOS takes these days for things like TX power control, acknowledgements, etc., is to make them per-packet. Otherwise protocol A changes the radio settings, which causes protocol B to break. If you take a look at CC2420Packet, there's a command to set the TX power level of a given packet.
Phil
Telos motes using TinyOS-2.x. In tos/chips/cc2420/CC2420Power.nc I
see the following comment:
"[This] does not include transmission power, see the CC2420Config interface."
However, the CC2420Config interface does not include any command to
set the default radio power level. The file
tos/chips/cc2420/CC2420ControlP.nc includes a state variable
'm_tx_power' that is initialized to CC2420_DEF_RFPOWER; however, that
variable is never used. The file tos/chips/cc2420/CC2420TransmitP.nc
directly uses CC2420_DEF_RFPOWER to set the default power level:
if ( !tx_power ) {
// If our packet's tx_power wasn't configured to anything but 0,
// send it using the default RF power. This assumes the
// packet's metadata is all set to 0's on boot.
tx_power = CC2420_DEF_RFPOWER;
}
It looks to me like the original intent was to provide a software
interface for setting the default radio power level via the
CC2420Config, but that its realization got lost along the way. With
the current implementation, I cannot see a way to set the default
radio power in software.
One way to resolve this would be to add two new commands to the
CC2420Config interface:
command uint8_t getDefaultTxPower();
command void setDefaultTxPower(uint8_t txPower);
Then, in CC2420ControlP add implementations of those commands (again,
'm_tx_power' is already declared in this module and initialized to
CC2420_DEF_RFPOWER):
command uint8_t CC2420Config.getDefaultTxPower() {
return m_tx_power;
}
command uint8_t CC2420Config.setDefaultTxPower(uint8_t txPower) {
m_tx_power = txPower;
}
Then, in CC2420TransmitP use the CC2420Config interface, and call the
getDefaultTxPower command to set the default power:
if ( !tx_power ) {
// If our packet's tx_power wasn't configured to anything but 0,
// send it using the default RF power. This assumes the
// packet's metadata is all set to 0's on boot.
tx_power = call CC2420Config.getDefaultTxPower();
}
Does this seem reasonable? Am I missing some other mechanism to set
the default radio power level in software?
Thanks in advance for your assistance.
Looks like the comments are out of date with respect to the implementation.
Based on experiences in implementing protocols, the general approach TinyOS takes these days for things like TX power control, acknowledgements, etc., is to make them per-packet. Otherwise protocol A changes the radio settings, which causes protocol B to break. If you take a look at CC2420Packet, there's a command to set the TX power level of a given packet.
Phil
引用
Hi Prem,
As Christian pointed out, to reduce the transmission range you have to
reduce the transmission power. In Tinyos 2 with a platform with the
cc2420 (such as MicaZ and the Tmotes), you can use either a flag in the
makefile:
CFLAGS += "-DCC2420_DEF_RFPOWER=1"
or you can dynamically change the tx power at runtime (individually for
every packet) with something like (wire in the CC2420PacketC module):
call CC2420Packet.setPower(&rpacket, 1);
You'll have to issue that call for every packet prior to sending it.
Reducing the TX power to its minimum I get a maximum transmission range
of roughly 3 meters under ideal conditions.
Cheers,
Urs
发表评论
-
几种用于WSN的仿真工具
2009-12-09 15:26 4185为评价无线传感器网络协议算法的性能,仅通过实验是无法实现的,特 ... -
OMNeT++中文用户手册(完全版)
2009-11-18 22:36 16538http://www.netforum.com.cn/view ... -
改变Telos 系列节点Serial baud rate
2009-08-21 18:50 2148如果节点与PC通信时出现非正常丢包或者serial不稳定当收包 ... -
TinyOS编译问题
2009-08-18 20:47 12881. 有时候编译提示找不到某个文件时, 可能是由于在linux ... -
Tcl/tk 小记
2009-07-22 23:43 14671. 检查variable变量是否声明 在使用Tcl时候会经常 ... -
NS无线仿真中无法设置节点颜色的解决方案
2009-07-22 18:57 1898NS中提供了配置节点与 ... -
awk: malloc(): memory corruption 错误
2009-07-09 21:56 7194问题如下: *** glibc detected *** aw ... -
ns2 对无线网络模拟
2009-07-06 19:52 2618在模拟无线网络时需要对tcl模拟脚本文件的参数进行设置,比如P ... -
使用Gnuplot 绘制ns2模拟结果图
2009-06-25 17:48 8167Gnuplot(command-driven inter ... -
ns2模拟无线网络的NAM动画
2009-06-24 22:26 4949无线的各个参数 ####################### ... -
ns2 模拟WSN协议之手记
2009-06-23 23:55 2860ns2中模拟WSN,用Timestamp时间戳计算点对点Del ... -
ns2 中得到Agent的实例
2009-06-16 21:02 2882下面代码说明了如何访问其他节点的Agent,以AODV协议为例 ... -
TinyOS使用MIG时报错!
2009-04-06 01:30 1796在Makefile中加入启用MIG的选项后,编译出现一下错误: ... -
Tinyos 2.0 笔记小结(1)
2009-03-16 20:11 23061. configure组件注意事项 一般在confi ... -
Tinyos 2.0使用笔记
2009-03-06 19:48 27471.编译与安装程序到节点 引用 $ make mica2 ... -
Tinyos 中常用术语
2009-03-05 03:32 1057EOFF 关断能量损耗 用于 device off, stop ... -
什么是 nx_ type
2009-03-01 03:29 1466nx_ types 是在nesC 1.2,tinyos中用到的 ... -
TinyOS 下安装 JNI 的问题
2009-02-25 00:05 31711. "java not found, not i ... -
『TinyOS』学习笔记 #11?
2009-02-20 01:09 3752Lesson 11 TOSSIM Compiling ... -
TinyOS在Linux下编译的问题 sudo make <platform>
2009-02-19 01:00 2789安装好TinyOS后,正准备编译一下Blink这个例子小试牛刀 ...
相关推荐
power_flow_9_bus_6节点潮流_6节点_6节点潮流计算_潮流计算_ieee_源码.zip
power_flow_9_bus_6节点潮流_6节点_6节点潮流计算_潮流计算_ieee_源码.rar
电力系统的暂态计算程序 适用于任何系统,包括三机九节点, IEEE14节点等各种情况的电力系统。计算发电机的极限切除角
节点重要度算法-MATLAB源代码_重要度matlab_节点重要度_重要度_重要节点_节点_源码.zip
计算网络节点的重要程度,依据节点重要程度,对网页排序
计算网络节点收缩后的节点重要度,并对电源节点和负荷节点进行归一化
IEEE33节点 69节点潮流计算Matlab程序
GM MOBILE MODEL_马尔可夫节点_移动节点_移动模型_matlab_移动节点模型_源码.zip
电力系统IEEE57节点系统潮流计算所需数据
简单的三节点系统最优潮流,包含发电机的经济参数,用于OPF计算分析。
基于matpower 的新英格兰39节点潮流计算
GM MOBILE MODEL_马尔可夫节点_移动节点_移动模型_matlab_移动节点模型.zip
节点收缩法完整代码,网络带入即可出结果,对网络的节点进行收缩,求得网络中节点的重要程度,用来评价网络中节点重要性的有效模型
十三节点模型,已经搭建好的模型。用于微电网仿真
节点重要度算法-MATLAB源代码_重要度matlab_节点重要度_重要度_重要节点_节点.zip
电力系统14节点潮流计算程序,简单的小程序
计算潮流 IEEE14 节点配电网络具有三条馈线,系统基准容量为100MVA,基准电压 23kV,整个网络总负荷为28.7+j7.75MVA,该配电网参数中,支路的阻抗参 数为标幺值,
潮流计算中进行4机11节点计算的子程序,能较快算出电力潮流及稳定性。
通过14节点模拟大电网,有效模拟电网的动态效果