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

The nRF Toolbox cannot find services when I changed the application of PCA10028.

My android version is the Kitkat.

The nRF Toolbox cannot find services when I changed the application of PCA10028 for example from ble_app_hts to ble_app_hrs.

The message below appeared.

image description

The result of observing with the Android message is that the android recognize previous services although the PCA10028 sent the information of changed services.

After rebooting the smartphone, it will work normally.

What is the problem?

Parents
  • Hi this is the cashing issue. Android always cashes services. The service says, that on non-bonded devices, if Service Changed characteristic is present, the services should not be kept, but it is much more common to reconnect to a non-bonded device having the same services as it had before, then connecting to it with new services (for example during developement or dfu) so they decided to store them in the cache despite that. That's why, every time you connect to your DK which has a different fw flashed, Android 'sees' the old services. Please, read more here: devzone.nordicsemi.com/.../

    This is such by design. If you want to clear the cache in you app, you may do what the DFU lib is doing here: github.com/.../DfuBaseService.java

    If you just want to try with nRF Toolbox, before you connect from the new profile, you have to open nRF Connect app, connect to your device, select Menu->Refresh services. It will clear the cache using the above method and do a new service discovery. Then you may disconnect, open nRF Toolbox (the new profile) and try again. This time the new services will be discovered.

    BR, Aleksander

Reply
  • Hi this is the cashing issue. Android always cashes services. The service says, that on non-bonded devices, if Service Changed characteristic is present, the services should not be kept, but it is much more common to reconnect to a non-bonded device having the same services as it had before, then connecting to it with new services (for example during developement or dfu) so they decided to store them in the cache despite that. That's why, every time you connect to your DK which has a different fw flashed, Android 'sees' the old services. Please, read more here: devzone.nordicsemi.com/.../

    This is such by design. If you want to clear the cache in you app, you may do what the DFU lib is doing here: github.com/.../DfuBaseService.java

    If you just want to try with nRF Toolbox, before you connect from the new profile, you have to open nRF Connect app, connect to your device, select Menu->Refresh services. It will clear the cache using the above method and do a new service discovery. Then you may disconnect, open nRF Toolbox (the new profile) and try again. This time the new services will be discovered.

    BR, Aleksander

Children
Related