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

how to create custom service?

image descriptionhow to create custom service in order to send dummy message, not from the console, I have to make one char arr[]="hello" this is a fixed string, then where i have add this string as data and what are the parameters are required to create simple custom service? please tell me the stepwise procedure to do this.

I don't want to send the data by this type of window as a shown in the below picture and also by mobile app.

I am following below programs:

ble_ap_uart_s132_pca10040(periphral) ble_app_uart_c_s132_pca10040(central)

Parents
  • Steps:

    1. Learn how BLE works (see all Tutorials in "Bluetooth low energy" here).
    2. Try to make Nordic BLE UART Service examples work (you need two dev kits obviously but it works on all nRF51/52/52840 variants, just pick right nRF5 SDK version). GAP Peripheral part is in examples\ble_peripheral\ble_app_uart path while GAP Central example is in examples\ble_central\ble_app_uart_c path.
    3. Send whatever strings you need.
    4. Profit.

    If you fail in any step, please first go back to step 1) and if not resolved then search carefully through all 23k+ Q&S on this forum. If still not resolved then you are most then welcome to paste new question (please give us then detailed description what HW+SW set-up you have, what is your goal, what steps you've done, what is the result what was your expectation instead).

  • @Joakim Jakobsen

    Thanks. I didn't realise there was a nice clean custom service example.

    Is there an example of a custom 16 bit service as well ?

    Currently I'm going through the process of converting the hrs into a custom 16 bit service, so that I can them implement various 16 bit services e.g. the Temperature service, which Nordic does not have an example of.

    From what I have seen the API calls to setup a 16 bit service are different from a 128 bit service, hence why I have been using the HRS as a starting point.

Reply
  • @Joakim Jakobsen

    Thanks. I didn't realise there was a nice clean custom service example.

    Is there an example of a custom 16 bit service as well ?

    Currently I'm going through the process of converting the hrs into a custom 16 bit service, so that I can them implement various 16 bit services e.g. the Temperature service, which Nordic does not have an example of.

    From what I have seen the API calls to setup a 16 bit service are different from a 128 bit service, hence why I have been using the HRS as a starting point.

Children
No Data
Related