I'm attempting to establish a connection with the Intel Edison as a central and a regular android phone as a peripheral.
The Edison detects the Android phone just fine and attempts to establish a connection like this:
@Override
public void onScanResult(int callbackType, final ScanResult result) {
super.onScanResult(callbackType, result);
BluetoothDevice device=result.getDevice());
device.connectGatt(context, false, bluetoothGattCallback);
}
and also with the TRANSPORT variations:
device.connectGatt(context, false, bluetoothGattCallback, TRANSPORT_LE);
and
device.connectGatt(context, false, bluetoothGattCallback, TRANSPORT_AUTO);
But in all cases, the connection fails with a status 133 on the bluetoothGattCallback
using autoconnect
as true results in nothing happening at all.
This is my BluetoothGattGallback:
@Override
public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
super.onConnectionStateChange(gatt, status, newState);
if (status == 133) {
Log.e(TAG, "Got the status 133 bug. " + gatt.getDevice().getAddress());
gatt.disconnect();
gatt.close();
}
I can confirm it's not an issue with the peripheral since connections between two android phones work just fine. It's just the Intel Edison that fails to connect.