WebBluetoothCG/ble-test-peripheral-android


A BLE Peripheral Simulator App https://play.google.com/store/apps/details?id=io.github.webbluetoothcg.bletestperipheral

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.WebBluetoothCG:ble-test-peripheral-android:3.0'
	}
	dependencies {
		implementation("com.github.WebBluetoothCG:ble-test-peripheral-android:3.0")
	}
	<dependency>
	    <groupId>com.github.WebBluetoothCG</groupId>
	    <artifactId>ble-test-peripheral-android</artifactId>
	    <version>3.0</version>
	</dependency>

                            
    libraryDependencies += "com.github.WebBluetoothCG" % "ble-test-peripheral-android" % "3.0"
        
        

                            
    :dependencies [[com.github.WebBluetoothCG/ble-test-peripheral-android "3.0"]]
        
        

Readme


BLE Peripheral Simulator

Build Status

The BLE Peripheral Simulator is an Android app that allows developers to try out new features of Web Bluetooth without the need for a BLE Peripheral Device.

You can build it from source or install it from the Google Play Store.

A developer can use the app to simulate a BLE Peripheral with one of three services:

  • Battery Service
  • Heart Rate Service
  • Health Thermometer Service

The developer can use the new Web Bluetooth features to connect to the app to Read and Write Characteristics, Subscribe to Notifications for when the Characteristics change, and Read and Write Descriptors.

From the app a developer can set the characteristics' values, send notifications and disconnect.

Battery Service Heart Rate Service Health Thermometer Service

Caveats

BLE peripheral mode was introduced in Android 5.0 Lollipop. Due to hardware chipset dependency, some devices don't have access to this feature. Here's a non-exhaustive list of devices that support BLE peripheral mode at the time of writing: Nexus 5X, Nexus 6P, Nexus 6, Nexus 9, Moto E 4G LTE, LG G4, Galaxy S6. See https://altbeacon.github.io/android-beacon-library/beacon-transmitter-devices.html for more.

Source: http://stackoverflow.com/questions/26482611/chipsets-devices-supporting-android-5-ble-peripheral-mode