This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Device disconnected in android app after 30 seconds

Hi,

I have a problem when running 51822 with Nrf toolbox on android 4.3 Samsung S4. The problem is that the BluetoothGattServer disconnect itself after 30 seconds. The following is the log from android.

01-10 17:22:10.542: D/BluetoothGatt(6797): onCharacteristicRead() - Device=D3:81:97:C5:E1:3B UUID=00002a19-0000-1000-8000-00805f9b34fb Status=0 01-10 17:22:39.237: D/BluetoothGattServer(6797): onServerConnectionState() - status=0 serverIf=5 device=D3:81:97:C5:E1:3B 01-10 17:22:39.242: D/ProximityManager(6797): [Proximity Server] onConnectionStateChange Smart Gear status: 0 new state: 0 01-10 17:22:39.242: D/BluetoothGatt(6797): onClientConnectionState() - status=0 clientIf=6 device=D3:81:97:C5:E1:3B 01-10 17:22:39.242: D/ProximityManager(6797): Device disconnected 01-10 17:22:39.242: D/ProximityManager(6797): playNotification 01-10 17:22:39.302: W/ProximityActivity(6797): Linkloss occur

The following is the steps to reproduce the problem.

  1. Start 51822
  2. Open nRF Toobox on android.
  3. Press Proximity.
  4. Press Connect and choose the device. After 30 seconds. A dialog prompt xxx is getting away!

Do you think from 51822 we need to keep set data to the android to tell it we are still alive? Thanks.

Paul

Parents
  • There is no need to send nonsense data to keep a link with the S110, the link will be kept automatically by the S110.

    When you see problems like this it's useful to look at the reason for the disconnect. You can get this by looking at the .reason field in the ble_gap_evt_disconnected_t event struct on the nRF51. This will usually tell you something about why the disconnect happened.

    Also, it would be helpful if you could get an on-air trace of what happens, using our Sniffer. It is available for download here and can be used with an nRF51822 Evaluation Kit.

Reply
  • There is no need to send nonsense data to keep a link with the S110, the link will be kept automatically by the S110.

    When you see problems like this it's useful to look at the reason for the disconnect. You can get this by looking at the .reason field in the ble_gap_evt_disconnected_t event struct on the nRF51. This will usually tell you something about why the disconnect happened.

    Also, it would be helpful if you could get an on-air trace of what happens, using our Sniffer. It is available for download here and can be used with an nRF51822 Evaluation Kit.

Children
No Data
Related