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

NRF UART app android

Hi,

I tried to get the sample ble_app_uart to work on NRF51422_DK with the S130.2.0.0 soft_device. The compilation and programmation of the board is OK.

The soft run and i'll pair with my phone (wiko raimbow). I use nrf uart v2.0 app from NORDIC.

I open a terminal, Termite, and open the com port (i verified the port) with the good baud rate (115200) and with the good option (RTS/CTS).

When i sent from my board to my phone, it was ok, i received the data. But when i sent from my phone to my board, i received nothing on Termite.

If someone have ideas about that, i'm aware.

regards,

Parents
  • Hi, thanks for your anwser. I ran the application in debug mode and use a breakpoint in nus_data_handler() function. When i sent a data from my phone to my board, i entered in the nus_data_handler() function. For the BLE_GATTS_EVT_WRITE, i found 2 function with this event : in ble_nus.c

    void ble_nus_on_ble_evt(ble_nus_t * p_nus, ble_evt_t * p_ble_evt)
    {
    if ((p_nus == NULL) || (p_ble_evt == NULL))
    {
        return;
    }
    
    switch (p_ble_evt->header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            on_connect(p_nus, p_ble_evt);
            break;
    
        case BLE_GAP_EVT_DISCONNECTED:
            on_disconnect(p_nus, p_ble_evt);
            break;
    
        case BLE_GATTS_EVT_WRITE:
            on_write(p_nus, p_ble_evt);
            break;
    
        default:
            // No implementation needed.
            break;
    }
    }
    

    in ble_conn_params.c

    void ble_conn_params_on_ble_evt(ble_evt_t * p_ble_evt)
    {
    switch (p_ble_evt->header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            on_connect(p_ble_evt);
            break;
    
        case BLE_GAP_EVT_DISCONNECTED:
            on_disconnect(p_ble_evt);
            break;
    
        case BLE_GATTS_EVT_WRITE:
            on_write(p_ble_evt);
            break;
    
        case BLE_GAP_EVT_CONN_PARAM_UPDATE:
            on_conn_params_update(p_ble_evt);
            break;
    
        default:
            // No implementation needed.
            break;
    }
    }
    

    I use breakpoint in cases and nothing appear when i sent data from my phone to my board.

Reply
  • Hi, thanks for your anwser. I ran the application in debug mode and use a breakpoint in nus_data_handler() function. When i sent a data from my phone to my board, i entered in the nus_data_handler() function. For the BLE_GATTS_EVT_WRITE, i found 2 function with this event : in ble_nus.c

    void ble_nus_on_ble_evt(ble_nus_t * p_nus, ble_evt_t * p_ble_evt)
    {
    if ((p_nus == NULL) || (p_ble_evt == NULL))
    {
        return;
    }
    
    switch (p_ble_evt->header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            on_connect(p_nus, p_ble_evt);
            break;
    
        case BLE_GAP_EVT_DISCONNECTED:
            on_disconnect(p_nus, p_ble_evt);
            break;
    
        case BLE_GATTS_EVT_WRITE:
            on_write(p_nus, p_ble_evt);
            break;
    
        default:
            // No implementation needed.
            break;
    }
    }
    

    in ble_conn_params.c

    void ble_conn_params_on_ble_evt(ble_evt_t * p_ble_evt)
    {
    switch (p_ble_evt->header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            on_connect(p_ble_evt);
            break;
    
        case BLE_GAP_EVT_DISCONNECTED:
            on_disconnect(p_ble_evt);
            break;
    
        case BLE_GATTS_EVT_WRITE:
            on_write(p_ble_evt);
            break;
    
        case BLE_GAP_EVT_CONN_PARAM_UPDATE:
            on_conn_params_update(p_ble_evt);
            break;
    
        default:
            // No implementation needed.
            break;
    }
    }
    

    I use breakpoint in cases and nothing appear when i sent data from my phone to my board.

Children
No Data
Related