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

nRF52 Ble Peripheral Example - ble_app_blinky not showing led/button service

Hi I have run a few peripheral examples ok and now move to evaluation of ble_peripheral also.

I'm using this version of the SDK....

If I program the softdevice and then the application hex file into board using the files shown below the led 1 turns on as expected. 

Using rfConnect I can connect to "Nordic Blinky" and the led 2 turns on and led 1 turns off. However in the list of services I see there is not one showing for the Led/Button.

Using the blinky app for Android to connect I get a message indicating the "Device does not have the required services".

I checked the code in sdk_config.h to see if the service was enabled and this looks ok...

Looking at the help for the application at this link http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk%2Fdita%2Fsdk%2Fnrf5_sdk.html

I think I have done things correctly so I am now looking for some ideas/support to move forward please.

Regards MPH

Parents Reply Children
  • Hi Martin

    Can you let me know the version and date string printed on your development kit?
    This should be visible on the square, white sticker. 

    I have an older kit that exhibits the issue, and a newer one that does not. 

    Best regards
    Torbjørn

  • Hi Torbjørn
    I have PCA10040, 1.2.4, 2018.12, 682351679 printed on the white sticker on the dev board chip.
    BR Martin
  • Hi Martin

    That's newer than both my kits, so I guess the old kit theory goes out the window ;)

    Do you have the log enabled while running the example?
    It would be interesting to know if the command is actually received or not. 

    With the log running you should see a message whenever the LED is turned on or off. 

    Best regards
    Torbjørn

  • Don't forget I had the observation that nRF Connect App works. Meaning toggling the LED works every time. So I suspect the nRF Blinky App is at fault somehow.

    BR Martin

  • Hi Martin

    Apparently there is a trick to getting more logging info from the Blinky app. 

    In the BlinkyManager.java file, please add the following function to the BlinkyManager class:

    @Override
    public void log(int level, @NonNull String message) {
    super.log(level, message);
    Log.d("BlinkyManager", message);
    }

    Then you should see log messages when the app sends data to the peripheral, and when the writeCharacteristic callback is triggered, which means the data was successfully sent. 

    The log should look something like this if everything works correctly:

    10-09 11:03:33.038 21893-21893/no.nordicsemi.android.nrfblinky D/BlinkyManager: Turning LED OFF...
    10-09 11:03:33.290 21893-21925/no.nordicsemi.android.nrfblinky D/BlinkyManager: LED OFF
    10-09 11:03:33.928 21893-21893/no.nordicsemi.android.nrfblinky D/BlinkyManager: Turning LED ON...
    10-09 11:03:34.263 21893-21907/no.nordicsemi.android.nrfblinky D/BlinkyManager: LED ON
    10-09 11:03:34.582 21893-21893/no.nordicsemi.android.nrfblinky D/BlinkyManager: Turning LED OFF...
    10-09 11:03:34.849 21893-21907/no.nordicsemi.android.nrfblinky D/BlinkyManager: LED OFF

    Can you give this a try and see if the results are similar?

    Best regards
    Torbjørn

Related