java rxtx library

18
Java Library Arkom Thaicharoen THJUG

Upload: arkom-thaicharoen

Post on 14-Jul-2015

224 views

Category:

Software


4 download

TRANSCRIPT

Page 1: Java RxTx library

Java Library

Arkom Thaicharoen

THJUG

Page 2: Java RxTx library

Agenda

• Hardware connection

• RxTx Java Library

• Applied Project

Page 3: Java RxTx library

Hardware connection

• Serial communication is one of the ancient technologies in

computing that is still relevant today.

• Its origins date back to the 1960′s when serial communication

was used between teletypewriters and modems.

• Today, serial interfaces can be found inside myriads of

embedded systems where they transfer data between different

components.

This is a female "DB-9" connector A USB Series “A” plug

Page 4: Java RxTx library

Hardware connection

• A serial link over UART(UART Universal Asynchronous

Receiver/Transmitter) consists of two connections for the transfer of

single bits.

• Each connection transmits bits in only one direction from the TX

(transmit) pin of one end point to the RX (receive) pin of the other end

point.

simplified block diagram of the UART:

Page 5: Java RxTx library

Hardware connection Table of the RS232-C signal assignments in the DB25 and DB9 connectors

Page 6: Java RxTx library

Hardware connection

Page 7: Java RxTx library

Hardware connection

• A serial interface is also a common way to connect a PC to

an embedded system.

• Application scenarios include firmware update,

logging/debugging, data streaming and many more.

Sensordrone Firmware Update Program

Page 8: Java RxTx library

RxTx Java Library

What is RXTX?

• RXTX is a Java library, using a native implementation (via

JNI), providing serial and parallel communication for the

Java Development Toolkit (JDK).

• All deliverables are under the GNU LGPL license. It is based

on the specification for Sun's Java Communications API,

though while many of the class descriptions are the same

the package used it not, since gnu.io is used instead.

• A certain amount of compatibility is intended with API,

though this project should be considered as a fork and

therefore compatible in spirit, but not in implementation.

Page 9: Java RxTx library

RxTx Java Library

Page 10: Java RxTx library

RxTx Java Library

Page 11: Java RxTx library

http://www.jcontrol.org/download/rxtx_en.html

RxTx Java Library

Page 12: Java RxTx library

Include RXTXcomm.jar into your Library

RxTx Java Library

Page 13: Java RxTx library

RxTx Windows Library RxTx Mac Library

RxTx Java Library

Page 14: Java RxTx library

Applied Project

http://netbeans.dzone.com/nb-rs232-communication-plugin

Page 15: Java RxTx library

Applied Project

Page 16: Java RxTx library

Applied Project

Page 17: Java RxTx library

Applied Project

Page 18: Java RxTx library

Referent• https://www.freebsd.org/doc/en_US.ISO8859-1/articles/serial-uart/

• http://www.6502.org/users/dieter/uart/uart_1.htm

• http://developer.sensordrone.com/support/sensordrone-firmware-update-program/

• http://users.frii.com/jarvi/rxtx/

• http://playground.arduino.cc/Interfacing/Java

• http://rxtx.qbang.org/wiki/index.php/Main_Page

• http://www.jcontrol.org/download/rxtx_en.html

• http://eclipsesource.com/blogs/2012/10/17/serial-communication-in-java-with-raspberry-pi-and-rxtx

• http://fizzed.com/oss/rxtx-for-java

• http://en.wikibooks.org/wiki/Serial_Programming/Serial_Java

• http://en.wikibooks.org/wiki/Serial_Programming/USB

• http://en.wikibooks.org/wiki/Serial_Programming/RS-232_Connections