No peripheral connection after disconnect with Android App Nordic Uart Service until mac-address of smartphone changes

No connection after disconnect with Android App Nordic Uart Service until mac-address of smartphone changes

Multilink multirole software developed in SES studio.

Other smartphone can connect without reset of NRF52 or I should wait until first phone changes its mac-address.

No feedback (from any handle) from NRF52... just no connection

LOG from Android studio

2021-12-16 20:54:23.372 11320-11353/com.sicameiot.PingPong D/Surface: Surface::connect(this=0x72766ee000,api=1)
2021-12-16 20:54:23.373 11320-11353/com.sicameiot.PingPong D/Surface: Surface::setBufferCount(this=0x72766ee000,bufferCount=3)
2021-12-16 20:54:24.429 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: stopLeScan()
2021-12-16 20:54:24.432 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: scan not started yet
2021-12-16 20:54:25.306 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: stopLeScan()
2021-12-16 20:54:25.309 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: isLeEnabled(): ON
2021-12-16 20:54:25.325 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: stopLeScan()
2021-12-16 20:54:25.327 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: scan not started yet
2021-12-16 20:54:25.348 11320-11320/com.sicameiot.PingPong D/DM-30: ... onActivityResultdevice.address==E3:F6:F8:7B:76:E1mserviceValuecom.sicameiot.PingPong.UartService@7c66d8e
2021-12-16 20:54:25.350 11320-11320/com.sicameiot.PingPong D/BluetoothGatt: connect() - device: E3:F6:F8:7B:76:E1, auto: false
2021-12-16 20:54:25.350 11320-11320/com.sicameiot.PingPong D/BluetoothGatt: registerApp()
2021-12-16 20:54:25.350 11320-11320/com.sicameiot.PingPong D/BluetoothGatt: registerApp() - UUID=1f7942b9-e69c-4196-ba66-a35a71c70388
2021-12-16 20:54:25.353 11320-11320/com.sicameiot.PingPong D/UartService: Trying to create a new connection.
2021-12-16 20:54:25.354 11320-11320/com.sicameiot.PingPong D/DM-30: onResume
2021-12-16 20:54:25.354 11320-11338/com.sicameiot.PingPong D/BluetoothGatt: onClientRegistered() - status=0 clientIf=7
2021-12-16 20:54:25.356 11320-11320/com.sicameiot.PingPong V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@b17118d, this = DecorView@399f42[MainActivity]
2021-12-16 20:54:25.380 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: stopLeScan()
2021-12-16 20:54:25.382 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: scan not started yet
2021-12-16 20:54:25.384 11320-11320/com.sicameiot.PingPong V/PhoneWindow: DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@29581d1, this = DecorView@6a5bb6a[DeviceListActivity_master]
2021-12-16 20:54:25.385 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: stopLeScan()
2021-12-16 20:54:25.386 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: scan not started yet
2021-12-16 20:54:25.390 11320-11353/com.sicameiot.PingPong D/Surface: Surface::disconnect(this=0x72766ee000,api=1)
2021-12-16 20:54:25.392 11320-11320/com.sicameiot.PingPong D/View: [Warning] assignParent to null: this = DecorView@6a5bb6a[DeviceListActivity_master]
2021-12-16 20:54:25.393 11320-11320/com.sicameiot.PingPong I/InputTransport: Destroy ARC handle: 0x728380a840
2021-12-16 20:54:25.883 11320-11338/com.sicameiot.PingPong D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=7 device=E3:F6:F8:7B:76:E1
2021-12-16 20:54:25.884 11320-11338/com.sicameiot.PingPong I/UartService: Disconnected from GATT server.
2021-12-16 20:54:25.886 11320-11320/com.sicameiot.PingPong D/DM-30: UART_DISCONNECT_MSG
2021-12-16 20:54:25.886 11320-11320/com.sicameiot.PingPong W/UartService: mBluetoothGatt closed
2021-12-16 20:54:25.886 11320-11320/com.sicameiot.PingPong D/BluetoothGatt: close()
2021-12-16 20:54:25.886 11320-11320/com.sicameiot.PingPong D/BluetoothGatt: unregisterApp() - mClientIf=7
2021-12-16 20:54:33.119 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: stopLeScan()
2021-12-16 20:54:33.122 11320-11320/com.sicameiot.PingPong D/BluetoothAdapter: scan not started yet

Parents
  • Okay, so when two central devices (nRF52833 and a phone) tries to connect to your nRF52840 as a peripheral, is the only way you're able to reproduce this issue? What have you set CONFIG_BT_MAX_CONN to in your nRF52 application? This config sets the maximum number of simultaneous connections supported in an nRFConnect SDK application.

    I noticed you say that you use the Android Nordic UART Service app. Please note that the nRF UART app is rather old and outdated at this point, and I would recommend using the nRFConnect for Android application instead to connect and communicate with nRF52 devices. It has a better UI and a few bug fixes that might remedy these errors you're seeing.

    Best regards,

    Simon

Reply
  • Okay, so when two central devices (nRF52833 and a phone) tries to connect to your nRF52840 as a peripheral, is the only way you're able to reproduce this issue? What have you set CONFIG_BT_MAX_CONN to in your nRF52 application? This config sets the maximum number of simultaneous connections supported in an nRFConnect SDK application.

    I noticed you say that you use the Android Nordic UART Service app. Please note that the nRF UART app is rather old and outdated at this point, and I would recommend using the nRFConnect for Android application instead to connect and communicate with nRF52 devices. It has a better UI and a few bug fixes that might remedy these errors you're seeing.

    Best regards,

    Simon

Children
Related