OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> How to access serial port from Java on the Zaurus?
jeff_burch
post May 28 2004, 03:36 PM
Post #1





Group: Members
Posts: 7
Joined: 26-May 04
Member No.: 3,454



Surely someone has done this before. I need to communicate from java to/from the Z's serial port.

========= installation ==============
I've installed http://s88074083.onlinehome.us/Zaurus/java...api_1.0_arm.ipk

This resulted in the following files in /home/QtPalmtop
java/comm.jar
java/jcl.jar
lib/libSerial.so
javax.comm.properties

Note that my LD_LIBRARY_PATH environmental variable is set to
/home/QtPalmtop/lib

I expect the calling sequence to be
SerialDemo --> comm.jar --> jcl.jar --> libSerial.so --> /dev/ttyS0

I manually performed the following configuration:

1) added user zaurus to the uucp line in /etc/group
2) chmod 777 /dev/ttyS0
3) chmod 777 /var

I got a font error and resolved it by adding this symbolic link:
mkdir -p /usr/local/qt-embedded/lib
cd /usr/local/qt-embedded/lib
ln -s /home/QtPalmtop/lib/fonts fonts

I built this demo
http://s88074083.onlinehome.us/Zaurus/java...-SerialDemo.zip

========== evm problems ============
With evm, I still get errors:

x=/home/QtPalmtop/java
evm -Dcomm.enable -cp .:$x/comm.jar:$x/jcl.jar SerialDemo
14 1082109100



RXTX WARNING: This library requires the user running applications to be in
group uucp. Please consult the INSTALL documentation. More information is
avaiable under the topic 'How can I use Lock Files with rxtx?'
check_lock_status: No permission to create lock file.


======= cvm problems ==========
With cvm, the application loads but I don't see any com ports:

cvm -Dcomm.enable -Djava.class.path=.:$x/comm.jar:$x/jcl.jar SerialDemo

========== Source code explorations =============
In the SerialDemo.java, search for

Enumeration en = CommPortIdentifier.getPortIdentifiers();

This appears to be returning an empty enumeration.

Note that I can rename the libSerial.so to a dummy name and the application DOES NOT complain. So, I don't think something is configured correctly.

If anyone knows what I'm doing wrong, please let me know!

Thanks in advance, Jeff
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
mazx
post Sep 11 2005, 01:20 PM
Post #2





Group: Members
Posts: 1
Joined: 11-September 05
Member No.: 8,081



Gentlement,

In addition to all the steps covered by Jeff Burch, try making /var/lock directory writable by everyone. This should remove problems with RXTX getting a lock error.

chmod 777 /var/lock

Andre S.
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th October 2014 - 12:31 PM