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
  • Hi Martin

    It's quite peculiar that the example advertises and connects, but doesn't show the normal services. 

    Which services do you see when you connect through nRF Connect?

    Are you using nRF Connect for Android, iOS or desktop?

    Can you let me know which model and version of the kit you have, as printed on the white sticker?

    How are you flashing the kit? 
    Are you using nrfjprog, or one of the supported IDE's?

    Best regards
    Torbjørn

  • Hi Torbjørn

    I see these services using nRF Connect for Android..

    Generic Access, Generic Attribute, Blood pressure, Battery Service, Device Information.

    White sticker shows..

    PCA10040

    1.2.4

    2018.12

    682351679

    Flashing the kit by dragging and dropping the hex files onto the on-board drive.

    Also have Segger IDE installed and can build & program the project ok from there also.

    BR MPH

  • Not sure about the filter but I set up this in logcat...

    and then the debug log was abbreviated to this...

    10-01 17:12:03.074 2997-3031/? D/ViewRootImpl@64340e2[nrfblinky]: setView = DecorView@d7da730[nrfblinky] TM=true MM=false
    10-01 17:12:03.078 2997-3031/? D/ViewRootImpl@64340e2[nrfblinky]: dispatchAttachedToWindow
    10-01 17:12:03.099 2997-3031/? D/ViewRootImpl@64340e2[nrfblinky]: Relayout returned: old=[0,0][0,0] new=[32,775][1047,1217] result=0x7 surface={valid=true 543709986816} changed=true
    10-01 17:12:03.101 2997-3031/? D/ViewRootImpl@64340e2[nrfblinky]: MSG_WINDOW_FOCUS_CHANGED 1
    10-01 17:12:03.127 2997-3031/? D/ViewRootImpl@64340e2[nrfblinky]: MSG_RESIZED_REPORT: frame=Rect(32, 775 - 1047, 1217) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
    10-01 17:12:03.152 2997-3031/? D/ViewRootImpl@64340e2[nrfblinky]: ViewPostIme pointer 0
    10-01 17:12:03.161 2997-3031/? D/ViewRootImpl@64340e2[nrfblinky]: dispatchDetachedFromWindow
    10-01 17:12:03.190 2997-3031/? W/ViewRootImpl@64340e2[nrfblinky]: Dropping event due to root view being removed:
    10-01 17:12:03.190 2997-3031/? E/ViewRootImpl@64340e2[nrfblinky]: mStopped=false mHasWindowFocus=true mPausedForTransition=false
    10-01 17:12:05.124 2997-3031/? D/ViewRootImpl@6248433[nrfblinky]: setView = DecorView@ea2fd69[nrfblinky] TM=true MM=false
    10-01 17:12:05.128 2997-3031/? D/ViewRootImpl@6248433[nrfblinky]: dispatchAttachedToWindow
    10-01 17:12:05.145 2997-3031/? D/ViewRootImpl@6248433[nrfblinky]: Relayout returned: old=[0,0][0,0] new=[32,775][1047,1217] result=0x7 surface={valid=true 543710330880} changed=true
    10-01 17:12:05.149 2997-3031/? D/ViewRootImpl@6248433[nrfblinky]: MSG_WINDOW_FOCUS_CHANGED 1
    10-01 17:12:05.179 2997-3031/? D/ViewRootImpl@6248433[nrfblinky]: MSG_RESIZED_REPORT: frame=Rect(32, 775 - 1047, 1217) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
    10-01 17:12:05.330 2997-3031/? D/ViewRootImpl@6248433[nrfblinky]: ViewPostIme pointer 0
    10-01 17:12:05.344 2997-3031/? D/ViewRootImpl@6248433[nrfblinky]: dispatchDetachedFromWindow
    10-01 17:12:05.368 2997-3031/? W/ViewRootImpl@6248433[nrfblinky]: Dropping event due to root view being removed:
    10-01 17:12:05.368 2997-3031/? E/ViewRootImpl@6248433[nrfblinky]: mStopped=false mHasWindowFocus=true mPausedForTransition=false
    10-01 17:12:07.820 2997-3031/? D/ViewRootImpl@2625381[nrfblinky]: setView = DecorView@1d8ee14[nrfblinky] TM=true MM=false
    10-01 17:12:07.839 2997-3031/? D/ViewRootImpl@2625381[nrfblinky]: dispatchAttachedToWindow
    10-01 17:12:07.906 2997-3031/? D/ViewRootImpl@2625381[nrfblinky]: Relayout returned: old=[0,0][0,0] new=[32,775][1047,1217] result=0x27 surface={valid=true 543710629888} changed=true
    10-01 17:12:07.912 2997-3031/? D/ViewRootImpl@2625381[nrfblinky]: MSG_WINDOW_FOCUS_CHANGED 1
    10-01 17:12:07.940 2997-3031/? D/ViewRootImpl@2625381[nrfblinky]: MSG_RESIZED_REPORT: frame=Rect(32, 775 - 1047, 1217) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
    10-01 17:12:08.803 2997-3031/? D/ViewRootImpl@2625381[nrfblinky]: ViewPostIme pointer 0
    10-01 17:12:08.956 2997-3031/? D/ViewRootImpl@2625381[nrfblinky]: ViewPostIme pointer 1
    10-01 17:12:08.963 2997-3031/? D/ViewRootImpl@2625381[nrfblinky]: dispatchDetachedFromWindow
    10-01 17:12:49.571 2997-3089/? D/ViewRootImpl@b3a2ec4[nrfblinky]: setView = DecorView@ee32ce2[nrfblinky] TM=true MM=false
    10-01 17:12:49.572 2997-3089/? D/ViewRootImpl@b3a2ec4[nrfblinky]: dispatchAttachedToWindow
    10-01 17:12:49.584 2997-3089/? D/ViewRootImpl@b3a2ec4[nrfblinky]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 543383703552} changed=true
    10-01 17:12:49.586 2997-3089/? D/ViewRootImpl@b3a2ec4[nrfblinky]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
    10-01 17:12:49.769 2997-3031/? D/ViewRootImpl@f97cfe4[nrfblinky]: setView = DecorView@1b34049[nrfblinky] TM=true MM=false
    10-01 17:12:49.772 2997-3031/? D/ViewRootImpl@f97cfe4[nrfblinky]: dispatchAttachedToWindow
    10-01 17:12:49.799 2997-3031/? D/ViewRootImpl@f97cfe4[nrfblinky]: Relayout returned: old=[0,0][0,0] new=[32,624][1047,1368] result=0x7 surface={valid=true 543711801344} changed=true
    10-01 17:12:49.801 2997-3031/? D/ViewRootImpl@f97cfe4[nrfblinky]: MSG_WINDOW_FOCUS_CHANGED 1
    10-01 17:12:49.889 2997-3031/? D/ViewRootImpl@f97cfe4[nrfblinky]: MSG_RESIZED_REPORT: frame=Rect(32, 624 - 1047, 1368) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
    10-01 17:12:52.044 2997-3031/? D/ViewRootImpl@f97cfe4[nrfblinky]: ViewPostIme pointer 0
    10-01 17:12:52.109 2997-3031/? D/ViewRootImpl@f97cfe4[nrfblinky]: dispatchDetachedFromWindow
    10-01 17:12:52.306 2997-3031/? D/ViewRootImpl@d6fcd[nrfblinky]: setView = DecorView@85a4393[nrfblinky] TM=true MM=false
    10-01 17:12:52.308 2997-3031/? D/ViewRootImpl@d6fcd[nrfblinky]: dispatchAttachedToWindow
    10-01 17:12:52.317 2997-3031/? D/ViewRootImpl@d6fcd[nrfblinky]: Relayout returned: old=[0,0][0,0] new=[32,775][1047,1217] result=0x7 surface={valid=true 543304855552} changed=true
    10-01 17:12:52.319 2997-3031/? D/ViewRootImpl@d6fcd[nrfblinky]: MSG_WINDOW_FOCUS_CHANGED 1
    10-01 17:12:52.334 2997-3031/? D/ViewRootImpl@d6fcd[nrfblinky]: MSG_RESIZED_REPORT: frame=Rect(32, 775 - 1047, 1217) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
    10-01 17:12:53.143 2997-3089/? D/ViewRootImpl@b3a2ec4[nrfblinky]: dispatchDetachedFromWindow
    10-01 17:12:54.930 2997-3031/? D/ViewRootImpl@d6fcd[nrfblinky]: ViewPostIme pointer 0
    10-01 17:12:55.046 2997-3031/? D/ViewRootImpl@d6fcd[nrfblinky]: ViewPostIme pointer 1
    10-01 17:12:55.056 2997-3031/? D/ViewRootImpl@d6fcd[nrfblinky]: dispatchDetachedFromWindow

    Might need to advise on the filter, thanks.

    BR Martin

  • Hi Martin

    Please have a look at the attached screenshot. I simply add nrfblinky in the search field in logcat, setting up a custom filter should not be necessary. 

    Then I can focus on the app related messages easily, and the log doesn't get overflowed with system messages. 

    An interesting observation is that I can reproduce the problem with the LED characteristic. Changing the LED in the app doesn't appear to have any effect on the kit. I need some more time to look into this and discuss it with the developers. 

    To summarize your issues, if you try to use the debugger in Android Studio the app won't even start?

    If you don't use the debugger it works, but you are unable to control the LED?

    Best regards
    Torbjørn

  • Hi Torbjørn

    Quick response = Yes your summary is correct in the last mail.

    Thanks

    BR Martin

  • Hi Torbjørn

    Here is a debug log I just recorded in the attached txt file.

    I used Notepad++ to highlight and mark all nrfblinky fyi.

    BR Martinblinkycrash.txt

  • Hi Martin

    A comment from the app developer was to disable instant run in the Android Studio settings. Can you try that and see if debugging works?

    Regarding the app he suggested trying the develop branch rather than the master branch, to see if it fixes the issue with the missing LED update:
    https://github.com/NordicSemiconductor/Android-nRF-Blinky/tree/develop

    Please give it a go and see if it helps. If it doesn't I will do more testing on my end to get to the bottom of the issue. Unfortunately I won't be able to continue this until next week, as I am going on a business trip for the next couple of days. 

    Best regards
    Torbjørn

Reply Children
Related