Bluetooth

The "BCSphere/Bluetooth" is a professional Bluetooth plugin. It is the core implementation of Universal Bluetooth JavaScript API by a Bluetooth expert team. It supports both Bluetooth 4.0 GATT interface in iOS/Android and Bluetooth 2.1 Classical interface in Android.
bcsphere0.5.191
platforms: android,ios
$ cordova plugin add org.bcsphere.bluetooth

BC.js (v0.5.1)

BC.js is the core implementation of Bluetooth SDK for Android/iOS, in Bluetooth JavaScript API.
It supports both Bluetooth 4.0 GATT/BLE interface in IOS/Android and Bluetooth 2.1 Classical Rfcomm/L2cap socket interface in Android.

  • Online Bluetooth Javascript API document: http://www.bcsphere.org/portal.php?mod=topic&topicid=3
  • library based on BC.js, which can be re-used by applications to accelerate development.
  • bcexplorer is the open source tool to explore the GATT services/characteristics of Bluetooth Smart devices. It helps debug devices as well as demostrates the Bluetooth Javascript API.
  • bciBeacon implements a demo iBeacon as a plugin based on BC.js.

Features

Multi-platform development and deployment

  • Develop Bluetooth enabled cross-platform mobile Apps for iOS and Android using JavaScript, HTML5 and CSS3.
  • Single team on a single project instead of several teams for different platforms.
  • Uniform UI code in multi-platform.

Bluetooth Dual Mode

  • Support Bluetooth 4.0 GATT interface in IOS/Android.
  • Support Bluetooth 2.1 rfcomm interface in Android.

Beacon / iBeacon

  • Support Beacon/iBeacon capability in IOS/Android.
  • Support proximity with beacon

Bluetooth Common Services Library

  • Implement Bluetooth 4.0 Standard GATT services. (extending)
  • Integrate various customermized GATT services to access partners' Bluetooth Smart devices. (extending)

Offical profile & services implements

Universal Bluetooth Serial Port

  • Cross-platform implementation of Bluetooth serial port, covering the IOS/Android platform difference when using the serial port profile.
  • Automatic Bluetooth 4.0/2.1 routing to establish appropriate connection, considering both phones and peripheral devices modes.

Reuse rich Apache Cordova/PhoneGap Ecosystem

  • PhoneGap enables the implementation of many useful plugins such as Camera/Accelerometer/Compass...
  • Reuse many open-source plugins implements by third party (PlugReg).
  • Implement your own plugins based on BC.js for others.

True Internet of Things

  • Connect the Internet/Web with the objects in the real world via Bluetooth Javascript interface easily.

Usage

  1. To use in BCSphere official APP
    (1) Include bc.js and other profiles .js files in your own javascript file directly.
    (2) Access the API.

  2. To incorporate into your own APP
    (1) Integrate Apache Cordova / PhoneGap into your Android/iOS project.
    (2) Use this command to install bc.js as a plugin in your project:
    cordova plugin add https://github.com/bcsphere/bluetooth.git

Support platforms

For Bluetooth GATT

  • Android API 18+, All devices with Bluetooth 4.0 Low Energy HW
  • Android API 17+, Sumsung devices with Bluetooth 4.0 Low Energy HW
  • Android API 16+, HTC devices with Bluetooth Low Energy HW,
    note: HTC use shared library to operate BLE device, you should add the 'com.htc.android.bluetooth.le.jar' in the build path manually to support HTC devices, the files is in /others/HTC for optional use.
  • IOS 6.0.1+, iPhone4S+/iTouch5+/iPad3+/iPad-mini+/iPadAir

For Bluetooth 2.1 Classic

  • Android API 9+

Commercial Service

  • Quick 1 solution for all platforms, with project schedule down to 1 week.
  • For Bluetooth APPs customization service, please contact team@bcsphere.org.

Version History & Roadmap