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 Reply Children
  • I use Blackview4900 and Xiaomi 9.

    Anyway.

    Sequence...

    nrf52840 connect (central) to other nrf52833.

    Android1 connect to nrf52840 (peripheral).

    nrf52833 disconnect (manualy) from nrf52840

    Android1 disconnect from nrf52840

    Then if nrf52833 connect (central) to nrf52840 - Android1 can not connect to nrf52840 (until it mac address change. it have to pass 5 - 10 minute)without any calback.(error 0x85)

    And Android2 can connect to nrf52840.(any Android. I tried 5 different phones)

    But when I disconnect nrf52833 - then Andorid1 can connect.

    Sorry. It is hard to explain. But I have lost a lot of time and cannot fix it

    Zephyr based project.

Related