Install and configure RXTX in Ubuntu for Serial Communication

Source: Internet
Author: User
RXTX is a cross-platform serial communication component library, which is compatible with SUN's Java (tm) CommunicationAPI standard (except for the package name, the rest are the same), and RXTX is cross-platform, currently, the supported platforms include windows, linux, mac, Solaris, and wince (recompilation required ). In comparison, although sun's CommunicationAPI3.0 standard package also supports linux, solaris, and windows

RXTX is a cross-platform serial Communication component library, which is compatible with SUN's Java (tm) Communication API standard (except for the package name, the rest are the same), and RXTX is cross-platform, currently, the supported platforms include windows, linux, mac, Solaris, and wince (recompilation required ).

In comparison, although the standard component package of sun's Communication API 3.0 also supports linux, solaris, and windows, I chose the open-source RXTX. After all, it is an open-source product, in the future, I plan to migrate the product to the ARM platform. With the RXTX source code, I can compile the RXTX library of a specific platform by myself. This is extremely important.

The following describes how to install and configure RXTX In Ubuntu.

1. Download

RXTX jar packages and libraries can be downloaded at http://users.frii.com/jarvi/rxtx/

At present, the latest version is rxtx-2.1-7-bins-r2, and decompress There Is A RXTXCommon. jar, this jar package is RXTX class library,

In addition, there is a linux/solaris/windows/mac Directory, which is a dynamic link library of RXTX for different platforms.

2. Installation

The installation is simple. You only need to copy several. so files to the jre system directory. However, you must first determine the processor type. RXTX provides

I686-unknown-linux-gnu

Ia64-unkown-linux-gnu

X86_64-unknown-linux-gnu

My processor is i386, so it's the i686-unknown-linux-gnu that comes /Linux/i686-unknown-linux-gnu, put

LibrxtxParallel. so

LibrxtxSerial. so

Copy

/Jre/lib/i386

Directory.

Finally /RXTXCommon. jar is copied to the project and added to the path.

OK. The configuration is complete.

Then I will release the serial communication packaging class I wrote, which is easier to develop.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.