1.4 Mote-PC serial communication and SerialForwarder 学习笔记
来源:互联网 发布:淘宝怎么充钱余额 编辑:程序博客网 时间:2024/06/01 09:30
学习这一小节遇到的问题
问题1:
java net.tinyos.tools.MsgReader BlinkToRadioMsg
java.lang.ClassNotFoundException: BlinkToRadioMsg
serial@/dev/ttyUSB0:115200: resynchronising
这个由于 classpath 路径设置的有些问题,所以
你只需要修改下 /opt/tinyos-2.1.1/ 下的 tinyos.sh
我的 tinyos.sh 如下
#! /usr/bin/env bash
# Here we setup the environment
# variables needed by the tinyos
# make system
echo "Setting up for TinyOS 2.1.1"
export TOSROOT=
export TOSDIR=
export MAKERULES=
export MOTECOM
TOSROOT="/opt/tinyos-2.1.1"
TOSDIR="$TOSROOT/tos"
CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/:$TOSROOT/support/sdk/java/tinyos.jar
MAKERULES="$TOSROOT/support/make/Makerules"
MOTECOM="serial@/dev/ttyUSB0:115200" # telosb
export TOSROOT
export TOSDIR
export CLASSPATH
export MAKERULES
export MOTECOM
问题2:
java net.tinyos.tools.MsgReader BlinkToRadioMsg
BlinkToRadioMsg does not have an AM type - ignored
warning: Cannot determine AM type for BlinkToRadioMsg
(Looking for definition of AM_BLINKTORADIOMSG)
这个问题的解决方法是依据
One part of the TinyOS communication toolchain requires being able to figure out which AM types correspond to what kinds of packets. To determine this, for a packet type named X, mig looks for a constant of the form AM_X
. The warning is because we defined our AM type as AM_BLINKTORADIO, but mig wants AM_BLINKTORADIOMSG. Modify BlinkToRadio.h so that it defines the latter. You'll also need to update BlinkToRadioAppC.nc so that the arguments to AMSenderC and AMReceiverC use it. Recompile the application, and you should see no warning. Install it on a mote.
所以,你要把
BlinkToRadio.h 和 BlinkToRadioAppC.nc
里的AM_BLINKTORADIO 修改成 AM_BLINKTORADIOMSG
问题即解决
- 1.4 Mote-PC serial communication and SerialForwarder 学习笔记
- Tinyos学习笔记-节点和pc端口之间的通信-SerialForwarder作为信息源
- Serial Communication
- Serial communication
- ROS 进阶学习笔记(12) - Communication with ROS through USART Serial Port
- ROS 进阶学习笔记(15) - Use Service to play ROS-Serial communication
- Serial Communication using C#
- iPhone serial port communication
- iPhone serial port communication
- linux c serial communication
- RPI Serial Communication (二)
- Serial communication Std
- Implement of Asynchronous Communication between ADSP2106x Series DSP and PC
- c# 2.0 serial port communication
- in web browser serial communication
- RPI Serial Communication (一)
- serial port communication by java
- 学习笔记-进程间通信(Interprocess communication,IPC) --概念、 pipe and FIFOs
- 《龙猫》FAQ
- Visual C++ 编译器原理
- Drv总结
- 软件开发过程文档如何写作?——“文档==鸡肋”?
- 【计算机系统学习-信息表示和处理】【一、信息的存储】
- 1.4 Mote-PC serial communication and SerialForwarder 学习笔记
- inner join用法
- poj 1126 Simply Syntax
- 网络游戏《抽象空间》概念
- Orthogonal Nonnegative Matrix Tri-factorizations for Clustering
- silverlight多人在线游戏示例
- JSON数据格式
- 如何备份gnome-panel的设置
- silverlight游戏时间同步系统