Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException when playing around with connections #441

Closed
saiimons opened this issue Jun 12, 2018 · 2 comments
Closed
Assignees
Labels
bug Bug that is caused by the library
Milestone

Comments

@saiimons
Copy link

Summary

While playing around with connections, I end up having a ConcurrentModificationException.

Library version

1.6.0

Preconditions

Running a scan, monitoring device status.

Steps to reproduce actual result

Connect and disconnect a device, and subscribing to notifications on a specific UUID

Minimum code snippet reproducing the issue

Sorry, can't share for the moment, but if I can set up a limited example, I'll share.

Logs from the application running with setting RxBleLog.setLogLevel(RxBleLog.VERBOSE)

Cleaned up the logs from useless/sensitive stuff :

06-12 17:37:23.572 11082-11082 I/art: Late-enabling -Xcheck:jni
06-12 17:37:23.585 11082-11082 D/ActivityManager: default service binder = android.os.BinderProxy@2996835c
    default service = android.app.ActivityManagerProxy@6442665
06-12 17:37:23.590 11082-11092 E/art: Failed sending reply to debugger: Broken pipe
06-12 17:37:23.590 11082-11092 I/art: Debugger is no longer active
06-12 17:37:23.599 11082-11082 D/VendorDisplayManagerGlobalCallback: callGetInstance: nil
06-12 17:37:23.614 11082-11082 W/ActivityThread: Application io.Saiimons.reader.toolbox is waiting for the debugger on port 8100...
06-12 17:37:23.615 11082-11082 I/System.out: Sending WAIT chunk
06-12 17:37:24.779 11082-11092 I/art: Debugger is active
06-12 17:37:24.816 11082-11082 I/System.out: Debugger has connected
    waiting for debugger to settle...
06-12 17:37:25.016 11082-11082 I/System.out: waiting for debugger to settle...
06-12 17:37:25.216 11082-11082 I/System.out: waiting for debugger to settle...
06-12 17:37:25.416 11082-11082 I/System.out: waiting for debugger to settle...
06-12 17:37:25.616 11082-11082 I/System.out: waiting for debugger to settle...
06-12 17:37:25.817 11082-11082 I/System.out: waiting for debugger to settle...
06-12 17:37:26.017 11082-11082 I/System.out: waiting for debugger to settle...
06-12 17:37:26.217 11082-11082 I/System.out: debugger has settled (1329)
06-12 17:37:26.237 11082-11082 I/ContextImpl: com.amazon.client.metrics.api registered service at i = 73
06-12 17:37:26.243 11082-11082 D/ProfileManager: Create ProfileManager instance
06-12 17:37:26.456 11082-11082 I/FrameworkJumpTable: Successfully loaded all classes
06-12 17:37:26.477 11082-11082 I/FrameworkJumpTable: Successfully loaded all methods
06-12 17:37:26.480 11082-11082 I/FrameworkJumpTable: Successfully loaded all fields
06-12 17:37:26.503 11082-11082 W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
06-12 17:37:26.551 11082-11082 W/ResourceType: Attempt to retrieve bag 0x0103003e which is invalid or in a cycle.
06-12 17:37:26.595 11082-11082 D/MainActivity: Got a new state map {}
06-12 17:37:26.596 11082-11082 D/MainActivity: Found devices []
06-12 17:37:26.597 11082-11082 D/MainActivity: Found devices []
06-12 17:37:26.603 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(870126428)
06-12 17:37:26.604 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(870126428)
06-12 17:37:26.614 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:26.620 11082-11098 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:26.621 11082-11109 D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
06-12 17:37:26.622 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(870126428) in 18 ms
06-12 17:37:26.624 11082-11082 I/HAL: loaded HAL id=gralloc path=/vendor/lib/hw/gralloc.mt8173.img.so hmi=0xf74733f9 handle=0xeb4fed24
06-12 17:37:26.624 11082-11082 D/IMGSRV: gralloc_register_buffer:1328: hnd=0xf7b93940 ID=133 fd=29 ref=1
06-12 17:37:26.626 11082-11082 D/Atlas: Validating map...
06-12 17:37:26.630 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
    Updating view with {} - []
    Total item 0
06-12 17:37:26.662 11082-11109 I/HAL: loaded HAL id=gralloc path=/vendor/lib/hw/gralloc.mt8173.img.so hmi=0x0 handle=0xeb4fed24
06-12 17:37:26.663 11082-11109 D/IMGSRV: gralloc_module_getimplementationformat:2638: usage=0x1000 > fmt=0x1
06-12 17:37:26.663 11082-11109 E/GED: Failed to get GED Log Buf, err(0)
06-12 17:37:26.667 11082-11109 I/OpenGLRenderer: Initialized EGL, version 1.4
06-12 17:37:26.667 11082-11109 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
06-12 17:37:26.675 11082-11109 E/IMGSRV: :0: PVRSRVLoadLibrary: dlopen failed: dlopen failed: library "libPVRDebugger.so" not found
06-12 17:37:26.675 11082-11109 D/OpenGLRenderer: Enabling debug mode 0
06-12 17:37:26.675 11082-11109 I/HAL: loaded HAL id=gralloc path=/vendor/lib/hw/gralloc.mt8173.img.so hmi=0xf74733f9 handle=0xeb4fed24
06-12 17:37:26.678 11082-11109 D/IMGSRV: gralloc_register_buffer:1328: hnd=0xf7bec900 ID=4726 fd=35 ref=1
06-12 17:37:26.750 11082-11109 D/IMGSRV: gralloc_register_buffer:1328: hnd=0xf7c13b68 ID=4728 fd=32 ref=1
06-12 17:37:26.871 11082-11082 D/MainActivity: Found devices [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:26.871 11082-11082 D/Adapter: Updating view with {} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:26.872 11082-11082 D/Adapter: Total item 1
06-12 17:37:26.895 11082-11109 D/IMGSRV: gralloc_register_buffer:1328: hnd=0xf7c2abf8 ID=4729 fd=45 ref=1
06-12 17:37:28.898 11082-11082 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN}
06-12 17:37:28.902 11082-11082 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED}
06-12 17:37:28.905 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:28.905 11082-11082 D/MainActivity: Found devices []
06-12 17:37:28.909 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(1049436837)
06-12 17:37:28.910 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(1049436837)
06-12 17:37:28.910 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:28.917 11082-11098 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:28.919 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(1049436837) in 9 ms
06-12 17:37:28.935 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:28.936 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   ConnectOperation(839152890)
06-12 17:37:28.937 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ConnectOperation(839152890)
06-12 17:37:28.963 11082-11108 V/RxBle#BleConnectionCompat: Connecting without reflection
06-12 17:37:28.964 11082-11108 D/BluetoothGatt: connect() - device: DD:56:7F:B4:2F:28, auto: false
    registerApp()
    registerApp() - UUID=09a0840a-4b07-480c-9baa-4f2a988e094a
