[kaffe] Serial Interface

Fabien Renaud renaud at nentec.de
Thu Jun 3 08:49:05 PDT 2004

Hello again :)

I have another problem :
I´d like to access serial interface on my ARM box with RXTX.

I use this code :
public class SimpleWrite {
    static Enumeration portList;
    static CommPortIdentifier portId;
    static String messageString = "Hello, world!\n";
    static SerialPort serialPort;
    static OutputStream outputStream;

    public static void main(String[] args) {
        portList = CommPortIdentifier.getPortIdentifiers();

        while (portList.hasMoreElements()) {
            portId = (CommPortIdentifier) portList.nextElement();
            if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
                // if (portId.getName().equals("COM1")) {
                if (portId.getName().equals("/dev/ttyS3")) {
                    try {
                        serialPort = (SerialPort) 
                    } catch (PortInUseException e) {
                        System.out.println("not ok");

and I  have only the output ´test´ .

When I run gdb I have this  :

Starting program: /home/java/kaffe/jre/bin/kaffe-bin SimpleWrite
[New Thread 16384 (LWP 1198)]
Devel Library
Native lib Version = RXTX-2.1-7pre16
Java lib Version   = RXTX-2.1-7pre16
test 1

Program received signal SIGINT, Interrupt.
[Switching to Thread 16384 (LWP 1198)]
0x4029939c in *__GI___poll (fds=0xbfffdd28, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:85
85      ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
        in ../sysdeps/unix/sysv/linux/poll.c
(gdb) where
#0  0x4029939c in *__GI___poll (fds=0xbfffdd28, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:85
#1  0x400cdc58 in handleIO ()
   from /home/java/kaffe/jre/lib/arm/libkaffevm-1.1.4.so
#2  0x400cd924 in reschedule ()
   from /home/java/kaffe/jre/lib/arm/libkaffevm-1.1.4.so
#3  0x400cb380 in suspendOnQThread ()
   from /home/java/kaffe/jre/lib/arm/libkaffevm-1.1.4.so
#4  0x400ce668 in jcondvar_wait ()
   from /home/java/kaffe/jre/lib/arm/libkaffevm-1.1.4.so
#5  0x4006b208 in ksemGet ()

Do you think the problem comes from rxtx or kaffe ?



More information about the kaffe mailing list