第15篇 模拟仿真注入和广播数据包 (教程lesson 7)

1.       第一个cgywin,首先运行apps/SimpleCmd程序,make pc 编译该程序。

输入:

export DBG=led

从而只观察led的情况。

要运行一个节点的模拟,输入:

build/pc/main.exe 1

 

2.      第二个cgywin,运行:

java net.tinyos.sf.SerialForwarder comm tossim-serial

 

3.      第三个cgywin /tools/java目录下运行:

java net.tinyos.tools.BcastInject command led_on或者

java net.tinyos.tools.BcastInject command led_off,

当前cgywinconsole显示Sending payload….,说明命令成功。

同时SerialForwarder界面显示写入了一个 packet

同时第一个cgywinSimpleCmd的)console会显示yellow led的变化。

 

命令可反复使用,每使用一次,SerialForwarder增加一个packet,相应的SimpleCmd发生一次变化。

可用的命令有:led_on,  led_off,  radio_louder,  radio_quieter.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值