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

PC-BLE-Driver with connectivity board doesn't connect as master

I have been using pc-ble-driver in Linux (downloaded and compiled from github here - github.com/.../3316c0c306257a825168751964f814cb95fc0d74) with our custom C++ application that is supposed to work in Central and Peripheral roles simultaneously.

For some reason, when I try to connect as Central, using sd_ble_gap_connect(adapter, p_peer_addr, p_scan_params, p_conn_params); I always get NRF_ERROR_INTERNAL. I do not have any problems with connecting as Peripheral. That is the following always returns 3.

 err_code = sd_ble_gap_connect(adapter, p_peer_addr, p_scan_params, p_conn_params);

Here is the BLE_enable code that is used in the intialization before any other API calls are made...

      params.common_enable_params.vs_uuid_count   = 1;
      params.gatts_enable_params.attr_tab_size = 0;   
      params.gatts_enable_params.service_changed = 1; 
      params.gap_enable_params.periph_conn_count = 1; 
      params.gap_enable_params.central_conn_count = 1; 
      params.gap_enable_params.central_sec_count = 1; 
    
     
     err_code = sd_ble_enable(adapter, &params, NULL); // Tried both NULL and 0x20002418

I am kinda stuck here. Any pointers much appreciated.

Parents
  • Oh, did I say connect to slave device? Sorry, I meant my device is able to connect to a Central device as a peripheral, while getting error when trying to connect to a Peripheral as a master. You're right, I could advertise and get connected as peripheral. Only Central connection fails.

    nrf51-ble-driver_win_0.5.0 never worked for me.

    So, you think that with the parameters that I supplied for sd_ble_init and sd_ble_gap_connect look OK for establishing an application that works as Central and Peripheral simultaneously?? I wonder what I am doing wrong here...

Reply
  • Oh, did I say connect to slave device? Sorry, I meant my device is able to connect to a Central device as a peripheral, while getting error when trying to connect to a Peripheral as a master. You're right, I could advertise and get connected as peripheral. Only Central connection fails.

    nrf51-ble-driver_win_0.5.0 never worked for me.

    So, you think that with the parameters that I supplied for sd_ble_init and sd_ble_gap_connect look OK for establishing an application that works as Central and Peripheral simultaneously?? I wonder what I am doing wrong here...

Children
No Data
Related