Roving Networks' ultra-low power Bluetooth modules natively support all smartphones. IPhone®, Blackberry®, and Android® (or Droid) are all compatible with Roving's Bluetooth modules. For the Droid user, Roving's Bluetooth modules easily create wireless connections between the Android phone and any external accessory or device, simplifying the entire application development process.
 
Common applications for Droid-compatible Bluetooth modules include:
  • Medical devices
  • Games/toys
  • Scales/measurement
  • Tracking
 
 

The Android platform includes support for Bluetooth which allows a device to wirelessly exchange data with other Bluetooth devices. The application framework provides access to the Bluetooth functionality through the Android Bluetooth APIs. These APIs let applications wirelessly connect to other Bluetooth devices, enabling point-to-point communication.

Using the Bluetooth APIs,
an Android application can perform the following:
  • Scan for other Bluetooth devices
  • Query the local Bluetooth adapter for paired Bluetooth devices
  • Connect to other devices through service discovery
  • Transfer data to and from other devices
  • Manage multiple connections
 
 

Starting in Android 3.0, the Bluetooth API includes support for working with Bluetooth profiles. A Bluetooth profile is a wireless interface specification for Bluetooth-based communication between devices. Roving's Droid-compatible Bluetooth modules support multiple profiles. Audio is supported over A2DP, keyboards and mice are supported over the HID profile and data connection over SPP.

Roving offers 2 Android-compatible Bluetooth EDR modules, the RN-41, a 2.1 class 1 surface mount module with ceramic on-board antenna, and the RN-42, a 2.1 class 2 surface mount module with PCB trace antenna. The RN-41 and the RN-42 share the exact same footprint and hardware interface. Both are small form factor, ultra-low power, and simple to integrate Bluetooth radios. The default profile for both the RN-41 and RN-42 is SPP which is the bi-directional interface necessary for connecting to the Droid. Click here for more information on SPP technology.

 
GETTING TECHNICAL:

In order to use Bluetooth features in your application, you need to declare at least one of two Bluetooth permissions: Bluetooth and Bluetooth Admin. You need to request Bluetooth permission in order to perform any Bluetooth communication. Next, you need to set up Bluetooth by verifying that Bluetooth is supported on the device, and then you need to enable it. After Bluetooth has been enabled, you can find remote Bluetooth devices either through device discovery or by querying the list of paired (bonded) devices. To start discovering devices, simply call start Discovery. The discovery process usually involves an inquiry scan of about 12 seconds, followed by a page scan of each found device to retrieve its Bluetooth name.

After you have Bluetooth permission, enabled Bluetooth, and discovered other devices, you need to create a connection. In order to create a connection between your applications on two devices, you must implement both the server-side and client-side mechanisms, because one device must open a server socket and the other one must initiate the connection (using the server device's MAC address to initiate a connection).

When you want to connect two devices, one must act as a server by holding an open Bluetooth Server Socket. The purpose of the server socket is to listen for incoming connection requests and when one is accepted, provide a connected Bluetooth Socket. .

More in-depth Information on using Bluetooth with the Android device can be found here:
http://developer.android.com/guide/topics/wireless/bluetooth.html

For answers to common questions, be sure to check out Roving's FAQ page here.

Roving's ultra-low power Bluetooth modules are the perfect solution for creating wireless connections over Bluetooth with any Android device. Both the RN-41 and RN-42 support a variety of profiles that can be used by Android to send data. SPP, the standard profile in Roving's Bluetooth modules, allows the modules to work seamlessly with the Android. For even faster development, Roving offers a development board for the RN-41 and RN-42, the RN-41-SM and the RN-42-SM. Both boards are a great method for adding Bluetooth wireless capability to existing products without redesign, saving significant time and money.

 

Download a free app to talk to the Roving modules on an Android platform here

> RN Talk by Marcel Levinspuhl