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

ble_app_uart example receiving data from mobile does not work

Hi,

I am testing the blue_app_uart example and I want to  send data

from my smartphone uart terminal app,back to the nRF52840 DK,

Nothing is being received by the segger studio terminal though .

On the other hand, If I send data from the SES terminal to the smartphone

the smartphone terminal shows the data I sent from the DK.

I cannot understand what I am doing wrong here since I have not modified the example.

  Is there some option that I have not taken into account?

Thank you for your time

Parents Reply Children
  • awneil said:
    Does the blue_app_uart example default to using UART for the NRF_LOGs ... ?

     No, it uses only RTT as a backend for the NRF_LOGs.

     

    awneil said:
    If so, does the SES Debug Terminal support logs over UART ?

     No, the SES Debug Terminal only supports RTT logging.

    Best regards,

    Simon

  • I connected the logic analyzer on the Tx and Rx pins of the DK (Pins 0.08 and 0.06). When I type text to the SES terminal and send it  I can see the data on the Tx Line of the DK . When I send text from the smartphone terminal emulator back to the DK, the Rx pin of the DK receives nothing... So what am I doing wrong? I changed the \r \n several times in different combinations but still nothing.

    Here is my uart initialization part

    static void uart_init(void)
    {
        uint32_t                     err_code;
        app_uart_comm_params_t const comm_params =
        {
            .rx_pin_no    = RX_PIN_NUMBER,
            .tx_pin_no    = TX_PIN_NUMBER,
            .rts_pin_no   = RTS_PIN_NUMBER,
            .cts_pin_no   = CTS_PIN_NUMBER,
            .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
            .use_parity   = false,
    #if defined (UART_PRESENT)
            .baud_rate    = NRF_UART_BAUDRATE_115200
    #else
            .baud_rate    = NRF_UARTE_BAUDRATE_115200
    #endif
        };

    Any ideas ?

  • Are you using the SDK example from a clean SDK download with no modifications at all?

    What app, exactly, are you using? Give a link.

    When I send text from the smartphone terminal emulator back to the DK, the Rx pin of the DK receives nothing.

    That could be anything from:

    1. The phone is not actually sending it
    2. The DK is not receiving it via BLE
    3. Your code is not forwarding received BLE data to the UART
    4. Your UART configuration is not correct
    5. Some external hardware issue.

    I would start by putting a breakpoint in the NUS event handler where data is received.

  • I reset my smartphone and now it works... :-/

    I did not expect this... I t makes no sense at all.

    It seems like the transmission part of the mobile was halted for some reason

    Thank you for your support guys!

  • I did not expect this..

    Ha ha - it is the standard first step with any IT problem:

Related