Device got disconnected before service discovery finished
See original GitHub issueHi,phillip
I have met another problem. The twice dfu is on same MAC address. Becasue they are same Mac address,so does not do gatt.refresh(). At second dfu happend
Device got disconnected before service discovery finished
Could you help me?
11-30 18:42:53.392 22344-27217/com.putao.wd I/DfuBaseService: Connecting to the device...
11-30 18:42:53.403 22344-22394/com.putao.wd I/DfuBaseService: Connected to GATT server
11-30 18:42:53.406 22344-22394/com.putao.wd I/DfuBaseService: Attempting to start service discovery... succeed
11-30 18:42:54.828 22344-22355/com.putao.wd I/DfuBaseService: Services discovered
11-30 18:42:55.844 22344-27217/com.putao.wd I/DfuImpl: Reading DFU version number...
11-30 18:42:56.048 22344-27217/com.putao.wd I/DfuImpl: Version number read: 0.1
11-30 18:42:56.048 22344-27217/com.putao.wd W/DfuImpl: Application with buttonless update found
11-30 18:42:56.048 22344-27217/com.putao.wd I/DfuImpl: Enabling notifications...
11-30 18:42:57.241 22344-27217/com.putao.wd I/DfuImpl: Sending Start DFU command (Op Code = 1, Upload Mode = 4)
11-30 18:42:57.801 22344-22356/com.putao.wd E/DfuBaseService: Connection state change error: 19 newState: 0
11-30 18:42:57.809 22344-27217/com.putao.wd I/DfuBaseService: Refreshing result: true
11-30 18:42:57.809 22344-27217/com.putao.wd I/DfuBaseService: Cleaning up...
11-30 18:42:57.811 22344-27217/com.putao.wd I/DfuImpl: Starting service that will connect to the DFU bootloader
11-30 18:42:57.821 22344-22344/com.putao.wd I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
11-30 18:42:59.863 22344-27217/com.putao.wd I/DfuBaseService: Connecting to the device...
11-30 18:43:00.190 22344-22356/com.putao.wd I/DfuBaseService: Connected to GATT server
11-30 18:43:00.195 22344-22356/com.putao.wd I/DfuBaseService: Attempting to start service discovery... succeed
11-30 18:43:01.222 22344-22394/com.putao.wd I/DfuBaseService: Services discovered
11-30 18:43:02.229 22344-27217/com.putao.wd I/DfuImpl: Reading DFU version number...
11-30 18:43:02.293 22344-27217/com.putao.wd I/DfuImpl: Version number read: 0.8
11-30 18:43:02.293 22344-27217/com.putao.wd I/DfuImpl: Enabling notifications...
11-30 18:43:03.353 22344-27217/com.putao.wd I/DfuImpl: Sending Start DFU command (Op Code = 1, Upload Mode = 4)
11-30 18:43:03.412 22344-27217/com.putao.wd I/DfuImpl: Sending image size array to DFU Packet (0b, 0b, 142544b)
11-30 18:43:07.634 22344-27217/com.putao.wd I/DfuImpl: Sending the Initialize DFU Parameters START (Op Code = 2, Value = 0)
11-30 18:43:07.701 22344-27217/com.putao.wd I/DfuImpl: Sending 142544 bytes of init packet
11-30 18:43:07.702 22344-27217/com.putao.wd I/DfuImpl: Sending init packet (Value = FF-FF-FF-FF-FF-FF-00-00-01-00-64-00-84-17)
11-30 18:43:07.704 22344-27217/com.putao.wd I/DfuImpl: Sending the Initialize DFU Parameters COMPLETE (Op Code = 2, Value = 1)
11-30 18:43:07.763 22344-27217/com.putao.wd I/DfuImpl: Sending Receive Firmware Image request (Op Code = 3)
11-30 18:43:07.822 22344-27217/com.putao.wd I/DfuImpl: Uploading firmware...
11-30 18:43:48.613 22344-27217/com.putao.wd I/DfuImpl: Response received. Op Code: 16 Req Op Code = 3, Status = 1
11-30 18:43:48.614 22344-27217/com.putao.wd I/DfuImpl: Transfer of 142544 bytes has taken 39790 ms
11-30 18:43:48.614 22344-27217/com.putao.wd I/DfuImpl: Sending Validate request (Op Code = 4)
11-30 18:43:48.853 22344-27217/com.putao.wd I/DfuImpl: Response received. Op Code: 16 Req Op Code = 4, Status = 1
11-30 18:43:48.854 22344-27217/com.putao.wd I/DfuImpl: Sending Activate and Reset request (Op Code = 5)
11-30 18:43:48.984 22344-22394/com.putao.wd E/DfuBaseService: Connection state change error: 19 newState: 0
11-30 18:43:48.986 22344-27217/com.putao.wd I/DfuBaseService: Refreshing result: true
11-30 18:43:48.986 22344-27217/com.putao.wd I/DfuBaseService: Cleaning up...
11-30 18:43:49.000 22344-22344/com.putao.wd I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
11-30 18:44:16.007 22344-28502/com.putao.wd I/DfuBaseService: Connecting to the device...
11-30 18:44:16.021 22344-22355/com.putao.wd I/DfuBaseService: Connected to GATT server
11-30 18:44:16.025 22344-22355/com.putao.wd I/DfuBaseService: Attempting to start service discovery... succeed
11-30 18:44:16.771 22344-22356/com.putao.wd I/DfuBaseService: Services discovered
11-30 18:44:17.776 22344-28502/com.putao.wd I/DfuImpl: Reading DFU version number...
11-30 18:44:17.863 22344-28502/com.putao.wd I/DfuImpl: Version number read: 0.1
11-30 18:44:17.863 22344-28502/com.putao.wd W/DfuImpl: Application with buttonless update found
11-30 18:44:17.864 22344-28502/com.putao.wd I/DfuImpl: Enabling notifications...
11-30 18:44:19.014 22344-28502/com.putao.wd I/DfuImpl: Sending Start DFU command (Op Code = 1, Upload Mode = 4)
11-30 18:44:19.296 22344-22394/com.putao.wd E/DfuBaseService: Connection state change error: 19 newState: 0
11-30 18:44:19.303 22344-28502/com.putao.wd I/DfuBaseService: Refreshing result: true
11-30 18:44:19.303 22344-28502/com.putao.wd I/DfuBaseService: Cleaning up...
11-30 18:44:19.306 22344-28502/com.putao.wd I/DfuImpl: Starting service that will connect to the DFU bootloader
11-30 18:44:19.314 22344-22344/com.putao.wd I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
11-30 18:44:21.349 22344-28502/com.putao.wd I/DfuBaseService: Connecting to the device...
11-30 18:44:21.656 22344-22394/com.putao.wd I/DfuBaseService: Connected to GATT server
11-30 18:44:21.662 22344-22394/com.putao.wd I/DfuBaseService: Attempting to start service discovery... succeed
11-30 18:44:24.018 22344-22400/com.putao.wd E/DfuBaseService: Connection state change error: 34 newState: 0
11-30 18:44:24.018 22344-28502/com.putao.wd E/DfuBaseService: Device got disconnected before service discovery finished
11-30 18:44:24.023 22344-28502/com.putao.wd I/DfuBaseService: Refreshing result: true
11-30 18:44:24.023 22344-28502/com.putao.wd I/DfuBaseService: Cleaning up...
11-30 18:44:24.028 22344-22344/com.putao.wd I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:19 (8 by maintainers)
Top Results From Across the Web
Android BLE communicating with peripheral disconnects before ...
Android BLE communicating with peripheral disconnects before service discovery ... I can discover the peripheral and then connect, but when I device.
Read more >Unexpected disconnect after BluetoothGatt.discoverServices ...
Hello, Setup: Android 4.4.2 (LG G2), nRF51822 peripherial. I noticed that once in a while when trying to connect to my nRF51 based...
Read more >Service Discovery Protocol - an overview | ScienceDirect Topics
The Service Discovery Protocol (SDP) is used by a client device to find out about the services it can use on a server...
Read more >The Peripheral class — bluepy 0.9.11 documentation
This will perform Bluetooth service discovery if this has not already been done; otherwise it will return a cached list of services immediately....
Read more >Transfer BLE data - Android Developers
... the GATT Server on the BLE device is to perform service discovery. ... broadcast intent, indicating that service discovery has finished.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Any update?
@philips77 FYI : This issue is still happened on Android Nougat 7.1.2(Nexus 5X)