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

Merge ble_app_interactive with ble_app_uart example available in SDK 15.2.0

Hi I am working on nRF 52832 and nrf 52840 dongle. I want UART service to be used in my application and application should allow me to scan peripheral devices with user command via Command Line Interface(Putty).
I am trying to merge ble_app_uart and Ble_app_interactive example codes with some modification.

Please suggest me the best way to do it...

Parents
  • are you sure you need to merge them? it appear the ble cli app already has the ble_nus service provide. do you know what feature the ble cli app is missing that you need. I would say that should be the first step. Identify what you are missing.

  • Hi thanks for the reply. But how can I prove that it is using Nordic uart service ? Because when I check the ble_app_interactive application it doesn't use ble_nus_c file or functions.

    How can I show that the code has this feature implemented ?

    Please provide me solution

  • sorry I might have looked at the wrong application. My suggestion would be to start with the ble_app_interactive and simply add the ble_nus service client into that solution.

    you can follow the way the ble_bas_c client is included in the solution. 

    basically add all of your files needs (libs, drivers) then your include paths. next step would be to start from the top and work your way down.

    BLE_NUS_C_DEF(m_ble_nus_c);

    static uint16_t m_ble_nus_max_data_len = BLE_GATT_ATT_MTU_DEFAULT - OPCODE_LENGTH - HANDLE_LENGTH; /**< Maximum length of data (in bytes) that can be transmitted to the peer by the Nordic UART service module. */


    static ble_uuid_t const m_nus_uuid 

    static void ble_nus_chars_received_uart_print(uint8_t * p_data, uint16_t data_len)

    static void ble_nus_c_evt_handler(ble_nus_c_t * p_ble_nus_c, ble_nus_c_evt_t const * p_ble_nus_evt)

    static void nus_c_init(void)

    the above are only a snippet of the function or variable you need to fully copy into your code. The above was taken from ble_app_uart_c. 

    Add all files, includes then work your way down initializing the service and the service handlers.

  • Yeah I have added these functions to code.thank you for the details it helped me.

Reply Children
No Data
Related