JSR-82 Sample : SPP Server and Client

This article will teach you how to develop bluetooth server and client application and communicate each other using it. We will learn how to develop an SPP Server and an SPP client using JSR 82 API.
Read the rest of this article »

JSR-82 Sample : Bluetooth Service Search

In the last article we found how to search for other bluetooth devices. Here we look in to how search for a service on a particular bluetooth device.

The following code sample shows you how to use the DiscoveryAgent to search for an OBEX Push bluetooth service. It first searches for all available Bluetooth Devices, and prompts to select a device on which to search the OBEX Push Service.

For this sample to work, you need a JSR-82 Implmentation (Java Bluetooth Stack) like ElectricBlue or aveLink in the class path.
Read the rest of this article »

JSR-82 Sample : Device Discovery

This article provides Java sample codes to search for Bluetooth devices using a JSR-82 API. If you are new to JSR-82, we recommend you to read the JSR-82 Basics tutorial to get a basic idea Java and Bluetooth.

JSR-82 provides the class DiscoveryAgent for performing Device Discovery and Service Discovery. The LocalDevice class provides a factory method ‘getDiscoveryAgent’ that returns a singleton instance of the DiscoveryAgent. This instance can then be used to discover other bluetooth devices and services.

The following code sample shows you how to use the DiscoveryAgent to discover other bluetooth devices. For this sample to work, you need a JSR-82 Implmentation (Java Bluetooth Stack) like ElectricBlue or aveLink in the classpath.

Read the rest of this article »

JSR-82 Initialization : LocalDevice

LocalDevice class can be considered as the basic entry point to the JSR-82 API. It is used to initialize the JSR-82 stack, and to control the local bluetooth settings. If you are new to JSR-82, check out the JSR-82 Basics tutorial before reading this. JSR 82 API can be broadly classified into the following sections.

  • a. LocalDevice Settings Manipulation
  • Device Discovery
  • Service Discovery
  • Service Registration
  • L2CAP
  • SPP
  • GOEP
  • BCC

Out of these sections ,the LocalDevice class provides the lowest level of access to the bluetooth stack. There is also another part that can more or less be counted among the lowest layers of JSR82 : the Bluetooth Control Center or the BCC. This part is implementation specific and has no standard APIs. Each vendor can expose their own required APIs which they think is appropriate for their JSR82 implementation. In this article we will look in to LocalDevice and how it can be used to manipulate the Local Bluetooth Device settings.
Read the rest of this article »

Simulating JABWT applications using JSR-82 Simulators

Any one who is developing JSR-82 based application hopes for an easy JSR-82 simulator over which they can test their applications.Testing on actual devices can be very time consuming, and may not be feasible in every circumstances. JSR-82 simulators mimic the real Bluetooth environment, providing a way for the Java Bluetooth developers to test their JSR-82 based application effortlessly, without the need of the actual Bluetooth device.

The major JSR-82 simulators available today are Java Wireless Toolkit from Sun, BlueSim from JSRSoft and Impronto from Rococo. Java Wireless Toolkit is a simulator for a wide range of J2ME based API’s, and hence is the biggest to download, and the toughest to configure. It allows only J2ME based simulations, and is not platform independent. BlueSim and Impronto are both platform independent and supports J2SE and J2ME.

In this article we review BlueSim and list its important features, which any good JSR-82 simulators should provide. The features that BlueSim JSR-82 Simulator provides to a Java Bluetooth developer are given below. Read the rest of this article »