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

Use BLE_TEMPLATE example to send data

I start with the ble_template example (SDK 15.1 || nrf52382 || Embedded Studio for ARM 3.41). My goal is to transmit data (string or int) from a custom made PCB to the NRF_TEMPLATE window that the NRF_CONNECT android app uses.. I am using the nrf52 DK to program my custom PCB. 

I am using the ble_nus_data_send (...) function inside an NUS data handler to send the data... 
The error I get is "'BLE_GATT_MTU_SIZE_DEFAULT' undeclared (first use in this function); did you mean 'BLE_GATT_ATT_MTU_DEFAULT'?"

and I am not sure how to fix it without having to edit the header files (the following parameters belong to the ble_nus.h file). 

My second question is, can I use the ble_nus_data_send(....) without any NUS service or nus_data_handler (..)?  

Some background (not sure if relevant)

1. I modified the sdk_config.h file to enable BLE_NUS and BLE_NUS_CONFIG_LOG

2. I already changed the FLASH and RAM start addresses as in https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/adjustment-of-ram-and-flash-memory

3. I added the NUS header and C drivers to the project , initialized NUS service in the services () function  ; and defined BLE_NUS_DEF(m_nus, NRF_SDH_BLE_TOTAL_LINK_COUNT) so that I have an m_nus defined; 

Parents Reply Children
No Data
Related