« Top ten considerations while migrating from .Net 1.1 to .Net 2.0 Web Applications | Main | .Net versus J2EE »

Bluetooth and J2ME

 

 

 

Mobile..

Mobile..

Mobile..

 

In today’s scenario - a very common name, a technology which in recent years has seen growth in leaps and bounds. As the economics of demand set in, competition between the various Mobile Manufacturing companies hots up. Complementing all this is the new generations of competent mobile application developers, who are making their dream come true.

The most commonly used mobile application development platforms are

  1. Sun’s Java 2 Platform Micro Edition – J2ME, and
  2. .NET Compact Framework (CF)

 Both have their own advantages and disadvantages,

J2ME, which has been around for quite a while, is the platform of choice for the application developers, as it is beholds the same JAVA motto, “Compile Once, Run Anywhere” and this holds true for mobile application development. J2ME developers can write their code without worrying about cross-platform portability.

In recent years Microsoft has extended its .NET environment to the Windows operating system based mobile devices with the .NET Compact Framework (CF). .Net CF runs only on one operating system – Windows.

For the Mobile Application Developers, how do these two platforms measure up? What are the strengths and weaknesses, of each platform? And Last but not the least, which of these is the best suited platform for developing and deploying your mobile application?

To answer these questions lets examine Bluetooth – a very important emerging standard for wireless integration of small devices. It is said that the “sky is the limit” in terms of applications that will be available in the not so distant future. The JSR-82 specification standardizes a set of Java APIs to allow Java-enabled devices to integrate into a Bluetooth environment.

The Java Bluetooth API basically relies on the Java Generic Connection Framework (JGCF), which has been around for a long time. One of the main advantages is that the Bluetooth API can be made accessible for a broader range of systems as the technological advances occur.

The Java APIs for Bluetooth defines two packages:

  1. javax.bluetooth - for the core Bluetooth API, and
  2. javax.obex -for the Object Exchange (OBEX) protocol.

All Bluetooth applications need these components for:

  1. Stack initialization,
  2. Device management,
  3. Device discovery,
  4. Service discovery, and
  5. Communication.

As per the JSR 82 specifications, a Bluetooth system should have a Bluetooth Control Center (BCC). The BCC, is defined as the heart of a Bluetooth System, it allows a user or the OEM (Original Equipment Manufacturer) to define specific values for certain configuration parameters in a stack. In particular, it would be used in a stack initialization.

The API is intended to provide the following capabilities:

            1. Discover devices and services

            2. Register services

            3. Establish connections( it may be OBEX, L2CAP or RFCOMM) , and finally

            4. Conduct these activities in a secure fashion

The Mobile Information Device Profile (MIDP) is a specification which standardizes Java on embedded devices and is a part of Java Micro Edition Framework (J2ME framework). MIDP devices are expected to be the most prevalent class of devices to incorporate the above said specifications, and the specification allows for the coexistence of Bluetooth APIs and MIDP. This specification was developed under the Java Community Process, and is known as the JSR 82.

We conclude that the J2ME framework is, with its enriched Features, is one of the most widely used. Sun’s J2ME wireless toolkit 2.2 has a Bluetooth simulator and also supports OBEX and is the basic available development Kit for J2ME applications.

 

The Author Somnath Das is a Software Engineer at Binary Spectrum .

 

TrackBack

TrackBack URL for this entry:
http://binaryspectrum.com/geeksatwork-mt/mt-tb.fcgi/21

Comments

Hey, that was a very beautiful piece written by Somnath,
These are the points which are to be remembered by a bluetooth developer on J2ME,
Could u emphasize on the classes under javax.bluetooth...

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)