Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF_UART connects to some phones and not others

Hi
I'm using Android Studio 3.2 and github.com/.../Android-nRF-UART
My Samsung SM-G570Y (Android 7.0 API 24) works no problems
but the Samsung SM-G955F (Android 8.0.0, API 26) fails to connect.
the message on the phone says
Device: Connecting
Device: Not Connected
any ideas as to why it is failing?

attached is the Debugger console output, any ideas as to why it is failing?

D/BluetoothAdapter: stopLeScan()
D/BluetoothAdapter: STATE_ON
D/BluetoothAdapter: STATE_ON
scan not started yet
D/ViewRootImpl@dd3f820[MainActivity]: ViewPostIme pointer 0
D/ViewRootImpl@dd3f820[MainActivity]: ViewPostIme pointer 1
D/nRFUART: onPause
D/DeviceListActivity: onCreate
D/DeviceListActivity: populateList
D/BluetoothAdapter: startLeScan(): null
D/BluetoothAdapter: STATE_ON
I/chatty: uid=10430(u0_a430) com.nordicsemi.nrfUARTv2 identical 4 lines
D/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: Start Scan with callback
D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=10 mScannerId=0
D/ViewRootImpl@5e7c7df[DeviceListActivity]: setView = DecorView@8103c2c[DeviceListActivity] TM=true MM=false
D/ViewRootImpl@dd3f820[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0
D/ViewRootImpl@5e7c7df[DeviceListActivity]: dispatchAttachedToWindow
V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0
D/ViewRootImpl@5e7c7df[DeviceListActivity]: Relayout returned: old=[0,0][0,0] new=[160,284][1280,904] result=0x7 surface={valid=true 543887429632} changed=true
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1120x620]-format:1
D/OpenGLRenderer: eglCreateWindowSurface = 0x7eadffcbb0
D/AbsListView: in onLayout changed
D/ViewRootImpl@5e7c7df[DeviceListActivity]: MSG_RESIZED_REPORT: frame=Rect(160, 284 - 1280, 904) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
MSG_WINDOW_FOCUS_CHANGED 1
V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@74736f5 nm : com.nordicsemi.nrfUARTv2 ic=null
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/ViewRootImpl@5e7c7df[DeviceListActivity]: Relayout returned: old=[160,284][1280,904] new=[160,284][1280,993] result=0x21 surface={valid=true 543887429632} changed=false
D/OpenGLRenderer: eglDestroySurface = 0x7eadffcbb0
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1120x709]-format:1
D/OpenGLRenderer: eglCreateWindowSurface = 0x7eadffcbb0
D/AbsListView: in onLayout changed
V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@6214d71 nm : com.nordicsemi.nrfUARTv2 ic=null
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/ViewRootImpl@5e7c7df[DeviceListActivity]: Relayout returned: old=[160,284][1280,993] new=[160,284][1280,1150] result=0x21 surface={valid=true 543887429632} changed=false
D/OpenGLRenderer: eglDestroySurface = 0x7eadffcbb0
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1120x866]-format:1
D/OpenGLRenderer: eglCreateWindowSurface = 0x7eadffcbb0
I/zygote64: Compiler allocated 4MB to compile void android.view.View.<init>(android.content.Context, android.util.AttributeSet, int, int)
D/AbsListView: in onLayout changed
D/ViewRootImpl@5e7c7df[DeviceListActivity]: ViewPostIme pointer 0
D/ViewRootImpl@5e7c7df[DeviceListActivity]: ViewPostIme pointer 1
D/AbsListView: onTouchUp() mTouchMode : 2
D/BluetoothAdapter: stopLeScan()
D/BluetoothAdapter: STATE_ON
I/chatty: uid=10430(u0_a430) com.nordicsemi.nrfUARTv2 identical 2 lines
D/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: Stop Scan with callback
D/BluetoothAdapter: stopLeScan()
D/BluetoothAdapter: STATE_ON
D/BluetoothAdapter: STATE_ON
scan not started yet
D/ViewRootImpl@dd3f820[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1
V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@6744e48 nm : com.nordicsemi.nrfUARTv2 ic=null
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/ViewRootImpl@5e7c7df[DeviceListActivity]: MSG_WINDOW_FOCUS_CHANGED 0
D/nRFUART: ... onActivityResultdevice.address==DF:61:DF:F2:AC:C1mserviceValuecom.nordicsemi.nrfUARTv2.UartService@64ef1d6
D/BluetoothGatt: connect() - device: DF:61:DF:F2:AC:C1, auto: false
D/BluetoothAdapter: isSecureModeEnabled
D/BluetoothGatt: registerApp()
registerApp() - UUID=4999e726-7890-481d-9099-ecfa9654b944
D/UartService: Trying to create a new connection.
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=10
D/nRFUART: onResume
D/OpenGLRenderer: eglDestroySurface = 0x7eadffcbb0
D/ViewRootImpl@5e7c7df[DeviceListActivity]: Relayout returned: old=[160,284][1280,1150] new=[160,284][1280,1150] result=0x5 surface={valid=false 0} changed=true
D/BluetoothAdapter: stopLeScan()
D/BluetoothAdapter: STATE_ON
STATE_ON
scan not started yet
stopLeScan()
D/BluetoothAdapter: STATE_ON
STATE_ON
scan not started yet
D/ViewRootImpl@5e7c7df[DeviceListActivity]: dispatchDetachedFromWindow
D/InputEventReceiver: channel 'd9efc54 com.nordicsemi.nrfUARTv2/com.nordicsemi.nrfUARTv2.DeviceListActivity (client)' ~ Disposing input event receiver.
channel 'd9efc54 com.nordicsemi.nrfUARTv2/com.nordicsemi.nrfUARTv2.DeviceListActivity (client)' ~NativeInputEventReceiver.
D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=10 device=DF:61:DF:F2:AC:C1
I/UartService: Disconnected from GATT server.
D/nRFUART: UART_DISCONNECT_MSG
W/UartService: mBluetoothGatt closed
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=10
D/BluetoothAdapter: stopLeScan()
D/BluetoothAdapter: STATE_ON
D/BluetoothAdapter: STATE_ON
scan not started yet

Parents
  • Hi Norman, I had a similar problem with Android 8.0.0, when I try to scan it does not return any devices. In my case was because i was monitoring for beacons at the same time. Once I stopped the beacon monitor the scan begin to work. Now I'm trying to figure out how to scan for devices and monitor beacons at the same time. This works fine on Android 6 and 7.

Reply
  • Hi Norman, I had a similar problem with Android 8.0.0, when I try to scan it does not return any devices. In my case was because i was monitoring for beacons at the same time. Once I stopped the beacon monitor the scan begin to work. Now I'm trying to figure out how to scan for devices and monitor beacons at the same time. This works fine on Android 6 and 7.

Children
No Data
Related