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

Bluetooth low energy Services, a beginner's tutorial

I am just starting with the Nordic DK52. I am following the beginners tutorial for a custom service. But I am encountering 2 problems:

1) In step 4 it displays a RTT debug output. But I don't see the GAP_EVT output's, only the following output:
Executing our_service_init().
Service UUID: 0xABCD
Service UUID type: 0x02
Service handle: 0x000E

This is because lines were added for this output in the code. However for the gap_evt output lines, I can't see anything in the code for it, nor does it show any output in the RTT output.

For this tutorial I am using SDK nRF5_SDK_15.0.0_a53641a.

2) After I enter the code in step 5 and 6, I still see "unkown service" when I discover the services in NrfConnect (android app V4.24.1).

I also don't see the output as shown in the image

I followed all the steps correctly and inserted the code as mentioned. 

  • Hello,

    This is because lines were added for this output in the code. However for the gap_evt output lines, I can't see anything in the code for it, nor does it show any output in the RTT output.

    For this tutorial I am using SDK nRF5_SDK_15.0.0_a53641a.

    Are you using the example from the SDK, or the modified example provided in the tutorial? Have you made any modifications to the code you are using?
    You could also see this ticket, regarding the same issue.

    I also don't see the output as shown in the image

    What do you see instead? What is different in your output, from the expected result?

    Best regards,
    Karl

  • Are you using the example from the SDK, or the modified example provided in the tutorial? Have you made any modifications to the code you are using?
    You could also see this ticket, regarding the same issue.

    I am using the modified example from the tutorial. That ticket you mention shows the same problem. I searched in the git repo of that tutorial that the sdk 11 and sdk 9 example does have these lines included in a seperate file msgs.c , but there is no such file included in the sdk15 example. It's a little confusing because it notes that the tutorial is written for sdk 15. But anyway, this problem is solved, thanks.

    What do you see instead? What is different in your output, from the expected result?

    I see this in my android app:

    I don't see any services mentioned, not like in the image from the tutorial.

  • Hello,

    Sorry for my late reply.

    Gueston said:
    It's a little confusing because it notes that the tutorial is written for sdk 15. But anyway, this problem is solved, thanks.

    I agree. I will talk to Martin about this, and see if he could include a mention of this, or update the tutorial to match the expectations of the output images provided.

    Gueston said:
    I don't see any services mentioned, not like in the image from the tutorial.

    The reason for this might be that the tutorial image is captured from the nRF Connect Desktop Application, and not the mobile version - this causes it to look a little bit different, but it still displays the same information.
    You can see the services 128-bit UUIDs in the last line of the image you included.
    Is this what you were looking for?

    Best regards,
    Karl 

  • Hi Karl,

    Thanks for your answer. Everything is clear now.

Related