Disconnection problems with some Android devices like Samsung s22 Ultra
joanmarcs opened this issue · comments
Prerequisites
- I checked the documentation and FAQ without finding a solution
- I checked to make sure that this issue has not already been filed
Expected Behavior
Maintain BLE connection in using any Android device model.
Current Behavior
In some advanced Android devices (Samsung s22 ultra, One plus, ...), the BLE disconnects after few seconds with this error:
LOG error valuesMonitor: {"message":"Device 0C:8B:95:40:14:A2 was disconnected","errorCode":201,"attErrorCode":34,"iosErrorCode":null,"androidErrorCode":null,"reason":"Disconnected from MAC='XX:XX:XX:XX:XX:XX' with status 34 (GATT_CONN_LMP_TIMEOUT)","name":"BleError"} WARN Possible Unhandled Promise Rejection (id: 0): BleError: Device 0C:8B:95:40:14:A2 is not connected BleError: Device 0C:8B:95:40:14:A2 is not connected at construct (native) at Wrapper (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:20215:64) at construct (native) at _createSuperInternal (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:120947:322) at call (native) at BleError (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:120955:26) at parseBleError (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:120985:30) at ?anon_0_ (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:121207:82) at throw (native) at asyncGeneratorStep (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:21237:26) at _throw (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:21259:29) at tryCallOne (/root/react-native/ReactAndroid/hermes-engine/.cxx/Release/3f4v354d/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:53:16) at anonymous (/root/react-native/ReactAndroid/hermes-engine/.cxx/Release/3f4v354d/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:139:27) at apply (native) at anonymous (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:26778:26) at _callTimer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:26697:17) at _callReactNativeMicrotasksPass (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:26727:17) at callReactNativeMicrotasks (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:26890:44) at __callReactNativeMicrotasks (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:5066:46) at anonymous (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:4878:45) at __guard (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:5050:15) at flushedQueue (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:4877:21) at invokeCallbackAndReturnFlushedQueue (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.Simon.EVElectron&modulesOnly=false&runModule=true:4871:33)
Anybody can help me to understand why is this happening only in some Android models?
Library version
3.1.2
Device
Samsung s22 Ultra, One plus
Environment info
yarn run v1.22.19
$ /Users/joanmarc/Development/Simon/ReacPlugAndDrive/node_modules/.bin/react-native info
info Fetching system and libraries information...
System:
OS: macOS 14.0
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 13.47 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 20.0.0 - /var/folders/75/zvbw4m9s4qnd44fddqzsjtrh0000gp/T/yarn--1708613189217-0.6316461346671927/node
Yarn: 1.22.19 - /var/folders/75/zvbw4m9s4qnd44fddqzsjtrh0000gp/T/yarn--1708613189217-0.6316461346671927/yarn
npm: 9.6.5 - ~/Development/Simon/ReacPlugAndDrive/node_modules/.bin/npm
Watchman: 2023.04.24.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.12.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
Android SDK:
API Levels: 25, 27, 28, 29, 30, 31, 32, 33, 34
Build Tools: 29.0.3, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 33.0.0, 33.0.1, 33.0.2, 34.0.0, 34.0.0, 34.0.0
Android NDK: 22.0.6917172-beta1
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11255304
Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
Languages:
Java: 19.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.6 => 0.70.6
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
1 - Mantain BLE connection with a device.
Formatted code sample or link to a repository
-
Relevant log output
-
Additional information
No response
Duplicate of #1157