Thu Jan 18 15:59:35 MST 2001 removed jcl references for rxtx 1.5 Trent.
The Following was contributed by Vaibhav Andleigh [email protected] in hopes
that it will make getting started easier for people new to commAPI.
Feel free to contribute additional information in the same spirit.
Hi Trent,
I recently installed javax.comm and RxTx on a few systems and had to write
a very detailed HOWTO on read/writing to your com ports on linux for
beginners. BTW, RxTx is a great tool! In any case, I've included the
HOWTO with this email for the reference of other users. Feel free to post
it.
------------------------
SerialPortInstructions.txt
To get serial port stuff running:
Serial Connection without Java
First, let's setup the serial connection without java and test it.
Connect your computer to another computer/device via a null modem serial
cable. Be sure the other computer/device has software (i.e., minicom)
to receive the signal. For the purpose of these instructions, I'll
assume you have a computer at each end, and will use minicom to
perform the connection testing.
In the case of minicom (on the receiving machine), you'll probably have
to run it as root (since the serial port is owned by root for security
purposes). It's not a good idea to change these permissions. If this
is the first time minicom is being run, you'll have to configure it
first. To do this, ssh to root (not su, anywhere in these instructions)
and type 'minicom -s' without the quotes. Arrow to option 3 and change
the serial configuration device to '/dev/ttyS0' without the quotes.
Exit minicom. Then go and run minicom by typing 'minicom -m -c on'
without the quotes. Assuming you're running minicom on both machines,
run a quick test of the serial connection. Type Alt-Z (or whatever
key-combo gives you help on special keys) and select "Local Echo"(E).
Now type text on both minicom screens and see that the text is going
back and forth.
Java.comm and RxTx installation
First install javax.comm api following Sun's instructions
Be sure to follow the instructions about placing the comm.jar
in the correct directories. You can ignore the details of
the javax.comm.properties files since it'll be replaced by RxTx
anyways.
Then install rxtx-1.4-4 following instructions given in
their install page. They have a really useful bit of info
in the INSTALL file talking about where the comm.jar,
javax.comm.properties files(and its contents) are supposed to go
(and what other files (libSerial.so and libParallel.so)should
have been created and where). Verify this happened properly.
Assuming you're using jdk-1.2, you can ignore the CLASSPATH
stuff in their extra directions. If you still have problems, they
have a really useful COMMON PROBLEMS section further down in the
INSTALL file.
Running Trial Applications
We'll test two apps: BlackBox and the Simple demos. These are
included in your .../java/commapi/samples directory. Go to
.../java/commapi/samples/BlackBox/ and type javac *.java to compile
all the classes.
Then create a run shell script as follows (substitute your own relative
java location if necessary):
runBlackBox.sh
#!/bin/sh
/usr/local/java/bin/java -classpath
./:/usrlocal/java/jre/lib/ext/comm.jar:/usr/local/java/samples/BlackBox/BlackBox.jar
BlackBox
Run this script as ROOT using ssh, not su!
[or make sure permissions for the device files allow the user/group to read
them. See also: lockfiles in INSTALL]
It should put up a screen with a GUI of everything going on for each
of your serial ports. At the top of the screen, you can set the baud
rate. Unless you changed the settings on minicom, it should be expecting
38400 so select that. Go ahead and type in the first left text window
and you should see the text appear in the receiving minicom window.
If you choose to run the apps labeled as "Simple", go to the
.../java/commapi/samples/Simple/ directory and edit the SimpleWrite.java
and SimpleRead.java files. Convert the /dev/tty/a to /dev/ttyS0 in both
files. Compile both files using javac *.java . Use a run script very
similar to that above (deleting the path reference to BlackBox.jar and
replacing BlackBox with SimpleRead/SimpleWrite as appropriate).
Set up minicom on the other machine and go ahead and run the script.
It should all work. I've attached the run scripts I used for both
programs below:
runSimpleRead.sh
#!/bin/sh
/usr/local/java/bin/java -classpath
./:/usrlocal/java/jre/lib/ext/comm.jar
SimpleRead
runSimpleWrite.sh
#!/bin/sh
/usr/local/java/bin/java -classpath
./:/usrlocal/java/jre/lib/ext/comm.jar
SimpleWrite
**********************************************
Vaibhav Andleigh
[email protected]
http://utopia1.mit.edu/vab/
------------------------------------------------------
Ph.D. Student, Dept. Mat. Sci. & Engr
MIT Room 13-5142 Ph: 617-258-8847
Cambridge, MA Fax: 530-348-8219
**********************************************
"Every man dies, not every man really lives."
--William Wallace, Braveheart
没有合适的资源?快使用搜索试试~ 我知道了~
rxtx-2.0-7pre1.tar.gz_rxtx_rxtx java
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 186 浏览量
2022-09-22
22:10:20
上传
评论
收藏 688KB GZ 举报
温馨提示
共241个文件
root:39个
repository:39个
entries:39个
rxtx开发包源代码,用Java进行串口通讯程序的开发,可以实现短信发送等功能。
资源推荐
资源详情
资源评论
收起资源包目录
rxtx-2.0-7pre1.tar.gz_rxtx_rxtx java (241个子文件)
output.0 348KB
traces.0 16KB
Makefile.am 6KB
AUTHORS 4KB
BeOS 1KB
buildtest 1KB
buildtests 342B
buildwin32 405B
SerialImp.c 157KB
termios.c 77KB
ParallelImp.c 30KB
fuser.c 22KB
testSerial.c 4KB
init.c 3KB
fixup.c 3KB
signals.c 2KB
testing.c 638B
startpoint.c 66B
startpoint.c 40B
init.cc 3KB
ChangeLog 22KB
changelog 1KB
CHANGES 8KB
configure 347KB
COPYING 25KB
COPYING 553B
SerialImp.cpp 55KB
gnu_io_RXTXPort.cpp 48KB
rxtxHelpers.cpp 19KB
gnu_io_RXTXCommDriver.cpp 8KB
rxtxSerial.cpp 3KB
StdAfx.cpp 3KB
.cvsignore 284B
.cvsignore 72B
README.debian 748B
Serial.def 5KB
Parallel.def 2KB
rxtxserial.dsp 6KB
Entries 2KB
Entries 952B
Entries 600B
Entries 577B
Entries 487B
Entries 274B
Entries 221B
Entries 219B
Entries 157B
Entries 108B
Entries 98B
Entries 90B
Entries 64B
Entries 40B
Entries 37B
Entries 29B
Entries 23B
Entries 17B
Entries 17B
Entries 16B
Entries 16B
Entries 15B
Entries 14B
Entries 14B
Entries 12B
Entries 11B
Entries 11B
Entries 11B
Entries 10B
Entries 10B
Entries 2B
Entries 2B
Entries 2B
Entries 2B
Entries 2B
Entries 2B
Entries 2B
Entries 2B
Entries 2B
libSerial.exp 2KB
config.guess 40KB
SerialImp.h 15KB
win32termios.h 13KB
gnu_io_RXTXPort.h 12KB
gnu_io_RXTXPort.h 12KB
rxtxHelpers.h 5KB
ParallelImp.h 4KB
StdAfx.h 4KB
gnu_io_RXTXCommDriver.h 1KB
gnu_io_RXTXCommDriver.h 1KB
precomp.h 1KB
config.h 1KB
fuser.h 911B
comm.h 414B
signals.h 244B
RXTX.pkg.sit.hqx 64KB
RXTX_Jag.pkg.sit.hqx 62KB
LibSerial.pbproj.sit.hqx 6KB
RMISecurityManager.html 25KB
install-japanese.html 6KB
configure.in 27KB
Makefile.in 16KB
共 241 条
- 1
- 2
- 3
资源评论
周楷雯
- 粉丝: 80
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功