This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trying to follow "Bluetooth low energy Services, a beginner's tutorial", but unable to get further than step 4.

I tried following the "Bluetooth low energy Services, a beginner's tutorial", I ended up getting stuff to compile and run by making a copy of the ble_app_hrs example, and copying main.c, our_service.c and our_service.h in there this worked just fine and I could find the device in nrfconnect. Then I followed steps 1, 2, 3 and 4 but my new service doesn't show up in nrfconnect:

 

I saw in the comments that people were having some problems at the same step. And following their advice I changed: "NRF_SDH_BLE_VS_UUID_COUNT 0" to:  "NRF_SDH_BLE_VS_UUID_COUNT 1" in the sdk_config file. and I also tried adding 0x10 to the ram origin and -0x10 to the length (in the .ld file), like in those commends. I also tried adding a break point between the line: "err_code = sd_ble_uuid_vs_add(&base_uuid, &service_uuid.type);" and "APP_ERROR_CHECK(err_code);" and confirmed that err_code was 0 (since people on the forum seemed to be having NRF_ERROR_NO_MEM there https://devzone.nordicsemi.com/f/nordic-q-a/41773/bluetooth-low-energy-services-a-beginner-s-tutorial). But none of these seemed to work for me.

I am using a barebones dev board (just a pcb with an antenna, some pins and an nrf52832) programmed with a segger j-link edu mini.

I am using s132 and I used the pca10040 compile setup.

  • Hi,

    This might be caused by the Bluetooth cache on your phone. Can you try clearing the cache before trying again? To clear Bluetooth cache on Android do the following:

    1. Go to Settings -> Apps
    2. Enable the setting to show system apps so you will see the app called Bluetooth
    3. Select Bluetooth from the app list -> Storage -> Clear Cache
    4. Restart the phone

    Best regards,

    Marte

  • I cleared the cache of the bluetooth app and restarted the phone, this didn't fix the problem. But I just tried on another phone which had never seen this bluetooth device, and that one seems to be able to see the service, not sure why clearing bluetooth casehe doesn't fix it on my main phone (maybe because I am using a custom rom).

    Anyways, I now know that the problem is on the phone side, so I can work around it and I can continue the tutorial, so that pretty much fixes the problem for me.

    Thank You Very Much