how to control IR port of Palm

I want to program with j2me on my Palm, but how can I control the IR port? for example sending messages to/from my palm and my PC?
[151 byte] By [hs_lam] at [2007-9-26 13:06:52]
# 1

[hs_lam],

The J2ME CLDC/MIDP does not provide an API to control the infra-red port of a Palm OS device or any other devices that is J2ME compliant. If you wish to have the Palm OS device communicate with a PC, you can setup a HTTP connection over the serial link through the cradle but you will need to setup a PPP link over the serial link (e.g. of how to do this can be found in http://www.mochasoft.dk/palm.html#palmppp).

HTH.

Allen Lai

Developer Technical Support

SUN Microsystems

http://www.sun.com/developers/support/

allenlai at 2007-7-2 13:03:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
Thanks very much. But I have another question, I am writting an application that uses a PC as access point to provide services to a Palm user. I want the Palm to automatically negotiate with the access point through the IR port.Can I use http connection to do that?
hs_lam at 2007-7-2 13:03:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3

[hs_lam],

> Thanks very much. But I have another question, I am

> writting an application that uses a PC as access point

> to provide services to a Palm user. I want the Palm to

> automatically negotiate with the access point through

> the IR port.

The native functions of a Palm OS device e.g. auto-negotiation between the irDA port on the Palm and PC, is handled by the Palm OS itself. The MIDP for Palm OS Java Application Manager does not handle these sort of native Palm OS functions.

> Can I use http connection to do that?

Once you have the low level underlying network connection over the infrared link to the PC, I don't see why the Connector.open("http://....") interface would not work i.e. as long as HTTP connections can be established between the Palm and PC.

HTH.

Allen Lai

Developer Technical Support

SUN Microsystems

http://www.sun.com/developers/support/

allenlai at 2007-7-2 13:03:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

Thank you. But my point is, can my application automatically call the native palm os function to connect to the PC, so that the user is transparent to this connection?

All I need is to make the connectino process transparent to the user, ie. when the user runs my Java application, all the connection and negotiation work is done automatically. Nomatter it is done by J2ME or native interface.

hs_lam at 2007-7-2 13:03:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

> Thank you. But my point is, can my application

> n automatically call the native palm os function to

> connect to the PC, so that the user is transparent to

> this connection?

The CLDC/MIDP specification does not provide API libraries that can control the irDA port of a Palm OS device.

> All I need is to make the connectino process

> s transparent to the user, ie. when the user runs my

> Java application, all the connection and negotiation

> work is done automatically. Nomatter it is done by

> J2ME or native interface.

Like I mentioned before, the CLDC/MIDP APIs does not provide a JNI-like (Java Native Interface) set of libraries for you to call native Palm OS functions.

HTH.

Allen Lai

Developer Technical Support

SUN Microsystems

http://www.sun.com/developers/support/

allenlai at 2007-7-2 13:03:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...