Epson Moverio Pro BT-2000 Developer's Manual page 182

Hide thumbs Also See for Moverio Pro BT-2000:
Table of Contents

Advertisement

8.9.9. Acquiring Characteristic Value by Specifying a UUID
You can acquire the Characteristic Value on a connected BLE device by specifying a UUID. To do
this execute the callback function registration using setGattCallback() and Characteristic Value
acquisition using readUuidGatt().
import android.bluetooth.BluetoothLeAdapterManager;
import android.bluetooth.BluetoothLeGapEvtConnected;
import android.bluetooth.BluetoothLeGattCallback;
public class MainActivity extends Activity {
private BluetoothLeAdapterManager mManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
Instance acquisition for the BLE manager class
//
mManager = BluetoothLeAdapterManager.getInstance();
Register a callback for the GATT function provided
//
mManager.setGattCallback(mLeGattCallback);
//Acquire (READ) Characteristic Value
Set StartHandle and EndHandle from the acquired onDiscPriSrvResult
//
//Set the UUID for the Characteristic information acquired in
// onDiscCharDescResult
mManager.readUuidGatt(ConnectedHandle, Uuid, StartHandle, EndHandle);
}
Use the following callback to output logs when a Characteristic Value is acquired.
private BluetoothLeGattCallback mLeGattCallback =
new BluetoothLeGattCallback() {
@Override
onReadUuidGattResult(char connectedHandle, int status,
}
};
}
MOVERIO Pro Developer's Guide (Rev.1.4)
BluetoothLeGattEvtReadUuidRsp[] data) {
Log.i("DEBUG", "Characteristic Value=" + data.data);
176

Advertisement

Table of Contents
loading

This manual is also suitable for:

Moverio pro bt-2200

Table of Contents