EspressifApp / EspMeshForAndroid

ESP-MESH can be thought of as an extension of the Wi-Fi protocol. It combines the advantages of both Wi-Fi and Bluetooth technologies to provide innovative solutions that make you re-think how wireless networks can be built using the same networking equipment. ESP-MESH is developed and maintained by Espressif Corp.
Other
62 stars 19 forks source link

BLE Configuration Not working in android 10 phones #3

Closed chamithDu closed 4 years ago

chamithDu commented 4 years ago

BLE Configuration Disconnect after security Negotiation any idea about this ?

EspressifApp commented 4 years ago

What phone did you use?

chamithDu commented 4 years ago

Samsung S10+ device I also enable ACCESS_BACKGROUND_LOCATION permission

XuXiangJun commented 4 years ago

Maybe you can upgrade your phone system first. We have also found a BLE MTU bug on Samsung S10e(Android 10), and Samsung has fixed it.

chamithDu commented 4 years ago

I have latest update in my device(Samsung Galaxy S10+) but still issue is there :(

XuXiangJun commented 4 years ago

Could you upload the logcat for me?

chamithDu commented 4 years ago

2020-03-02 11:40:10.515 1925-1966/h5.espressif.esp32 I/System.out: Hint: use closeThreadResources() to avoid finalizing recycled transactions (initial commit count: 0). 2020-03-02 11:40:10.596 1925-1966/h5.espressif.esp32 W/Box: Skipping low-level close for read-only cursor (non-creator thread '') 2020-03-02 11:40:10.596 1925-1966/h5.espressif.esp32 W/Box: Destroyed recycled transaction from non-owner thread '' 2020-03-02 11:40:53.185 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: stopped(false) old=true 2020-03-02 11:40:53.219 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: stopped(false) old=false 2020-03-02 11:40:53.234 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: Relayout returned: old=[0,0][1440,3040] new=[0,0][1440,3040] req=(1440,3040)0 dur=6 res=0x7 s={true 527647559680} ch=true 2020-03-02 11:40:53.237 1925-2149/h5.espressif.esp32 D/OpenGLRenderer: createReliableSurface : 0x7c56860840, 0x7ada3ed000 2020-03-02 11:40:53.239 1925-2149/h5.espressif.esp32 I/mali_winsys: new_window_surface() [1440x3040] return: 0x3000 2020-03-02 11:40:53.242 1925-2149/h5.espressif.esp32 D/OpenGLRenderer: SurfaceChanged : 0x0 -> 0x7bc7ca8a00 2020-03-02 11:40:53.252 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1 2020-03-02 11:40:53.253 1925-1925/h5.espressif.esp32 D/InputMethodManager: prepareNavigationBarInfo() DecorView@a860a07[EspWebActivity] 2020-03-02 11:40:53.253 1925-1925/h5.espressif.esp32 D/InputMethodManager: getNavigationBarColor() -855310 2020-03-02 11:40:53.254 1925-1925/h5.espressif.esp32 D/InputMethodManager: prepareNavigationBarInfo() DecorView@a860a07[EspWebActivity] 2020-03-02 11:40:53.254 1925-1925/h5.espressif.esp32 D/InputMethodManager: getNavigationBarColor() -855310 2020-03-02 11:40:53.254 1925-1925/h5.espressif.esp32 V/InputMethodManager: Starting input: tba=h5.espressif.esp32 ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false 2020-03-02 11:40:53.255 1925-1925/h5.espressif.esp32 D/InputMethodManager: startInputInner - Id : 0 2020-03-02 11:40:53.255 1925-1925/h5.espressif.esp32 I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus 2020-03-02 11:40:55.294 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 11:40:55.353 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 11:40:55.363 1925-1925/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 1925 2020-03-02 11:40:57.827 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 11:40:57.890 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 11:40:57.906 1925-1925/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 1925 2020-03-02 11:40:58.864 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 11:40:58.946 1925-1925/h5.espressif.esp32 D/ViewRootImpl@bf87f38[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 11:40:58.954 1925-1925/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(41)] "{"connected":true,"encode":true,"ssid":"xxxxxxxx","bssid":"xx:xx:xx:xx:xx:xx","frequency":"5180"}", source: file:///android_asset/web/app/js/conDevice.js (41) 2020-03-02 11:40:58.955 1925-2598/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 11:40:58.955 1925-2598/h5.espressif.esp32 I/chatty: uid=10382(h5.espressif.esp32) JavaBridge identical 1 line 2020-03-02 11:40:58.956 1925-2598/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 11:40:58.956 1925-2598/h5.espressif.esp32 D/BluetoothLeScanner: Start Scan with callback 2020-03-02 11:40:58.958 1925-1992/h5.espressif.esp32 D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=12 mScannerId=0 2020-03-02 11:40:58.961 1925-2388/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread notified 2020-03-02 11:40:58.963 1925-1925/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 1925 2020-03-02 11:40:59.209 1925-1925/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 1925 2020-03-02 11:41:03.969 1925-2598/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 11:41:03.971 1925-2598/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 11:41:03.971 1925-2598/h5.espressif.esp32 D/BluetoothLeScanner: Stop Scan with callback 2020-03-02 11:41:04.990 1925-2388/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread wait()

XuXiangJun commented 4 years ago

Is this all ? I need the log which tag is “BlufiClientImpl”

XuXiangJun commented 4 years ago

Maybe you can try to modify some codes.

In interface IEspActionDeviceBlufi

int DEFAULT_MTU_LENGTH = 128;

Change 128 to 20

chamithDu commented 4 years ago

:( Now it stop at the 20%

XuXiangJun commented 4 years ago

Reset the device and try again.

chamithDu commented 4 years ago

Still same no positive result

XuXiangJun commented 4 years ago

Did the APP print any warn or error log?

chamithDu commented 4 years ago

No, this is what i get from error log

2020-03-02 12:15:35.193 26626-27000/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread wait() 2020-03-02 12:15:38.790 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:15:38.876 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:15:38.898 26626-26626/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 26626 2020-03-02 12:15:40.343 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:15:40.389 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:15:40.398 26626-26626/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(41)] "{"connected":true,"encode":true,"ssid":"xxxxxxxx","bssid":"xx:xx:xx:xx:xx:xx","frequency":"5180"}", source: file:///android_asset/web/app/js/conDevice.js (41) 2020-03-02 12:15:40.399 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:15:40.400 26626-27190/h5.espressif.esp32 I/chatty: uid=10382(h5.espressif.esp32) JavaBridge identical 1 line 2020-03-02 12:15:40.400 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:15:40.400 26626-27190/h5.espressif.esp32 D/BluetoothLeScanner: Start Scan with callback 2020-03-02 12:15:40.402 26626-26659/h5.espressif.esp32 D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=12 mScannerId=0 2020-03-02 12:15:40.407 26626-27000/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread notified 2020-03-02 12:15:40.410 26626-26626/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 26626 2020-03-02 12:15:40.647 26626-26626/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 26626 2020-03-02 12:15:45.419 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:15:45.420 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:15:45.420 26626-27190/h5.espressif.esp32 D/BluetoothLeScanner: Stop Scan with callback 2020-03-02 12:15:45.433 26626-26626/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(1350)] "["246f284ca284"]", source: file:///android_asset/web/js/common.js (1350) 2020-03-02 12:15:45.472 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:15:45.478 26626-27190/h5.espressif.esp32 D/BluetoothGatt: connect() - device: 24:6F:28:4C:A2:86, auto: false 2020-03-02 12:15:45.478 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: isSecureModeEnabled 2020-03-02 12:15:45.479 26626-27190/h5.espressif.esp32 D/BluetoothGatt: registerApp() 2020-03-02 12:15:45.479 26626-27190/h5.espressif.esp32 D/BluetoothGatt: registerApp() - UUID=999c08da-7962-4a4c-8927-2004b7ef28f0 2020-03-02 12:15:45.486 26626-27190/h5.espressif.esp32 D/EspActionDeviceConfigure2: Start doActionConfigureBlufi2 2020-03-02 12:15:45.487 26626-26659/h5.espressif.esp32 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12 2020-03-02 12:15:46.093 26626-26659/h5.espressif.esp32 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=24:6F:28:4C:A2:86 2020-03-02 12:15:46.117 26626-26659/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onConnectionStateChange status=0, newState=2, address=24:6F:28:4C:A2:86 2020-03-02 12:15:46.118 26626-26659/h5.espressif.esp32 D/BluetoothGatt: discoverServices() - device: 24:6F:28:4C:A2:86 2020-03-02 12:15:46.499 26626-27000/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread wait() 2020-03-02 12:15:46.614 26626-26659/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=6 latency=0 timeout=500 status=0 2020-03-02 12:15:46.768 26626-26659/h5.espressif.esp32 D/BluetoothGatt: onSearchComplete() = Device=24:6F:28:4C:A2:86 Status=0 2020-03-02 12:15:46.768 26626-26659/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onServicesDiscovered status=0 2020-03-02 12:15:46.771 26626-26659/h5.espressif.esp32 D/BluetoothGatt: setCharacteristicNotification() - uuid: 0000ff02-0000-1000-8000-00805f9b34fb enable: true 2020-03-02 12:15:46.783 26626-26659/h5.espressif.esp32 D/BluetoothGatt: requestConnectionPriority() - params: 1 2020-03-02 12:15:46.785 26626-26659/h5.espressif.esp32 D/[EspActionDeviceConfigure]: Set BlufiClient complete 2020-03-02 12:15:46.785 26626-26659/h5.espressif.esp32 D/BluetoothGatt: configureMTU() - device: 24:6F:28:4C:A2:86 mtu: 20 2020-03-02 12:15:46.858 26626-26659/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=39 latency=0 timeout=500 status=0 2020-03-02 12:15:47.350 26626-26659/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=9 latency=0 timeout=500 status=0 2020-03-02 12:16:02.152 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:16:02.240 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:16:16.015 26626-26662/h5.espressif.esp32 D/BluetoothGatt: onClientConnectionState() - status=19 clientIf=12 device=24:6F:28:4C:A2:86 2020-03-02 12:16:16.022 26626-26662/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onConnectionStateChange status=19, newState=0, address=24:6F:28:4C:A2:86 2020-03-02 12:16:16.027 26626-26662/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:16:16.041 26626-26662/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=12 2020-03-02 12:16:16.062 26626-26662/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onGattClose 2020-03-02 12:16:18.036 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:16:18.037 26626-27190/h5.espressif.esp32 I/chatty: uid=10382(h5.espressif.esp32) JavaBridge identical 1 line 2020-03-02 12:16:18.040 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:16:18.040 26626-27190/h5.espressif.esp32 D/BluetoothLeScanner: Start Scan with callback 2020-03-02 12:16:18.045 26626-26687/h5.espressif.esp32 D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=12 mScannerId=0 2020-03-02 12:16:18.052 26626-27000/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread notified 2020-03-02 12:16:23.056 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:16:23.057 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:16:23.060 26626-27190/h5.espressif.esp32 D/BluetoothLeScanner: Stop Scan with callback 2020-03-02 12:16:23.073 26626-26626/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(1350)] "["246f284ca284"]", source: file:///android_asset/web/js/common.js (1350) 2020-03-02 12:16:23.076 26626-27190/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:16:23.083 26626-27190/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=0 2020-03-02 12:16:23.084 26626-27190/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:16:23.088 26626-27190/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=0 2020-03-02 12:16:23.106 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:16:23.107 26626-27190/h5.espressif.esp32 D/BluetoothGatt: connect() - device: 24:6F:28:4C:A2:86, auto: false 2020-03-02 12:16:23.108 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: isSecureModeEnabled 2020-03-02 12:16:23.108 26626-27190/h5.espressif.esp32 D/BluetoothGatt: registerApp() 2020-03-02 12:16:23.108 26626-27190/h5.espressif.esp32 D/BluetoothGatt: registerApp() - UUID=81e938c9-e63a-4be3-a3e1-b5e68306b20d 2020-03-02 12:16:23.110 26626-27190/h5.espressif.esp32 D/EspActionDeviceConfigure2: Start doActionConfigureBlufi2 2020-03-02 12:16:23.111 26626-26687/h5.espressif.esp32 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12 2020-03-02 12:16:23.523 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:16:23.535 26626-26687/h5.espressif.esp32 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=24:6F:28:4C:A2:86 2020-03-02 12:16:23.539 26626-26687/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onConnectionStateChange status=0, newState=2, address=24:6F:28:4C:A2:86 2020-03-02 12:16:23.540 26626-26687/h5.espressif.esp32 D/BluetoothGatt: discoverServices() - device: 24:6F:28:4C:A2:86 2020-03-02 12:16:23.598 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:16:23.601 26626-26626/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 26626 2020-03-02 12:16:24.042 26626-26687/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=6 latency=0 timeout=500 status=0 2020-03-02 12:16:24.148 26626-27000/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread wait() 2020-03-02 12:16:24.218 26626-26687/h5.espressif.esp32 D/BluetoothGatt: onSearchComplete() = Device=24:6F:28:4C:A2:86 Status=0 2020-03-02 12:16:24.219 26626-26687/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onServicesDiscovered status=0 2020-03-02 12:16:24.220 26626-26687/h5.espressif.esp32 D/BluetoothGatt: setCharacteristicNotification() - uuid: 0000ff02-0000-1000-8000-00805f9b34fb enable: true 2020-03-02 12:16:24.223 26626-26687/h5.espressif.esp32 D/BluetoothGatt: requestConnectionPriority() - params: 1 2020-03-02 12:16:24.224 26626-26687/h5.espressif.esp32 D/[EspActionDeviceConfigure]: Set BlufiClient complete 2020-03-02 12:16:24.224 26626-26687/h5.espressif.esp32 D/BluetoothGatt: configureMTU() - device: 24:6F:28:4C:A2:86 mtu: 20 2020-03-02 12:16:24.300 26626-26687/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=39 latency=0 timeout=500 status=0 2020-03-02 12:16:24.746 26626-26687/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=9 latency=0 timeout=500 status=0 2020-03-02 12:16:44.833 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:16:44.887 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:16:44.895 26626-26626/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 26626 2020-03-02 12:16:53.484 26626-26687/h5.espressif.esp32 D/BluetoothGatt: onClientConnectionState() - status=19 clientIf=12 device=24:6F:28:4C:A2:86 2020-03-02 12:16:53.489 26626-26687/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onConnectionStateChange status=19, newState=0, address=24:6F:28:4C:A2:86 2020-03-02 12:16:53.493 26626-26687/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:16:53.498 26626-26687/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=12 2020-03-02 12:16:53.501 26626-26687/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onGattClose 2020-03-02 12:16:55.501 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:16:55.502 26626-27190/h5.espressif.esp32 I/chatty: uid=10382(h5.espressif.esp32) JavaBridge identical 1 line 2020-03-02 12:16:55.505 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:16:55.505 26626-27190/h5.espressif.esp32 D/BluetoothLeScanner: Start Scan with callback 2020-03-02 12:16:55.509 26626-26687/h5.espressif.esp32 D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=12 mScannerId=0 2020-03-02 12:16:55.516 26626-27000/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread notified 2020-03-02 12:17:00.523 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:17:00.525 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:17:00.525 26626-27190/h5.espressif.esp32 D/BluetoothLeScanner: Stop Scan with callback 2020-03-02 12:17:00.535 26626-26626/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(1350)] "["246f284ca284"]", source: file:///android_asset/web/js/common.js (1350) 2020-03-02 12:17:00.540 26626-27190/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:17:00.545 26626-27190/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=0 2020-03-02 12:17:00.546 26626-27190/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:17:00.550 26626-27190/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=0 2020-03-02 12:17:00.570 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:17:00.572 26626-27190/h5.espressif.esp32 D/BluetoothGatt: connect() - device: 24:6F:28:4C:A2:86, auto: false 2020-03-02 12:17:00.572 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: isSecureModeEnabled 2020-03-02 12:17:00.573 26626-27190/h5.espressif.esp32 D/BluetoothGatt: registerApp() 2020-03-02 12:17:00.573 26626-27190/h5.espressif.esp32 D/BluetoothGatt: registerApp() - UUID=0ce06208-d987-498d-97a9-e8501da02f6a 2020-03-02 12:17:00.576 26626-27190/h5.espressif.esp32 D/EspActionDeviceConfigure2: Start doActionConfigureBlufi2 2020-03-02 12:17:00.576 26626-26662/h5.espressif.esp32 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12 2020-03-02 12:17:01.336 26626-26662/h5.espressif.esp32 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=24:6F:28:4C:A2:86 2020-03-02 12:17:01.342 26626-26662/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onConnectionStateChange status=0, newState=2, address=24:6F:28:4C:A2:86 2020-03-02 12:17:01.344 26626-26662/h5.espressif.esp32 D/BluetoothGatt: discoverServices() - device: 24:6F:28:4C:A2:86 2020-03-02 12:17:01.591 26626-27000/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread wait() 2020-03-02 12:17:01.835 26626-26662/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=6 latency=0 timeout=500 status=0 2020-03-02 12:17:02.003 26626-26662/h5.espressif.esp32 D/BluetoothGatt: onSearchComplete() = Device=24:6F:28:4C:A2:86 Status=0 2020-03-02 12:17:02.004 26626-26662/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onServicesDiscovered status=0 2020-03-02 12:17:02.007 26626-26662/h5.espressif.esp32 D/BluetoothGatt: setCharacteristicNotification() - uuid: 0000ff02-0000-1000-8000-00805f9b34fb enable: true 2020-03-02 12:17:02.015 26626-26662/h5.espressif.esp32 D/BluetoothGatt: requestConnectionPriority() - params: 1 2020-03-02 12:17:02.018 26626-26662/h5.espressif.esp32 D/[EspActionDeviceConfigure]: Set BlufiClient complete 2020-03-02 12:17:02.018 26626-26662/h5.espressif.esp32 D/BluetoothGatt: configureMTU() - device: 24:6F:28:4C:A2:86 mtu: 20 2020-03-02 12:17:02.130 26626-26662/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=39 latency=0 timeout=500 status=0 2020-03-02 12:17:02.624 26626-26662/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=9 latency=0 timeout=500 status=0 2020-03-02 12:17:06.325 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:17:06.413 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:17:06.417 26626-26626/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 26626 2020-03-02 12:17:28.333 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:17:28.371 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:17:28.376 26626-26626/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 26626 2020-03-02 12:17:31.274 26626-26687/h5.espressif.esp32 D/BluetoothGatt: onClientConnectionState() - status=19 clientIf=12 device=24:6F:28:4C:A2:86 2020-03-02 12:17:31.279 26626-26687/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onConnectionStateChange status=19, newState=0, address=24:6F:28:4C:A2:86 2020-03-02 12:17:31.281 26626-26687/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:17:31.292 26626-26687/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=12 2020-03-02 12:17:31.301 26626-26687/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onGattClose 2020-03-02 12:17:33.301 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:17:33.303 26626-27190/h5.espressif.esp32 I/chatty: uid=10382(h5.espressif.esp32) JavaBridge identical 1 line 2020-03-02 12:17:33.304 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:17:33.304 26626-27190/h5.espressif.esp32 D/BluetoothLeScanner: Start Scan with callback 2020-03-02 12:17:33.307 26626-26687/h5.espressif.esp32 D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=12 mScannerId=0 2020-03-02 12:17:33.314 26626-27000/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread notified 2020-03-02 12:17:37.790 26626-26656/h5.espressif.esp32 I/System.out: Hint: use closeThreadResources() to avoid finalizing recycled transactions (initial commit count: 0). 2020-03-02 12:17:37.790 26626-26656/h5.espressif.esp32 W/Box: Skipping low-level close for read-only cursor (non-creator thread '') 2020-03-02 12:17:37.790 26626-26656/h5.espressif.esp32 W/Box: Destroyed recycled transaction from non-owner thread '' 2020-03-02 12:17:38.324 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:17:38.325 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:17:38.325 26626-27190/h5.espressif.esp32 D/BluetoothLeScanner: Stop Scan with callback 2020-03-02 12:17:38.341 26626-26626/h5.espressif.esp32 I/chromium: [INFO:CONSOLE(1350)] "["246f284ca284"]", source: file:///android_asset/web/js/common.js (1350) 2020-03-02 12:17:38.342 26626-27190/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:17:38.353 26626-27190/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=0 2020-03-02 12:17:38.354 26626-27190/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:17:38.358 26626-27190/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=0 2020-03-02 12:17:38.374 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: STATE_ON 2020-03-02 12:17:38.377 26626-27190/h5.espressif.esp32 D/BluetoothGatt: connect() - device: 24:6F:28:4C:A2:86, auto: false 2020-03-02 12:17:38.377 26626-27190/h5.espressif.esp32 D/BluetoothAdapter: isSecureModeEnabled 2020-03-02 12:17:38.377 26626-27190/h5.espressif.esp32 D/BluetoothGatt: registerApp() 2020-03-02 12:17:38.378 26626-27190/h5.espressif.esp32 D/BluetoothGatt: registerApp() - UUID=3a207a08-8dc3-479c-aba9-12529156029e 2020-03-02 12:17:38.380 26626-27190/h5.espressif.esp32 D/EspActionDeviceConfigure2: Start doActionConfigureBlufi2 2020-03-02 12:17:38.382 26626-27809/h5.espressif.esp32 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=12 2020-03-02 12:17:39.384 26626-27000/h5.espressif.esp32 D/[MainBleNotifyThread]: MainBleNotifyThread wait() 2020-03-02 12:17:39.541 26626-27809/h5.espressif.esp32 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=12 device=24:6F:28:4C:A2:86 2020-03-02 12:17:39.547 26626-27809/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onConnectionStateChange status=0, newState=2, address=24:6F:28:4C:A2:86 2020-03-02 12:17:39.550 26626-27809/h5.espressif.esp32 D/BluetoothGatt: discoverServices() - device: 24:6F:28:4C:A2:86 2020-03-02 12:17:40.020 26626-27809/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=6 latency=0 timeout=500 status=0 2020-03-02 12:17:40.189 26626-27809/h5.espressif.esp32 D/BluetoothGatt: onSearchComplete() = Device=24:6F:28:4C:A2:86 Status=0 2020-03-02 12:17:40.190 26626-27809/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onServicesDiscovered status=0 2020-03-02 12:17:40.192 26626-27809/h5.espressif.esp32 D/BluetoothGatt: setCharacteristicNotification() - uuid: 0000ff02-0000-1000-8000-00805f9b34fb enable: true 2020-03-02 12:17:40.196 26626-27809/h5.espressif.esp32 D/BluetoothGatt: requestConnectionPriority() - params: 1 2020-03-02 12:17:40.198 26626-27809/h5.espressif.esp32 D/[EspActionDeviceConfigure]: Set BlufiClient complete 2020-03-02 12:17:40.198 26626-27809/h5.espressif.esp32 D/BluetoothGatt: configureMTU() - device: 24:6F:28:4C:A2:86 mtu: 20 2020-03-02 12:17:40.305 26626-27809/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=39 latency=0 timeout=500 status=0 2020-03-02 12:17:40.753 26626-27809/h5.espressif.esp32 D/BluetoothGatt: onConnectionUpdated() - Device=24:6F:28:4C:A2:86 interval=9 latency=0 timeout=500 status=0 2020-03-02 12:17:49.899 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:17:49.945 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:17:49.948 26626-26626/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 26626 2020-03-02 12:18:09.505 26626-26659/h5.espressif.esp32 D/BluetoothGatt: onClientConnectionState() - status=19 clientIf=12 device=24:6F:28:4C:A2:86 2020-03-02 12:18:09.507 26626-26659/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onConnectionStateChange status=19, newState=0, address=24:6F:28:4C:A2:86 2020-03-02 12:18:09.508 26626-26659/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:18:09.510 26626-26659/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=12 2020-03-02 12:18:09.524 26626-27190/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:18:09.529 26626-26659/h5.espressif.esp32 D/[EspActionDeviceConfigure]: onGattClose 2020-03-02 12:18:09.540 26626-27190/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=0 2020-03-02 12:18:09.540 26626-27190/h5.espressif.esp32 D/BluetoothGatt: close() 2020-03-02 12:18:09.545 26626-27190/h5.espressif.esp32 D/BluetoothGatt: unregisterApp() - mClientIf=0 2020-03-02 12:18:11.455 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:18:11.485 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:18:11.490 26626-26626/h5.espressif.esp32 D/InputMethodManager: HSIFW - flag : 0 Pid : 26626 2020-03-02 12:18:33.180 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:18:33.603 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1 2020-03-02 12:18:50.268 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 0 2020-03-02 12:18:50.357 26626-26626/h5.espressif.esp32 D/ViewRootImpl@abff476[EspWebActivity]: ViewPostIme pointer 1

EspressifApp commented 4 years ago

Try to modify the class EspActionDeviceConfigure Change

@Override
protected void onBlufiClientSetComplete() {
    mLog.d("Set BlufiClient complete");
    boolean setMtu = blufi.getBluetoothGatt().requestMtu(DEFAULT_MTU_LENGTH);
    if (!setMtu) {
        blufi.getBlufiClient().negotiateSecurity();
    }
}

to

protected void onBlufiClientSetComplete() {
    mLog.d("Set BlufiClient complete");
    blufi.getBlufiClient().negotiateSecurity();
}

Reset the device and reboot your phone Bluetooth, than try again.

chamithDu commented 4 years ago

with this change or without this ?

In interface IEspActionDeviceBlufi

int DEFAULT_MTU_LENGTH = 128; Change 128 to 20

XuXiangJun commented 4 years ago

The constant DEFAULT_MTU_LENGTH is only used here,

boolean setMtu = blufi.getBluetoothGatt().requestMtu(DEFAULT_MTU_LENGTH);

So DEFAULT_MTU_LENGTH is not used if you modify the function onBlufiClientSetComplete()

XuXiangJun commented 4 years ago

By the way, what device application has run on your Esp32 module?

chamithDu commented 4 years ago

cheers it is Working now Thank you :) , Is it effect to the other device (in Negative way ) ? We are using your sensor module

XuXiangJun commented 4 years ago

It should be Samsung's bug. We found after we calling BluetoothGatt.requestMTU on Samsung's Android 10, the bug will occur if we send data which size is greater than 20, or the device notify data to APP. And we upgrade our S10e's system last week, we found the bug has be fixed.

chamithDu commented 4 years ago

yes, it should be Samsung's bug thank you for your quick support :) I'll close this issue now