Want to transfer/advertise sensor measurement data using custom UUID.

I am using nRF52832 and SDK17.1.0.

Is there any example code to start with for being able to advertise/transfer multiple data values using a custom UUID? I am using ble_nus example but its converting the value to char when I see the values in nRFConnect.

For example 

165, -35, 29, 53, 105. I want to send all values together using a custom UUID

Right now if I send 56,57,58 it is showing me 8,9,: in value field on nRF Connect App when I run the ble_nus example.

Have modified the code in uart_event_handle() to take in sensor values when data is entered via com port.

But later I want to just have sensor data to be advertised.

Is there any other example which I can use for custom services.

Thanks

Parents
  • Hi!

    We have this tutorial that is based on the nRF5 SDK:

    https://github.com/NordicPlayground/nRF5x-custom-ble-service-tutorial

    It's for nRF5 SDK v.15.0.0, but you could use it as a guide and modify the code to match nRF5 SDK v.17.

    Else, we have several tutorials for NCS if you want to upgrade.

    Br,
    Joakim

  • Hi Joakim,

    Thanks for the reply. I went through the tutorial and then added ble_cus.h and ble_cus.c to my code and modified the main.c accordingly. During build routine, I get the error that "Output/Release/Exe/ble_app_template_pca10040_s132.elf does not exist."  "/Applications/SEGGER Embedded Studio for ARM 5.42a/gcc/arm-none-eabi/bin/ld" -X --omagic -eReset_Handler --defsym=__do_debug_operation=__do_debug_operation_mempoll -EL --defsym=__vfprintf=__vfprintf_float_long --defsym=__vfscanf=__vfscanf_long --gc-sections "-T/Desktop/nRF5_SDK_17.1.0_ddde560/examples/My Projects/main_V0.5.2/pca10040/s132/ses/Output/Release/Obj/ble_app_template_pca10040_s132/ble_app_template_pca10040_s132.ld" -Map Output/Release/Exe/ble_app_template_pca10040_s132.map -u_vectors -o Output/Release/Exe/ble_app_template_pca10040_s132.elf --emit-relocs --start-group "@/Desktop/nRF5_SDK_17.1.0_ddde560/examples/My Projects/main_V0.5.2/pca10040/s132/ses/Output/Release/Obj/ble_app_template_pca10040_s132/ble_app_template_pca10040_s132.ind" --end-group.

    Section Placement Macro in Linker Options are RAM_START=0x20002220

    RAM_SIZE=0xdde0 as per the tutorial.

    What can be the issue?

  • Which version of SES are you working with?

    Br,
    Joakim

Reply Children
Related