Google

Monday, February 9, 2009

Bluetooth J2ME Server, J2SE Server and J2ME Client - How to Use

In the previous 3 posts, I put up the sources for the following:

1. J2ME Server
2. J2ME Client
3. J2SE Server

How to Use:

Every client communicates with a server.
Server should always listen first, then, only start the
Client.

Therefore, you can use the following combinations:

A. J2ME Server <--> J2ME Client (mobile phone to mobile phone)
B. J2SE Server <--> J2ME Client (PC to mobile phone, or vice versa)

Scenario A can be run on PC in emulator mode for both Server and Client, or,
both Server and Client run on Mobile Phone.Both (Server and Client) must be run
on PC Emultor, or, both transferred to Mobile phone and run from two mobile phones.
One Mobile Phone will run the Server whilst the second Mobile Phone run the client.

Scenario B, Server must be run on PC whilst Client must be run on real Mobile phone.
In order to run J2SE server you must install the Bluecove library first. This library enables
you to access your PC's Bluetooth hardware. As such when you run Scenario B, you are
actually using the PC's real Bluetooth hardware to communcate with a real mobile Phone.

Summary:
To communicate between two mobile phones, use Scenario A
To communicate between PC and mobile phone (or vice versa), use Scenario B