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

How to add custom service to the Ble_app_template example

Hello i am using nrf52810 with SDK version 17.0.2 , i want to add custom service to the ble_app_template example and i followed this tutorial link https://github.com/edvinand/custom_ble_service_example so at first debug i got this error as expected 

next i have change the RAM_START AND RAM_SIZE as per the memory size mentioned in the error then i DEBUG it again so the i got 

so i don't know what's happening please help me to resolve this . 

thank you.

  • Great, I look forward to hearing how it goes!

  • Hello,

    Hi, mr.Karl i now i am  at step 8 and i can't connect the BLE it gives the NRF_ERROR_NULL. In tutorial they have mentioned that make sure that the evt_type is not NULL but when on_connect evt_type becomes BLE_EVT_CONNECTED right.?? so how the evt becomes NULL here for more information please have look at this.

    and one more thing that adding custom characteristics i faced some issues yesterday in cus_init() exactly at sd_ble_gatts_service_add() function returns so i have  done this then only characteristic is a

    added and its working fine. is that effects here.??

    please let me know,i am looking forward for your suggestions.

    thank you.

    so 

  • Hello, 

    mr. Karl any update  regarding that problem like the cus_evt is NULL so that's why its not advertising i think, please let me know if its some other issue.

    thank you.

  • Hello,

    You will need to look at the end of the error message to see which line it is pointing to, then check which function returned the error code that was checked on the line specified in the error message.
    Then, you should check the API refence of the function that returned the error code to see why it would return this specific error, so you may resolve the issue.
    Please try this, and let me know if you are able to resolve the issue.
    If not, please share all the information mentioned above so I may take a look.

    Furthermore, I see that you have commented out an APP_ERROR_CHECK in your code - this is not advisable, because you will not be alerted if the function fails, if the error code is never checked. Please reinstate the APP_ERROR_CHECK, and all other APP_ERROR_CHECK's you might have removed as well, they serve an important function.

    Best regards,
    Karl

  • Hello ,

    please share all the information mentioned above so I may take a look

    i got issue like the p_cus_init->evt_handler == NULL in ble_cus_init() function after this its not executing

    and its back to break point. for more information please have look at this,

      

    Furthermore, I see that you have commented out an APP_ERROR_CHECK in your code - this is not advisable, because you will not be alerted if the function fails, if the error code is never checked. Please reinstate the APP_ERROR_CHECK, and all other APP_ERROR_CHECK's you might have removed as well, they serve an important function.

    if i uncomment APP_ERROR_CHECK write characteristics will not add however that is redundant so after commenting that only characteristic was added.

    so i don't know i am blanked what to do i tried so many times if i comment the  p_cus_init->evt_handler == NULL in ble_cus_init() function then it starts advertising. so please help me to resolve this.

    thank you.

Related