No Connecting After going away

Hi everyone,

I implement nrf5_SDK_17.0.2 ble_app_uart example and I use an android app like nRF_Connect to receive the uart data on my phone.

My problem is that when I go away from the place I cannot connect again after coming back. So I need to reset my nrf52840 DK first, and then I can connect my phone to my nrf52840 DK.

What is the trick?

Thanks.

  • Hi Karl,

    I try to show RSSI in my app, but after connecting the RSSI is always 0.

    This is my code:

    BleManager.getInstance().connect(mac_id, new BleGattCallback() {
                @Override
                public void onStartConnect() {
                    
                }
    
                @Override
                public void onConnectFail(BleDevice bleDevice, BleException exception) {
    
                }
    
                @Override
                public void onConnectSuccess(BleDevice bleDevice, BluetoothGatt gatt, int status) {
                    Toast.makeText(getContext(), String.valueOf(bleDevice.getRssi()), Toast.LENGTH_LONG).show();
                }
    
                @Override
                public void onDisConnected(boolean isActiveDisConnected, BleDevice device, BluetoothGatt gatt, int status) {
    
                }
            })

    What do you think?

  • rezaei said:
    I try to show RSSI in my app, but after connecting the RSSI is always 0.

    If I recall correctly you will have to enable RSSI readings before using the get function, if you have not done so already. Also, RSSI is in relation to each packet that the device receives.

    Please keep in mind my earlier comment about RSSI being a poorly accurate measurement for distance. You can find multiple tickets here on the forum discussing this, and how other factors greatly contribute to the fluctuations in RSSI, but it mainly adds up to that the RSSI may be used to categorize the device as either near, far, or gone.

    Best regards,
    Karl

Related