nRF_SDK_17.1.0 s140 pca10056 BLE_UART

Hello all,

I am trying to develop an application where the user will input some specific commands i.e hex value of 0x01 via a mobile application and then via bluetooth this command will be passed to the computer using UART.

I have compiled the ble app uart on my nrf52840 but i am struggling to modify the code for my application.

Could someone help me with this ? 

Thanks

Kleanthis

Parents
  • Dear Karl,

    I have solved all the issues. I have one final question though.

    whenever i pass the command activation i am starting an app_timer that does certain functions and sends some outputs via notifications in a new custom characteristic.

    however whenever this loop finishes the timer stops.

    If the user now reenters the command activation, i can see with NRF_LOG_INFO("p_data = %d", p_evt->params.rx_data.p_data[0]); that it receives the command however it does not restart the app_timer_handle

    Shall i add something else in my nus_data_handle ?

     

    Kind regards,
    Kleanthis

  • Hello Kleanthis,

    kleanthise said:
    I have solved all the issues.

    I am glad to hear that you have managed to solve all the issues - great!

    kleanthise said:
    If the user now reenters the command activation, i can see with NRF_LOG_INFO("p_data = %d", p_evt->params.rx_data.p_data[0]); that it receives the command however it does not restart the app_timer_handle

    It is hard to say exactly what you need to do in order to fix this - did you perhaps attach the wrong picture at the end? Without having seen the code, I can only offer general advice, but it sounds to me that you should make sure that the activate command properly reactivates the device following a deactivation, and then follow that configuration to see how the execution might be different for a re-activation compared to a first-time activation.
    Could it be that you use the active state in a function that is only called upon connection, and so if the connection is kept while the state is deactivated and reactivated, the device never goes through the section of code it should at the start of a activation, or similar?

    Best regards,
    Karl

Reply
  • Hello Kleanthis,

    kleanthise said:
    I have solved all the issues.

    I am glad to hear that you have managed to solve all the issues - great!

    kleanthise said:
    If the user now reenters the command activation, i can see with NRF_LOG_INFO("p_data = %d", p_evt->params.rx_data.p_data[0]); that it receives the command however it does not restart the app_timer_handle

    It is hard to say exactly what you need to do in order to fix this - did you perhaps attach the wrong picture at the end? Without having seen the code, I can only offer general advice, but it sounds to me that you should make sure that the activate command properly reactivates the device following a deactivation, and then follow that configuration to see how the execution might be different for a re-activation compared to a first-time activation.
    Could it be that you use the active state in a function that is only called upon connection, and so if the connection is kept while the state is deactivated and reactivated, the device never goes through the section of code it should at the start of a activation, or similar?

    Best regards,
    Karl

Children
No Data
Related