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

new service seems to work, but not visible at on phone

Hi,

I'm creating a new service based on the heart rate monitor example, but I'm having some trouble with it.

I implemented my own service, keeping it as similar to the battery service as possible. The goal was just to monitor the state of a button. Everything compiles and runs, and all of the original services from the heart rate monitor example still work. Unfortunately, I don't see my new service on the client (I'm connecting using an Android smartphone).

The service init and characteristic add functions get called properly, and they return NRF_SUCCESS.

I'm attaching a file that shows most of how I'm doing my service init, char add, and the service initalization in main.c.

Thanks for any help you can give.

button_state_service.c

Parents
  • Hi there,

    I implemented my own service, keeping it as similar to the battery service as possible.

    I took a quick look at the code and it seems fine, I see that you are using a 128-bit UUID for your own service, which is the correct way to do this.

    Unfortunately, I don't see my new service on the client (I'm connecting using an Android smartphone).

    Could it be that your Android client ignores services that are not known to it, and more specifically 128-bit UUID services? Is the Android client program built-in to the platform or have you written it yourself?

    Regards,

    Carles

Reply
  • Hi there,

    I implemented my own service, keeping it as similar to the battery service as possible.

    I took a quick look at the code and it seems fine, I see that you are using a 128-bit UUID for your own service, which is the correct way to do this.

    Unfortunately, I don't see my new service on the client (I'm connecting using an Android smartphone).

    Could it be that your Android client ignores services that are not known to it, and more specifically 128-bit UUID services? Is the Android client program built-in to the platform or have you written it yourself?

    Regards,

    Carles

Children
Related