[Tinyos-beta-commits] CVS: tinyos-1.x/beta/TOSComm Makefile, NONE,
1.1 README.TOSComm, NONE, 1.1
Cory Sharp
cssharp at users.sourceforge.net
Tue Dec 21 17:31:50 PST 2004
Update of /cvsroot/tinyos/tinyos-1.x/beta/TOSComm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13517
Added Files:
Makefile README.TOSComm
Log Message:
TOSComm provides serial port access to Java through a native JNI shared
library. TOSComm has been designed as a lighter weight replacement for
javax.comm, and its interfaces are similar. See README.TOSComm or the
discussion on the TinyOS-Devel mailing list for summary of my motivation and
plan for writing this library.
--- NEW FILE: Makefile ---
#-*-Makefile-*- vim:syntax=make
#$Id: Makefile,v 1.1 2004/12/22 01:31:47 cssharp Exp $
#@author Cory Sharp <cssharp at eecs.berkeley.edu>
all: FORCE
cd comm && make && make install
cd packet && make && make install
install: FORCE
cd comm && make install
cd packet && make install
uninstall: FORCE
cd comm && make uninstall
cd packet && make uninstall
clean: FORCE
cd comm && make clean
cd packet && make clean
.PHONY: FORCE
--- NEW FILE: README.TOSComm ---
$Id: README.TOSComm,v 1.1 2004/12/22 01:31:47 cssharp Exp $
README for TOSComm
Author/Contact: tinyos-help at millennium.berkeley.edu
@author Cory Sharp <cssharp at eecs.berkeley.edu>
DESCRIPTION:
TOSComm provides serial port access to Java through a native JNI shared
library. TOSComm has been designed as a lighter weight replacement for
javax.comm, and its interfaces are similar. My email to TinyOS-Devel
summarizes my motivation and plan for writing this library:
On Mon 20 Dec 2004 Cory Sharp wrote:
I'm in the process of writing net.tinyos.comm java classes and native
shared libraries to potentially replace our use of rxtx and
javax.comm. The net.tinyos.comm interfaces are a subset of
javax.comm, but everything else I've written from scratch. I
currently have it fully functional for Win32 with a Linux port to
quickly follow.
Why? I've written a test box to verify Telos mote functionality which
requires detaching and reattaching hundreds of devices in one session.
This usage pattern exposes flaws in the javax.comm design -- the part
that scans the system for "valid" devices, refusing access to anything
it doesn't recognize. This doesn't fit well at all with hotplug
devices (e.g. USB on Telos), because the scan occurs once during
library initialization.
I've also found that the comm port scan procedure itself is so
aggressive in Linux that it disrupts all the comm devices -- so trying
to hack rxtx to rescan the system will only break it more. For all
this trouble, I see no legitimate reason why the Java interfaces
should so aggressively manage the operating system resources:
iterating valid devices should be done by some other tool (such as
motelist for Telos), and refusing to open invalid devices should
remain the exclusive role of the operating system.
A side benefit is that the javax.comm community is a mess with no
signs of becoming more cohesive. This gives us a central point for
bug fixes for java serial support and extensions (and retractions and
deprecations). I doubt fixes to the javax.comm design would or could
ever be accepted by the existing library maintainers.
I'd like to commit primarily to tools/java/net/tinyos/comm/. I'd also
like to augment packet.SerialByteSource to understand javaserial@ and
tosserial@, with an environment variable defining/overriding the
behavior of serial@ (the default can remain javaserial).
INSTALLATION:
>From this TOSComm directory:
make # compile and install TOSComm
make install # install TOSComm (without compiling)
make uninstall # uninstall TOSComm
TOSComm has been built using the following system:
Cygwin updated on 4 Dec 2004
SWIG 1.3.19
gcc (GCC) 3.3.3 (cygwin special), using mingw (-mno-cygwin)
JDK for Windows, java version "1.4.2_05"
TOSComm requires SWIG and GCC to build. As soon as it stabilizes a little
more, I'll CVS commit comm/build_{win32,linux} to circumvent those
dependencies for people seeking a quick install.
KNOWN BUGS/LIMITATIONS:
This is a new library and needs to be extensively tested. Assume bugs
exist until further notice.
As you could probably guess, currently the code is the documentation.
This is sad and I must remedy it... sometime... soon?
More information about the Tinyos-beta-commits
mailing list