> 3) What classes can I use to communicate with Serial devices in J2ME.

Signature
Darryl L. Pierce <mcpierce@gmail.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
>>1) Which virtual machine will be the best? I dont mind using
>>PersonalJava instead of J2ME for the same.
>
> J2ME is not a VM: it's an umbrella term. Most handsets do not support
> PersonalJava, and at any rate PJava has been EOL'd. You ought to target the
> MIDP, which is a J2ME technology.
Sorry for my bad terminology but I was aware of that. I actually meant
J2ME CLDC MIDP2.0 compliant VM. PJava is EOL'd but how about CDC profile?
>>2) Also I noticed than MIDP 2.0 has https connection etc but most of the
>>devices doesn't support MIDP 2.0 right? Please correct me if I am wrong.
>
> That's not correct. MIDP 2.0 is growing by leaps and bounds and most
> handsets available today are MIDP 2.0.
I was actually checking it for the existing handsets like Nokia 6260,
6600, SE P910 etc and they were still using MIDP 1.0 :(..I would be very
happy if more and more devices come with MIDP 2.0. Also I refered to
MIDP 2.0 Specification and it just says 'CommConnection' Class 'MAY' be
implemented..So I might be stuck where many providers don't implement it.
>>3) What classes can I use to communicate with Serial devices in J2ME.
>
> You will need to use the Generic Connector Framework in the
> javax.microedition.io package. You will use a the Connector.open() method
> to create a Connection object. From this you can start communicating
> through the COM port.
Thanks!! I think I will try this route. Currently I decided to use
SuperWaba but didn't quite like it as SerialPort Implementation in it a
blocking I/O based on either the number of bytes read or timeout. I
think I need to do more study and research :).
But thanks Darryl for your help and I did wait a day before posting
again which you realized.
-Rishi
Darryl L. Pierce - 31 Dec 2005 14:46 GMT
> Sorry for my bad terminology but I was aware of that. I actually
> meant J2ME CLDC MIDP2.0 compliant VM. PJava is EOL'd but how about
> CDC profile?
The configuration (in this case the CLDC) defines the VM. The profile
(in this case the MIDP) defines a series of additional, device-specific
APIs. PersonalJava and CDC are not related technologies: PJava has been
superceded by the Personal Profile which itself is a set of APIs
provided on top of the VM defined by the CDC.
>>> 2) Also I noticed than MIDP 2.0 has https connection etc but most
>>> of the devices doesn't support MIDP 2.0 right? Please correct me
[quoted text clipped - 5 lines]
> I was actually checking it for the existing handsets like Nokia 6260,
> 6600, SE P910 etc and they were still using MIDP 1.0 :(
That doesn't seem correct. The S/E P900 was a MIDP 2.0 device, I would
be surprised that they went back to MIDP 1.0 for the next version. Where
did you find this information?
> ..I would be very happy if more and more devices come with MIDP 2.0.
> Also I refered to MIDP 2.0 Specification and it just says
> 'CommConnection' Class 'MAY' be implemented..So I might be stuck
> where many providers don't implement it.
That's because not all devices have a serial port. So it would make no
sense for the MIDP to require support for hardware that may not be
available. The only protocol that is required is HTTP (and now HTTPS)
because all MIDs have to have some form of networking ability.