kshoji / BLE-HID-Peripheral-for-Android

BLE HID over GATT Profile for Android
Apache License 2.0
239 stars 76 forks source link

Windows 10 disconnects BLE device #2

Open jagshenoy opened 7 years ago

jagshenoy commented 7 years ago

Hi, I know this project has not been tested on windows. I was trying to test it with Windows 10, I observed that HID Host initiates a disconnection soon after reading the 'HID information'!

08-20 12:53:45.109 30727-30740/jp.kshoji.blehid.sample D/HidPeripheral: onConnectionStateChange status: 0, newState: 2 08-20 12:53:45.112 30727-30740/jp.kshoji.blehid.sample D/HidPeripheral: BluetoothProfile.STATE_CONNECTED bondState: BOND_BONDED 08-20 12:53:45.117 30727-30740/jp.kshoji.blehid.sample D/HidPeripheral: Device bonded successfully 08-20 12:53:45.118 30727-30727/jp.kshoji.blehid.sample D/BluetoothGattServer: connect() - device: <>, auto: true 08-20 12:53:45.473 30727-30739/jp.kshoji.blehid.sample D/BluetoothGattServer: onMtuChanged() - device=<>, mtu=517 08-20 12:53:52.268 30727-30727/jp.kshoji.blehid.sample W/IInputConnectionWrapper: reportFullscreenMode on inexistent InputConnection 08-20 12:53:52.268 30727-30727/jp.kshoji.blehid.sample W/IInputConnectionWrapper: finishComposingText on inactive InputConnection 08-20 12:54:01.998 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_MANUFACTURER_NAME , offset: 0 08-20 12:54:02.026 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_BATTERY_LEVEL , offset: 0 08-20 12:54:02.056 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_MODEL_NUMBER , offset: 0 08-20 12:54:02.161 30727-31071/jp.kshoji.blehid.sample D/HidPeripheral: onDescriptorReadRequest requestId: 7, offset: 0, descriptor: 00002902-0000-1000-8000-00805f9b34fb 08-20 12:54:02.284 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_MODEL_NUMBER , offset: 0 08-20 12:54:02.314 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_MANUFACTURER_NAME , offset: 0 08-20 12:54:02.435 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_REPORT , offset: 0 08-20 12:54:02.507 30727-30740/jp.kshoji.blehid.sample D/HidPeripheral: onDescriptorReadRequest requestId: 11, offset: 0, descriptor: 00002908-0000-1000-8000-00805f9b34fb 08-20 12:54:02.507 30727-30727/jp.kshoji.blehid.sample D/HidPeripheral: onDescriptorReadRequest: Read report reference for input report 08-20 12:54:02.537 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_REPORT , offset: 0 08-20 12:54:02.598 30727-31071/jp.kshoji.blehid.sample D/HidPeripheral: onDescriptorReadRequest requestId: 13, offset: 0, descriptor: 00002908-0000-1000-8000-00805f9b34fb 08-20 12:54:02.599 30727-30727/jp.kshoji.blehid.sample D/HidPeripheral: onDescriptorReadRequest: Read report reference for input report 08-20 12:54:02.628 30727-30740/jp.kshoji.blehid.sample D/HidPeripheral: onDescriptorReadRequest requestId: 14, offset: 0, descriptor: 00002902-0000-1000-8000-00805f9b34fb 08-20 12:54:02.674 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_PROTOCOL_MODE , offset: 0 08-20 12:54:02.704 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_REPORT_MAP , offset: 0 08-20 12:54:02.738 30727-30727/jp.kshoji.blehid.sample I/HidPeripheral: onCharacteristicReadRequest characteristic: CHARACTERISTIC_HID_INFORMATION , offset: 0 08-20 12:54:04.550 30727-30739/jp.kshoji.blehid.sample D/BluetoothGattServer: onServerConnectionState() - status=0 serverIf=6 device=<> 08-20 12:54:04.550 30727-30739/jp.kshoji.blehid.sample D/HidPeripheral: onConnectionStateChange status: 0, newState: 0 08-20 12:54:04.550 30727-30739/jp.kshoji.blehid.sample D/HidPeripheral: Device has been disconnected

I am stuck with this issue and unable to proceed. Let me know if you have any insight here.