Introduction to Bluetooth –
Uses -
Clas ~100
100 mW (20 dBm)
s1 meters
Clas
2.5 mW (4 dBm) ~10 meters
s2
Clas
1 mW (0 dBm) ~1 meter
s3
In most cases the effective range of class 2 devices is extended if they
connect to a class 1 transceiver, compared to a pure class 2 network. This is
accomplished by the higher sensitivity and transmission power of Class 1 devices.
Data
Version
Rate
Version 2.0 +
3 Mbit/s
EDR
System Requirements -
A mobile phone that is Bluetooth enabled is able to pair with many devices. To
ensure the broadest support of feature functionality together with legacy device
support, the Open Mobile Terminal Platform (OMTP) forum has recently published a
recommendations paper, entitled "Bluetooth Local Connectivity"; see external links
below to download this paper.
Technical Information -
Mandatory protocols for all Bluetooth stacks are: LMP, L2CAP and SDP
Used for control of the radio link between two devices. Implemented on the
controller.
L2CAP (Logical Link Control & Adaptation Protocol)
In Retransmission & Flow Control modes, L2CAP can be configured for reliable
or isochronous data per channel by performing retransmissions and CRC checks.
Only L2CAP channels configured in ERTM or SM may be operated over AMP logical
links.
Used to allow devices to discover what services each other support, and what
parameters to use to connect to them. For example, when connecting a mobile
phone to a Bluetooth headset, SDP will be used to determine which Bluetooth
profiles are supported by the headset (Headset Profile, Hands Free Profile, Advanced
Audio Distribution Profile etc) and the protocol multiplexer settings needed to
connect to each of them. Each service is identified by a Universally Unique Identifier
(UUID), with official services (Bluetooth profiles) assigned a short form UUID (16 bits
rather than the full 128)
In Bluetooth devices with simple functionality, e.g. headsets, the host stack
and controller can be implemented on the same microprocessor. In this case the HCI
is optional, although often implemented as an internal software interface.
RFCOMM provides a simple reliable data stream to the user, similar to TCP. It
is used directly by many telephony related profiles as a carrier for AT commands, as
well as being a transport layer for OBEX over Bluetooth.
Reference –
http://en.wikipedia.org/wiki/Bluetooth
The Java APIs for Bluetooth is a Java ME specification for APIs that allow Java midlets
to use Bluetooth on supporting devices. The specification was developed under the
Java Community Process as JSR 82. The Specification, Reference Implementation,
and TCK are maintained at Motorola Open Source.
Java APIs described in the JSR-82 interface for following Bluetooth Protocols/Profiles:
http://bluecove.org/bluecove/apidocs/overview-summary.html
Related books and jar file are attached here for the reference
The application that is made at our end is the application for sending the any
type of file be it image, be it text, be it video (mobile compatible) from PC to mobile.
The file which is sent can also be received in a PC with Bluetooth enabled. The
application is capable of sending files to multiple devices at a time; hence it is not
necessary to select a device.
1. SendObexClient.java
This class file contains the main method that starts the
application with the init method defined in it. The init method comprise
of ServiceSearch object which is basically searching for the OBEX
service which is required for the device to be capable of sending the
message. It also contains the call for the sendFile method which is in
turn is called for sending the file from PC to mobile or any Bluetooth
device capable of receiving the message.
SendObexClient.java
2. ServiceSearch.java
This class file contains the methods for searching the services of
the Bluetooth device found nearby. This will simply return the services
found on the particular device, which in turn is found by the
RemoteDeviceDiscovery object which is the class searching the
remote devices around.
ServiceSearch.java
3. RemoteDeviceDiscovery.java
This is the class file for searching the devices in vicinity. This
class file contains the various methods discovering the devices.
RemoteDeviceDiscov
ery.java
4. SendFileTask.java
This is the class file which basically takes the method to send
the file from pc to mobile. It uses the ClientSession, HeaderSet objects
to transfer the message.
ServiceSearch.java
During the testing phase we faced various types of issues. The first
successful test was done on a internal Bluetooth enabled Laptop, then application
was successfully tested with the computer with externally installed Bluetooth
(Bluetooth dongle). The application was not working with the bluesoleil driver;
instead it was working with the Widcomm driver which was Microsoft enabled. The
widcomm driver had to be installed in our PC from some external source to make it
compatible with our Bluetooth device. Other issues faced during testing were of
range and load that our application can sustain. By load we mean the number of
devices to which the file can be transferred at the single instance of time. The range
was dependent on the Bluetooth device and the application was successfully
sending the files to multiple devices at a same time.
Attached are the application executable and the related jar file for running the
application.
bluecove-2.1.0.jar BluetoothED.jar
1. Your desktop (with Bluetooth dongle attached and enable after driver installed) or Laptop
with Bluetooth on
2. Copy the given jar file into any folder location.
3. The PC/laptop should have JDK 1.5 version or above and classpath set to run the java command from
command prompt
5. Open a command prompt console and navigate to the folder you have copied the jar file
6. Then execute the command
Both the jar files should be kept at the same folder location.
Future Enhancements -
Future Enhancement to the project is likely to make it compatible with the all
types of Bluetooth drivers, and all types of Bluetooth devices, which can be done
further using the improved Bluetooth API’s. Some more API’s are existing but we
were unable to search for the jar file, hence couldn’t be used. Like BCC API’s.