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

nRF SDK version 13.1 central ble_uart_c not working

I want to connect remocon and nrfboard. And see the value of the remote control as uart.

so I try to connect remocon and nrf85832 to use SDK 13.1 example.

I use central ble_uart_c code.

I change NUS_BASE_UUID, BLE_UUID_NUS_SERVICE, BLE_UUID_NUS_RX_CHARACTERSTIC, BLE_UUID_NUS_TX_CHARACTERISTIC.

but it doesn't work.. how can I solve this?

plz help me..

Parents Reply Children
  • The ble app uart central will only connect with a peer that have the specific UUID in the advertisment packet, ref (snippet from code):

    static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
    {
        ret_code_t            err_code;
        ble_gap_evt_t const * p_gap_evt = &p_ble_evt->evt.gap_evt;
    
        switch (p_ble_evt->header.evt_id)
        {
            case BLE_GAP_EVT_ADV_REPORT:
            {
                ble_gap_evt_adv_report_t const * p_adv_report = &p_gap_evt->params.adv_report;
    
                if (is_uuid_present(&m_nus_uuid, p_adv_report))
                {
    
                    err_code = sd_ble_gap_connect(&p_adv_report->peer_addr,
                                                  &m_scan_params,
                                                  &m_connection_param,
                                                  APP_BLE_CONN_CFG_TAG);
    ...
    ...
    }

    Likely you need to look at the advertisment packet of the remote control to check if it contain this data or if you need to change the 'if (is_uuid_present(&m_nus_uuid, p_adv_report))' check.

  • I solved the problem by changing the version from 13 to 17. Thanks for help!!

Related