Yes, you can with the old KVM (CLDC + com.sun.kjava).
It uses the com.sun.cldc.io.palm.comm.Protocol class to provide serial I/O, but MIDP4Palm doesn't support serial I/O (version midp4palm-1.0 beta).
Use BlackBox from javacomm (sun impl) to watch the serial comm.
Claudio Miranda
examplets are:
public void writeToSerialPort(String message) {
OutputStream out = null;
try {
out = Connector.openOutputStream("comm:0;baudrate=9600;bitsperchar=8;stopbits=1;parity=none");
out.write(message.getBytes());
out.flush();
} catch (IOException ioe) {
System.err.println("1st IOException : " + ioe);
ioe.printStackTrace();
} finally {
try {
if (out != null) {
out.close();
}
} catch (IOException ioe) {
System.err.println(" nested IOException : " + ioe);
ioe.printStackTrace();
}
}
}
> Yes, you can with the old KVM (CLDC + com.sun.kjava).
> It uses the com.sun.cldc.io.palm.comm.Protocol class
> to provide serial I/O, but MIDP4Palm doesn't support
> serial I/O (version midp4palm-1.0 beta).
The old com.sun.kjava is no longer supported. And yes, MIDP for Palm OS v1.0 does not provide an API for you to access the serial I/O through the serial cable of the Palm cradle.
> Use BlackBox from javacomm (sun impl) to watch the
> serial comm.
>
> Claudio Miranda
>
> examplets are:
>
> public void writeToSerialPort(String message) {
>OutputStream out = null;
>try {
> out =
> Connector.openOutputStream("comm:0;baudrate=9600;bitspe
> char=8;stopbits=1;parity=none");
> out.wri
> e(message.getBytes());
> out.flu
> h();
>} catch (IOException ioe) {
> System.
> rr.println("1st IOException : " + ioe);
> ioe.pri
> tStackTrace();
>} finally {
> &
> bsp; try {
> &
> bsp;if (out !=
> null) {
> &
> bsp;out.close();
> }
>} catch (IOException ioe) {
> System.
> rr.println(" nested IOException : " + ioe);
> ioe.pri
> tStackTrace();
>}
> }
>
> }