06-12 17:37:28.967 11082-11098 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12
06-12 17:37:28.980 11082-11082 D/MainActivity: Found devices []
06-12 17:37:28.982 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:29.153 11082-11112 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING}
06-12 17:37:29.154 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING} - []
    Total item 1
06-12 17:37:29.453 11082-11099 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:29.454 11082-11099 D/RxBle#BluetoothGatt: onConnectionStateChange newState=2 status=0
06-12 17:37:29.457 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ConnectOperation(839152890) in 521 ms
06-12 17:37:29.491 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   ServiceDiscoveryOperation(722479306)
06-12 17:37:29.492 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  ServiceDiscoveryOperation(722479306)
06-12 17:37:29.495 11082-11108 D/BluetoothGatt: discoverServices() - device: DD:56:7F:B4:2F:28
06-12 17:37:29.501 11082-11098 D/BluetoothGatt: onSearchComplete() = Device=DD:56:7F:B4:2F:28 Status=0
06-12 17:37:29.502 11082-11098 D/RxBle#BluetoothGatt: onServicesDiscovered status=0
06-12 17:37:29.504 11082-11135 V/RxBle#ServiceDiscoveryOperation: Preparing services description
06-12 17:37:29.513 11082-11135 V/RxBle#ServiceDiscoveryOperation: --------------- ====== Printing peripheral content ====== ---------------
    PERIPHERAL ADDRESS: DD:56:7F:B4:2F:28
    PERIPHERAL NAME: Saiimons-Dev-test
    -------------------------------------------------------------------------

    Primary Service - Generic Access (00001800-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Device Name (00002a00-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ WRITE ]
    	* Appearance (00002a01-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Peripheral Preferred Connection Parameters (00002a04-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Central Address Resolution (00002aa6-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]

    Primary Service - Generic Attribute (00001801-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Service Changed (00002a05-0000-1000-8000-00805f9b34fb)
    	  Properties: [ INDICATE ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Unknown service (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    Instance ID: 0
    -> Characteristics:
    	* Unknown characteristic (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    	  Properties: [ WRITE NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Battery Level (00002a19-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Device Information (0000180a-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Manufacturer Name String (00002a29-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    --------------- ====== Finished peripheral content ====== ---------------
06-12 17:37:29.522 11082-11135 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: true
06-12 17:37:29.526 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(534194450)
06-12 17:37:29.527 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED ServiceDiscoveryOperation(722479306) in 36 ms
06-12 17:37:29.529 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  DescriptorWriteOperation(534194450)
06-12 17:37:29.567 11082-11099 D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0
06-12 17:37:29.568 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED DescriptorWriteOperation(534194450) in 40 ms
06-12 17:37:29.653 11082-11112 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED}
06-12 17:37:29.654 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED} - []
    Total item 1
06-12 17:37:30.761 11082-11082 D/MainActivity: Got a new state map {}
06-12 17:37:30.763 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:30.763 11082-11082 D/MainActivity: Found devices []
06-12 17:37:30.771 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(721875107)
06-12 17:37:30.772 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(721875107)
06-12 17:37:30.773 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:30.777 11082-11082 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: false
06-12 17:37:30.778 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   DisconnectOperation(725286686)
06-12 17:37:30.779 11082-11135 I/RxBle#ConnectionOperationQueue: Connection operations queue to be terminated (DD:56:7F:B4:2F:28)
06-12 17:37:30.781 11082-11134 D/RxBle#Executors$RunnableAdapter: Terminated.
06-12 17:37:30.782 11082-11099 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:30.783 11082-11082 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(318534328)
06-12 17:37:30.784 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(721875107) in 12 ms
06-12 17:37:30.785 11082-11107 D/RxBle#ClientOperationQueue: STARTED  DisconnectOperation(725286686)
06-12 17:37:30.785 11082-11108 D/BluetoothManager: getConnectionState()
    getConnectedDevices
06-12 17:37:30.789 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
    Updating view with {} - []
    Total item 0
06-12 17:37:30.793 11082-11108 D/BluetoothGatt: cancelOpen() - device: DD:56:7F:B4:2F:28
06-12 17:37:30.796 11082-11098 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:30.797 11082-11098 D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
06-12 17:37:30.798 11082-11108 D/BluetoothGatt: close()
06-12 17:37:30.799 11082-11108 D/BluetoothGatt: unregisterApp() - mClientIf=12
06-12 17:37:30.802 11082-11107 D/RxBle#ClientOperationQueue: FINISHED DisconnectOperation(725286686) in 17 ms
06-12 17:37:31.026 11082-11082 D/MainActivity: Found devices [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:31.027 11082-11082 D/Adapter: Updating view with {} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 1
06-12 17:37:31.959 11082-11082 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN}
    Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED}
06-12 17:37:31.961 11082-11082 D/MainActivity: Found devices []
06-12 17:37:31.961 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:31.966 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(295101333)
06-12 17:37:31.968 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(295101333)
06-12 17:37:31.969 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:31.974 11082-11098 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:31.975 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(295101333) in 7 ms
06-12 17:37:31.984 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   ConnectOperation(879816781)
06-12 17:37:31.984 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ConnectOperation(879816781)
06-12 17:37:31.985 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:31.986 11082-11108 V/RxBle#BleConnectionCompat: Connecting without reflection
06-12 17:37:31.987 11082-11108 D/BluetoothGatt: connect() - device: DD:56:7F:B4:2F:28, auto: false
    registerApp()
    registerApp() - UUID=d1ba8cd0-d639-4842-920c-1c5c37c64f52
06-12 17:37:31.991 11082-11099 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12
06-12 17:37:32.209 11082-11118 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING}
06-12 17:37:32.209 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING} - []
    Total item 1
06-12 17:37:33.184 11082-11099 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:33.184 11082-11099 D/RxBle#BluetoothGatt: onConnectionStateChange newState=2 status=0
06-12 17:37:33.185 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ConnectOperation(879816781) in 1201 ms
06-12 17:37:33.188 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   ServiceDiscoveryOperation(645454853)
06-12 17:37:33.189 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  ServiceDiscoveryOperation(645454853)
06-12 17:37:33.190 11082-11108 D/BluetoothGatt: discoverServices() - device: DD:56:7F:B4:2F:28
06-12 17:37:33.193 11082-11098 D/BluetoothGatt: onSearchComplete() = Device=DD:56:7F:B4:2F:28 Status=0
06-12 17:37:33.193 11082-11098 D/RxBle#BluetoothGatt: onServicesDiscovered status=0
06-12 17:37:33.194 11082-11135 V/RxBle#ServiceDiscoveryOperation: Preparing services description
06-12 17:37:33.196 11082-11135 V/RxBle#ServiceDiscoveryOperation: --------------- ====== Printing peripheral content ====== ---------------
    PERIPHERAL ADDRESS: DD:56:7F:B4:2F:28
    PERIPHERAL NAME: Saiimons-Dev-test
    -------------------------------------------------------------------------

    Primary Service - Generic Access (00001800-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Device Name (00002a00-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ WRITE ]
    	* Appearance (00002a01-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Peripheral Preferred Connection Parameters (00002a04-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Central Address Resolution (00002aa6-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]

    Primary Service - Generic Attribute (00001801-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Service Changed (00002a05-0000-1000-8000-00805f9b34fb)
    	  Properties: [ INDICATE ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Unknown service (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    Instance ID: 0
    -> Characteristics:
    	* Unknown characteristic (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    	  Properties: [ WRITE NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Battery Level (00002a19-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Device Information (0000180a-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Manufacturer Name String (00002a29-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    --------------- ====== Finished peripheral content ====== ---------------
06-12 17:37:33.196 11082-11135 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: true
06-12 17:37:33.200 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(175924072)
06-12 17:37:33.200 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED ServiceDiscoveryOperation(645454853) in 11 ms
    STARTED  DescriptorWriteOperation(175924072)
06-12 17:37:33.209 11082-11118 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED}
06-12 17:37:33.209 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED} - []
    Total item 1
06-12 17:37:33.259 11082-11098 D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0
06-12 17:37:33.261 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED DescriptorWriteOperation(175924072) in 60 ms
06-12 17:37:34.183 11082-11082 D/MainActivity: Got a new state map {}
06-12 17:37:34.186 11082-11082 D/MainActivity: Found devices []
06-12 17:37:34.186 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:34.191 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(991373213)
06-12 17:37:34.192 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(991373213)
06-12 17:37:34.194 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:34.196 11082-11082 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: false
06-12 17:37:34.197 11082-11135 I/RxBle#ConnectionOperationQueue: Connection operations queue to be terminated (DD:56:7F:B4:2F:28)
06-12 17:37:34.199 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   DisconnectOperation(591634585)
06-12 17:37:34.199 11082-11134 D/RxBle#Executors$RunnableAdapter: Terminated.
06-12 17:37:34.201 11082-11082 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(772812638)
06-12 17:37:34.203 11082-11098 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:34.205 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
06-12 17:37:34.205 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(991373213) in 13 ms
06-12 17:37:34.206 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
06-12 17:37:34.206 11082-11107 D/RxBle#ClientOperationQueue: STARTED  DisconnectOperation(591634585)
06-12 17:37:34.206 11082-11108 D/BluetoothManager: getConnectionState()
    getConnectedDevices
06-12 17:37:34.210 11082-11108 D/BluetoothGatt: cancelOpen() - device: DD:56:7F:B4:2F:28
06-12 17:37:34.212 11082-11098 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:34.213 11082-11098 D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
06-12 17:37:34.214 11082-11108 D/BluetoothGatt: close()
    unregisterApp() - mClientIf=12
06-12 17:37:34.217 11082-11107 D/RxBle#ClientOperationQueue: FINISHED DisconnectOperation(591634585) in 11 ms
06-12 17:37:34.672 11082-11082 D/MainActivity: Found devices [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:34.672 11082-11082 D/Adapter: Updating view with {} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 1
06-12 17:37:35.461 11082-11082 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN}
    Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED}
06-12 17:37:35.464 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:35.464 11082-11082 D/MainActivity: Found devices []
06-12 17:37:35.470 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(701714688)
06-12 17:37:35.471 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(701714688)
06-12 17:37:35.472 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:35.479 11082-11143 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:35.481 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(701714688) in 11 ms
06-12 17:37:35.484 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   ConnectOperation(181717617)
06-12 17:37:35.485 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ConnectOperation(181717617)
06-12 17:37:35.486 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
06-12 17:37:35.487 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:35.487 11082-11108 V/RxBle#BleConnectionCompat: Connecting without reflection
06-12 17:37:35.489 11082-11108 D/BluetoothGatt: connect() - device: DD:56:7F:B4:2F:28, auto: false
    registerApp()
    registerApp() - UUID=2fa4414c-116a-4695-8d62-0ec316dd61e7
06-12 17:37:35.491 11082-11098 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12
06-12 17:37:35.685 11082-11098 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:35.685 11082-11098 D/RxBle#BluetoothGatt: onConnectionStateChange newState=2 status=0
06-12 17:37:35.686 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ConnectOperation(181717617) in 202 ms
06-12 17:37:35.690 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   ServiceDiscoveryOperation(115145264)
06-12 17:37:35.690 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  ServiceDiscoveryOperation(115145264)
06-12 17:37:35.691 11082-11108 D/BluetoothGatt: discoverServices() - device: DD:56:7F:B4:2F:28
06-12 17:37:35.695 11082-11143 D/BluetoothGatt: onSearchComplete() = Device=DD:56:7F:B4:2F:28 Status=0
06-12 17:37:35.696 11082-11143 D/RxBle#BluetoothGatt: onServicesDiscovered status=0
06-12 17:37:35.697 11082-11135 V/RxBle#ServiceDiscoveryOperation: Preparing services description
06-12 17:37:35.700 11082-11135 V/RxBle#ServiceDiscoveryOperation: --------------- ====== Printing peripheral content ====== ---------------
    PERIPHERAL ADDRESS: DD:56:7F:B4:2F:28
    PERIPHERAL NAME: Saiimons-Dev-test
    -------------------------------------------------------------------------

    Primary Service - Generic Access (00001800-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Device Name (00002a00-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ WRITE ]
    	* Appearance (00002a01-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Peripheral Preferred Connection Parameters (00002a04-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Central Address Resolution (00002aa6-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]

    Primary Service - Generic Attribute (00001801-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Service Changed (00002a05-0000-1000-8000-00805f9b34fb)
    	  Properties: [ INDICATE ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Unknown service (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    Instance ID: 0
    -> Characteristics:
    	* Unknown characteristic (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    	  Properties: [ WRITE NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Battery Level (00002a19-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Device Information (0000180a-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Manufacturer Name String (00002a29-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    --------------- ====== Finished peripheral content ====== ---------------
06-12 17:37:35.701 11082-11135 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: true
06-12 17:37:35.706 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(845958095)
06-12 17:37:35.707 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED ServiceDiscoveryOperation(115145264) in 16 ms
06-12 17:37:35.708 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  DescriptorWriteOperation(845958095)
06-12 17:37:35.712 11082-11112 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED}
06-12 17:37:35.712 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED} - []
    Total item 1
06-12 17:37:35.758 11082-11098 D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0
06-12 17:37:35.759 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED DescriptorWriteOperation(845958095) in 52 ms
06-12 17:37:37.018 11082-11082 D/MainActivity: Got a new state map {}
06-12 17:37:37.020 11082-11082 D/MainActivity: Found devices []
06-12 17:37:37.021 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:37.027 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(676301148)
06-12 17:37:37.028 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(676301148)
06-12 17:37:37.029 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:37.034 11082-11082 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: false
06-12 17:37:37.034 11082-11099 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:37.035 11082-11135 I/RxBle#ConnectionOperationQueue: Connection operations queue to be terminated (DD:56:7F:B4:2F:28)
06-12 17:37:37.037 11082-11134 D/RxBle#Executors$RunnableAdapter: Terminated.
06-12 17:37:37.037 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   DisconnectOperation(955899720)
06-12 17:37:37.038 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(676301148) in 9 ms
06-12 17:37:37.039 11082-11107 D/RxBle#ClientOperationQueue: STARTED  DisconnectOperation(955899720)
06-12 17:37:37.039 11082-11108 D/BluetoothManager: getConnectionState()
    getConnectedDevices
06-12 17:37:37.041 11082-11082 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(571201003)
06-12 17:37:37.043 11082-11108 D/BluetoothGatt: cancelOpen() - device: DD:56:7F:B4:2F:28
06-12 17:37:37.044 11082-11143 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:37.045 11082-11143 D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
06-12 17:37:37.045 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
    Updating view with {} - []
    Total item 0
06-12 17:37:37.047 11082-11108 D/BluetoothGatt: close()
    unregisterApp() - mClientIf=12
06-12 17:37:37.049 11082-11107 D/RxBle#ClientOperationQueue: FINISHED DisconnectOperation(955899720) in 10 ms
06-12 17:37:37.295 11082-11082 D/MainActivity: Found devices [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:37.298 11082-11082 D/Adapter: Updating view with {} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 1
06-12 17:37:39.127 11082-11082 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN}
    Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED}
06-12 17:37:39.131 11082-11082 D/MainActivity: Found devices []
06-12 17:37:39.131 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:39.134 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(262679092)
06-12 17:37:39.135 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(262679092)
06-12 17:37:39.138 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:39.144 11082-11099 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:39.147 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(262679092) in 11 ms
06-12 17:37:39.155 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   ConnectOperation(158501836)
06-12 17:37:39.156 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ConnectOperation(158501836)
06-12 17:37:39.157 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:39.160 11082-11108 V/RxBle#BleConnectionCompat: Connecting without reflection
06-12 17:37:39.161 11082-11108 D/BluetoothGatt: connect() - device: DD:56:7F:B4:2F:28, auto: false
    registerApp()
    registerApp() - UUID=bf6c02f2-2ebe-4234-b30d-30110431f5dd
06-12 17:37:39.164 11082-11143 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12
06-12 17:37:39.210 11082-11082 D/MainActivity: Found devices []
06-12 17:37:39.212 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:39.378 11082-11118 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING}
06-12 17:37:39.378 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING} - []
    Total item 1
06-12 17:37:39.648 11082-11099 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:39.648 11082-11099 D/RxBle#BluetoothGatt: onConnectionStateChange newState=2 status=0
06-12 17:37:39.650 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ConnectOperation(158501836) in 494 ms
06-12 17:37:39.653 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   ServiceDiscoveryOperation(1020014466)
06-12 17:37:39.654 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  ServiceDiscoveryOperation(1020014466)
06-12 17:37:39.654 11082-11108 D/BluetoothGatt: discoverServices() - device: DD:56:7F:B4:2F:28
06-12 17:37:39.660 11082-11143 D/BluetoothGatt: onSearchComplete() = Device=DD:56:7F:B4:2F:28 Status=0
06-12 17:37:39.660 11082-11143 D/RxBle#BluetoothGatt: onServicesDiscovered status=0
06-12 17:37:39.661 11082-11135 V/RxBle#ServiceDiscoveryOperation: Preparing services description
06-12 17:37:39.663 11082-11135 V/RxBle#ServiceDiscoveryOperation: --------------- ====== Printing peripheral content ====== ---------------
    PERIPHERAL ADDRESS: DD:56:7F:B4:2F:28
    PERIPHERAL NAME: Saiimons-Dev-test
    -------------------------------------------------------------------------

    Primary Service - Generic Access (00001800-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Device Name (00002a00-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ WRITE ]
    	* Appearance (00002a01-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Peripheral Preferred Connection Parameters (00002a04-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Central Address Resolution (00002aa6-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]

    Primary Service - Generic Attribute (00001801-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Service Changed (00002a05-0000-1000-8000-00805f9b34fb)
    	  Properties: [ INDICATE ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Unknown service (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    Instance ID: 0
    -> Characteristics:
    	* Unknown characteristic (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    	  Properties: [ WRITE NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Battery Level (00002a19-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Device Information (0000180a-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Manufacturer Name String (00002a29-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    --------------- ====== Finished peripheral content ====== ---------------
06-12 17:37:39.663 11082-11135 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: true
06-12 17:37:39.668 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(613532110)
06-12 17:37:39.669 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED ServiceDiscoveryOperation(1020014466) in 15 ms
    STARTED  DescriptorWriteOperation(613532110)
06-12 17:37:39.722 11082-11099 D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0
06-12 17:37:39.723 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED DescriptorWriteOperation(613532110) in 54 ms
06-12 17:37:39.878 11082-11118 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED}
06-12 17:37:39.878 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED} - []
    Total item 1
06-12 17:37:40.970 11082-11082 D/MainActivity: Got a new state map {}
06-12 17:37:40.972 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:40.973 11082-11082 D/MainActivity: Found devices []
06-12 17:37:40.981 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(580317501)
06-12 17:37:40.981 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(580317501)
06-12 17:37:40.982 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:40.984 11082-11082 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: false
06-12 17:37:40.984 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   DisconnectOperation(863877763)
06-12 17:37:40.984 11082-11135 I/RxBle#ConnectionOperationQueue: Connection operations queue to be terminated (DD:56:7F:B4:2F:28)
06-12 17:37:40.986 11082-11134 D/RxBle#Executors$RunnableAdapter: Terminated.
06-12 17:37:40.987 11082-11082 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(1068401664)
06-12 17:37:40.988 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
06-12 17:37:40.989 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
06-12 17:37:40.992 11082-11099 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:40.996 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(580317501) in 14 ms
    STARTED  DisconnectOperation(863877763)
06-12 17:37:40.996 11082-11108 D/BluetoothManager: getConnectionState()
    getConnectedDevices
06-12 17:37:40.999 11082-11108 D/BluetoothGatt: cancelOpen() - device: DD:56:7F:B4:2F:28
06-12 17:37:41.002 11082-11098 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:41.002 11082-11098 D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
06-12 17:37:41.004 11082-11108 D/BluetoothGatt: close()
    unregisterApp() - mClientIf=12
06-12 17:37:41.005 11082-11107 D/RxBle#ClientOperationQueue: FINISHED DisconnectOperation(863877763) in 8 ms
06-12 17:37:41.057 11082-11082 D/MainActivity: Found devices [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:41.060 11082-11082 D/Adapter: Updating view with {} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 1
06-12 17:37:43.126 11082-11082 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN}
    Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED}
06-12 17:37:43.128 11082-11082 D/MainActivity: Found devices []
06-12 17:37:43.129 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:43.131 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(122105299)
06-12 17:37:43.132 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(122105299)
06-12 17:37:43.133 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:43.137 11082-11099 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:43.139 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(122105299) in 7 ms
06-12 17:37:43.140 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   ConnectOperation(710706251)
06-12 17:37:43.142 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:43.142 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ConnectOperation(710706251)
06-12 17:37:43.142 11082-11082 D/Adapter: Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:43.143 11082-11108 V/RxBle#BleConnectionCompat: Connecting without reflection
06-12 17:37:43.144 11082-11108 D/BluetoothGatt: connect() - device: DD:56:7F:B4:2F:28, auto: false
    registerApp()
    registerApp() - UUID=d4808a45-b5f8-4f12-91ab-ec8b8c5a742d
06-12 17:37:43.146 11082-11098 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12
06-12 17:37:43.377 11082-11112 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING}
06-12 17:37:43.377 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING} - []
    Total item 1
06-12 17:37:43.791 11082-11098 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:43.792 11082-11098 D/RxBle#BluetoothGatt: onConnectionStateChange newState=2 status=0
06-12 17:37:43.793 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ConnectOperation(710706251) in 651 ms
06-12 17:37:43.798 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   ServiceDiscoveryOperation(501696882)
06-12 17:37:43.799 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  ServiceDiscoveryOperation(501696882)
06-12 17:37:43.800 11082-11108 D/BluetoothGatt: discoverServices() - device: DD:56:7F:B4:2F:28
06-12 17:37:43.804 11082-11099 D/BluetoothGatt: onSearchComplete() = Device=DD:56:7F:B4:2F:28 Status=0
06-12 17:37:43.805 11082-11099 D/RxBle#BluetoothGatt: onServicesDiscovered status=0
06-12 17:37:43.806 11082-11135 V/RxBle#ServiceDiscoveryOperation: Preparing services description
06-12 17:37:43.809 11082-11135 V/RxBle#ServiceDiscoveryOperation: --------------- ====== Printing peripheral content ====== ---------------
    PERIPHERAL ADDRESS: DD:56:7F:B4:2F:28
    PERIPHERAL NAME: Saiimons-Dev-test
    -------------------------------------------------------------------------

    Primary Service - Generic Access (00001800-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Device Name (00002a00-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ WRITE ]
    	* Appearance (00002a01-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Peripheral Preferred Connection Parameters (00002a04-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Central Address Resolution (00002aa6-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]

    Primary Service - Generic Attribute (00001801-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Service Changed (00002a05-0000-1000-8000-00805f9b34fb)
    	  Properties: [ INDICATE ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Unknown service (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    Instance ID: 0
    -> Characteristics:
    	* Unknown characteristic (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    	  Properties: [ WRITE NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Battery Level (00002a19-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Device Information (0000180a-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Manufacturer Name String (00002a29-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    --------------- ====== Finished peripheral content ====== ---------------
06-12 17:37:43.810 11082-11135 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: true
06-12 17:37:43.813 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(35966329)
06-12 17:37:43.814 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED ServiceDiscoveryOperation(501696882) in 16 ms
06-12 17:37:43.815 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  DescriptorWriteOperation(35966329)
06-12 17:37:43.862 11082-11143 D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0
06-12 17:37:43.863 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED DescriptorWriteOperation(35966329) in 47 ms
06-12 17:37:43.877 11082-11112 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED}
06-12 17:37:43.877 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED} - []
    Total item 1
06-12 17:37:45.818 11082-11082 D/MainActivity: Got a new state map {}
06-12 17:37:45.820 11082-11082 D/MainActivity: Found devices []
06-12 17:37:45.820 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:45.824 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(369109363)
06-12 17:37:45.826 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(369109363)
06-12 17:37:45.827 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:45.830 11082-11082 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: false
06-12 17:37:45.831 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   DisconnectOperation(280554030)
06-12 17:37:45.833 11082-11135 I/RxBle#ConnectionOperationQueue: Connection operations queue to be terminated (DD:56:7F:B4:2F:28)
06-12 17:37:45.834 11082-11099 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:45.835 11082-11134 D/RxBle#Executors$RunnableAdapter: Terminated.
06-12 17:37:45.837 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(369109363) in 11 ms
06-12 17:37:45.838 11082-11107 D/RxBle#ClientOperationQueue: STARTED  DisconnectOperation(280554030)
06-12 17:37:45.838 11082-11108 D/BluetoothManager: getConnectionState()
    getConnectedDevices
06-12 17:37:45.838 11082-11082 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(61467087)
06-12 17:37:45.840 11082-11108 D/BluetoothGatt: cancelOpen() - device: DD:56:7F:B4:2F:28
06-12 17:37:45.842 11082-11143 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:45.842 11082-11143 D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
06-12 17:37:45.843 11082-11108 D/BluetoothGatt: close()
    unregisterApp() - mClientIf=12
06-12 17:37:45.845 11082-11107 D/RxBle#ClientOperationQueue: FINISHED DisconnectOperation(280554030) in 8 ms
06-12 17:37:45.846 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
    Updating view with {} - []
    Total item 0
06-12 17:37:46.078 11082-11082 D/MainActivity: Found devices [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:46.078 11082-11082 D/Adapter: Updating view with {} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 1
06-12 17:37:47.196 11082-11082 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN}
    Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED}
06-12 17:37:47.199 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:47.199 11082-11082 D/MainActivity: Found devices []
06-12 17:37:47.202 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(863624296)
06-12 17:37:47.203 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(863624296)
06-12 17:37:47.204 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:47.209 11082-11099 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:47.211 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:47.212 11082-11082 D/Adapter: Total item 2
    Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:47.212 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   ConnectOperation(882495616)
06-12 17:37:47.212 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(863624296) in 10 ms
06-12 17:37:47.213 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ConnectOperation(882495616)
06-12 17:37:47.214 11082-11108 V/RxBle#BleConnectionCompat: Connecting without reflection
06-12 17:37:47.215 11082-11108 D/BluetoothGatt: connect() - device: DD:56:7F:B4:2F:28, auto: false
    registerApp()
    registerApp() - UUID=358370c3-597f-4167-a745-744c90f75478
06-12 17:37:47.216 11082-11143 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12
06-12 17:37:47.447 11082-11113 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING}
06-12 17:37:47.447 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING} - []
    Total item 1
06-12 17:37:47.468 11082-11098 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:47.469 11082-11098 D/RxBle#BluetoothGatt: onConnectionStateChange newState=2 status=0
06-12 17:37:47.471 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ConnectOperation(882495616) in 257 ms
06-12 17:37:47.474 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   ServiceDiscoveryOperation(996262897)
06-12 17:37:47.475 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  ServiceDiscoveryOperation(996262897)
06-12 17:37:47.476 11082-11108 D/BluetoothGatt: discoverServices() - device: DD:56:7F:B4:2F:28
06-12 17:37:47.478 11082-11143 D/BluetoothGatt: onSearchComplete() = Device=DD:56:7F:B4:2F:28 Status=0
06-12 17:37:47.478 11082-11143 D/RxBle#BluetoothGatt: onServicesDiscovered status=0
06-12 17:37:47.480 11082-11135 V/RxBle#ServiceDiscoveryOperation: Preparing services description
06-12 17:37:47.482 11082-11135 V/RxBle#ServiceDiscoveryOperation: --------------- ====== Printing peripheral content ====== ---------------
    PERIPHERAL ADDRESS: DD:56:7F:B4:2F:28
    PERIPHERAL NAME: Saiimons-Dev-test
    -------------------------------------------------------------------------

    Primary Service - Generic Access (00001800-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Device Name (00002a00-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ WRITE ]
    	* Appearance (00002a01-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Peripheral Preferred Connection Parameters (00002a04-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Central Address Resolution (00002aa6-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]

    Primary Service - Generic Attribute (00001801-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Service Changed (00002a05-0000-1000-8000-00805f9b34fb)
    	  Properties: [ INDICATE ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Unknown service (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    Instance ID: 0
    -> Characteristics:
    	* Unknown characteristic (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    	  Properties: [ WRITE NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Battery Level (00002a19-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Device Information (0000180a-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Manufacturer Name String (00002a29-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    --------------- ====== Finished peripheral content ====== ---------------
06-12 17:37:47.483 11082-11135 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: true
06-12 17:37:47.487 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(464891204)
06-12 17:37:47.488 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED ServiceDiscoveryOperation(996262897) in 13 ms
    STARTED  DescriptorWriteOperation(464891204)
06-12 17:37:47.543 11082-11098 D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0
06-12 17:37:47.544 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED DescriptorWriteOperation(464891204) in 55 ms
06-12 17:37:47.697 11082-11113 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED}
06-12 17:37:47.697 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED} - []
    Total item 1
06-12 17:37:49.056 11082-11082 D/MainActivity: Got a new state map {}
06-12 17:37:49.058 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:49.059 11082-11082 D/MainActivity: Found devices []
06-12 17:37:49.067 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(746303176)
06-12 17:37:49.067 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(746303176)
06-12 17:37:49.069 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:49.073 11082-11099 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:49.074 11082-11082 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: false
06-12 17:37:49.075 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(746303176) in 7 ms
06-12 17:37:49.078 11082-11135 I/RxBle#ConnectionOperationQueue: Connection operations queue to be terminated (DD:56:7F:B4:2F:28)
06-12 17:37:49.079 11082-11134 D/RxBle#Executors$RunnableAdapter: Terminated.
06-12 17:37:49.080 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   DisconnectOperation(788590452)
06-12 17:37:49.081 11082-11082 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(108632903)
06-12 17:37:49.081 11082-11107 D/RxBle#ClientOperationQueue: STARTED  DisconnectOperation(788590452)
06-12 17:37:49.081 11082-11108 D/BluetoothManager: getConnectionState()
    getConnectedDevices
06-12 17:37:49.084 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
    Updating view with {} - []
    Total item 0
06-12 17:37:49.087 11082-11108 D/BluetoothGatt: cancelOpen() - device: DD:56:7F:B4:2F:28
06-12 17:37:49.090 11082-11098 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:49.091 11082-11098 D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
06-12 17:37:49.092 11082-11108 D/BluetoothGatt: close()
    unregisterApp() - mClientIf=12
06-12 17:37:49.094 11082-11107 D/RxBle#ClientOperationQueue: FINISHED DisconnectOperation(788590452) in 14 ms
06-12 17:37:49.318 11082-11082 D/MainActivity: Found devices [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
06-12 17:37:49.318 11082-11082 D/Adapter: Updating view with {} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 1
06-12 17:37:50.370 11082-11082 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN}
    Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED}
06-12 17:37:50.373 11082-11082 D/MainActivity: Found devices []
06-12 17:37:50.373 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:50.380 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(365315205)
06-12 17:37:50.380 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(365315205)
06-12 17:37:50.381 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:50.388 11082-11143 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:50.391 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(365315205) in 10 ms
06-12 17:37:50.396 11082-11135 D/RxBle#ClientOperationQueue: QUEUED   ConnectOperation(53313341)
06-12 17:37:50.397 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ConnectOperation(53313341)
06-12 17:37:50.399 11082-11108 V/RxBle#BleConnectionCompat: Connecting without reflection
06-12 17:37:50.399 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=UNKNOWN} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
06-12 17:37:50.399 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - [Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}]
    Total item 2
06-12 17:37:50.399 11082-11108 D/BluetoothGatt: connect() - device: DD:56:7F:B4:2F:28, auto: false
06-12 17:37:50.400 11082-11108 D/BluetoothGatt: registerApp()
    registerApp() - UUID=930d9630-b89c-4926-9381-3e16edf65543
06-12 17:37:50.400 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:50.401 11082-11098 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12
06-12 17:37:50.482 11082-11082 D/MainActivity: Found devices []
06-12 17:37:50.485 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=DISCONNECTED} - []
    Total item 1
06-12 17:37:50.621 11082-11113 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING}
06-12 17:37:50.621 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTING} - []
    Total item 1
06-12 17:37:51.112 11082-11099 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=DD:56:7F:B4:2F:28
06-12 17:37:51.112 11082-11099 D/RxBle#BluetoothGatt: onConnectionStateChange newState=2 status=0
06-12 17:37:51.118 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   ServiceDiscoveryOperation(359835180)
06-12 17:37:51.119 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ConnectOperation(53313341) in 722 ms
06-12 17:37:51.119 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  ServiceDiscoveryOperation(359835180)
06-12 17:37:51.119 11082-11108 D/BluetoothGatt: discoverServices() - device: DD:56:7F:B4:2F:28
06-12 17:37:51.121 11082-11113 D/MainActivity: Got a new state map {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED}
06-12 17:37:51.121 11082-11082 D/Adapter: Updating view with {Reader{name='Saiimons-Dev-test', macAddress='DD:56:7F:B4:2F:28'}=CONNECTED} - []
06-12 17:37:51.121 11082-11082 D/Adapter: Total item 1
06-12 17:37:51.123 11082-11143 D/BluetoothGatt: onSearchComplete() = Device=DD:56:7F:B4:2F:28 Status=0
06-12 17:37:51.123 11082-11143 D/RxBle#BluetoothGatt: onServicesDiscovered status=0
06-12 17:37:51.124 11082-11135 V/RxBle#ServiceDiscoveryOperation: Preparing services description
06-12 17:37:51.126 11082-11135 V/RxBle#ServiceDiscoveryOperation: --------------- ====== Printing peripheral content ====== ---------------
    PERIPHERAL ADDRESS: DD:56:7F:B4:2F:28
    PERIPHERAL NAME: Saiimons-Dev-test
    -------------------------------------------------------------------------

    Primary Service - Generic Access (00001800-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Device Name (00002a00-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ WRITE ]
    	* Appearance (00002a01-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Peripheral Preferred Connection Parameters (00002a04-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    	* Central Address Resolution (00002aa6-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]

    Primary Service - Generic Attribute (00001801-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Service Changed (00002a05-0000-1000-8000-00805f9b34fb)
    	  Properties: [ INDICATE ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Unknown service (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    Instance ID: 0
    -> Characteristics:
    	* Unknown characteristic (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
    	  Properties: [ WRITE NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Battery Level (00002a19-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ NOTIFY ]
    	  -> Descriptors:
    		* Client Characteristic Configuration (00002902-0000-1000-8000-00805f9b34fb)

    Primary Service - Device Information (0000180a-0000-1000-8000-00805f9b34fb)
    Instance ID: 0
    -> Characteristics:
    	* Manufacturer Name String (00002a29-0000-1000-8000-00805f9b34fb)
    	  Properties: [ READ ]
    --------------- ====== Finished peripheral content ====== ---------------
06-12 17:37:51.126 11082-11135 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: true
06-12 17:37:51.134 11082-11135 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(647492859)
06-12 17:37:51.135 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED ServiceDiscoveryOperation(359835180) in 16 ms
06-12 17:37:51.136 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  DescriptorWriteOperation(647492859)
06-12 17:37:51.187 11082-11099 D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0
06-12 17:37:51.188 11082-11134 D/RxBle#ConnectionOperationQueue: FINISHED DescriptorWriteOperation(647492859) in 52 ms
06-12 17:37:51.929 11082-11082 D/MainActivity: Got a new state map {}
06-12 17:37:51.931 11082-11108 I/RxBle#CancellableDisposable: Scan operation is requested to stop.
06-12 17:37:51.931 11082-11082 D/MainActivity: Found devices []
06-12 17:37:51.941 11082-11082 D/RxBle#ClientOperationQueue: QUEUED   ScanOperationApi21(813299992)
06-12 17:37:51.942 11082-11107 D/RxBle#ClientOperationQueue: STARTED  ScanOperationApi21(813299992)
06-12 17:37:51.942 11082-11108 I/RxBle#QueueOperation: Scan operation is requested to start.
06-12 17:37:51.944 11082-11082 D/BluetoothGatt: setCharacteristicNotification() - uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX enable: false
06-12 17:37:51.948 11082-11098 D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=11
06-12 17:37:51.949 11082-11082 D/RxBle#ConnectionOperationQueue: QUEUED   DescriptorWriteOperation(902526421)
06-12 17:37:51.950 11082-11134 D/RxBle#ConnectionOperationQueue: STARTED  DescriptorWriteOperation(902526421)
06-12 17:37:51.950 11082-11107 D/RxBle#ClientOperationQueue: FINISHED ScanOperationApi21(813299992) in 8 ms
06-12 17:37:51.951 11082-11082 D/Adapter: Updating view with {} - []
    Total item 0
    Updating view with {} - []
    Total item 0
06-12 17:37:51.988 11082-11098 D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0

Actual result

        at java.util.LinkedList$LinkIterator.remove(LinkedList.java:167)
        at java.util.LinkedList.removeOneOccurrence(LinkedList.java:837)
        at java.util.LinkedList.removeFirstOccurrenceImpl(LinkedList.java:830)
        at java.util.LinkedList.remove(LinkedList.java:665)
        at com.polidea.rxandroidble2.internal.connection.DisconnectionRouter$7.cancel(DisconnectionRouter.java:153)
        at io.reactivex.internal.disposables.CancellableDisposable.dispose(CancellableDisposable.java:49)
        at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
        at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.dispose(ObservableCreate.java:122)
        at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
        at io.reactivex.observers.DisposableObserver.dispose(DisposableObserver.java:91)
        at com.polidea.rxandroidble2.internal.serialization.ConnectionOperationQueueImpl.onConnectionUnsubscribed(ConnectionOperationQueueImpl.java:157)
        at com.polidea.rxandroidble2.internal.connection.ConnectorImpl$1$1.run(ConnectorImpl.java:63)
        at io.reactivex.internal.operators.observable.ObservableDoFinally$DoFinallyObserver.runFinally(ObservableDoFinally.java:144)
        at io.reactivex.internal.operators.observable.ObservableDoFinally$DoFinallyObserver.dispose(ObservableDoFinally.java:100)
        at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.dispose(ObservableSubscribeOn.java:73)
        at io.reactivex.internal.operators.observable.ObservableUnsubscribeOn$UnsubscribeObserver$DisposeTask.run(ObservableUnsubscribeOn.java:95)
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)
dariuszseweryn added a commit that referenced this issue Jun 13, 2018
DisconnectionRouter is storing emitters waiting for information about disconnection in a Queue. This Queue may be accessed concurrently and it was not prepared for this scenario. Additionally there could be a race if an exception would happen when a new emitter would get subscribed.
Fixes #441
@dariuszseweryn dariuszseweryn self-assigned this Jun 13, 2018
@dariuszseweryn dariuszseweryn added the bug Bug that is caused by the library label Jun 13, 2018
@dariuszseweryn dariuszseweryn added this to the 1.7.0 milestone Jun 13, 2018
dariuszseweryn added a commit that referenced this issue Jun 13, 2018
DisconnectionRouter is storing emitters waiting for information about disconnection in a Queue. This Queue may be accessed concurrently and it was not prepared for this scenario. Additionally there could be a race if an exception would happen when a new emitter would get subscribed.
Fixes #441
@dariuszseweryn
Copy link
Owner

Hello @saiimons

In a moment there should be a 1.7.0-SNAPSHOT available that has this issue fixed.

Best Regards

@saiimons
Copy link
Author

Hey @dariuszseweryn !
Thanks for the quick reply and snapshot 👍
Just played around with it and the issue seems to have been resolved, great job !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is caused by the library
Projects
None yet
Development

No branches or pull requests

2 participants