Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Receiving data from nRF UART compared to data from nRF Connect

Hello Nordic community! My setup is pca10040, android tablet, s132, sdk14.2.

This time I am trying to understand why this code:

While using nrf toolbox nrf UART prints out in RTT viewer "identifiaction failed" message and while using nrf Connect application, i receive "Identification succedded" message? Hoewer I am sending the same: "Hello_simb" string which should be recognised.

If there is lack of data, please, let me know.

Best regards 

Parents
  • Hi Ovidijus

    Can I test your code simply by replacing the nus_data_handler() function in the standard example with the one you included?

    If so I will test your code and see if I can spot the problem. 

    Best regards
    Torbjørn

Reply
  • Hi Ovidijus

    Can I test your code simply by replacing the nus_data_handler() function in the standard example with the one you included?

    If so I will test your code and see if I can spot the problem. 

    Best regards
    Torbjørn

Children
  • Yes, that should work out. I have deleted some unnecessary lines, there I hope I have not missed nothing.

    Best regards

  • Hi 

    I had to declare some variables to make your code compile, but I was able to figure it out. 

    Strangely enough I don't have any issues using nRF Toolbox. After I added your "Hello_Simb" string I get the "identification succeeded" message in return. 

    Can you try to use the debugger, and set a break point inside the if (p_evt->type == BLE_NUS_EVT_RX_DATA) section?

    Then you can have a look at the length of the data and the content, and see if it matches the id string. In my case the length is 10 as expected, and the data seems to match. 

    Best regards
    Torbjørn

  • Thank you, for your help. I found the problem that it was my mistake while using some of the variables.