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

The nrf51422 couldn't able to discover the service.

Hi,

I am using nrf51422  dk board using  sdk 12.3  and soft device  s130 in keil5 ide. In our project i am using nrf51422 board as central and other controller Bluetooth board (cc256 moda which is BLE  and classic Bluetooth) is used as peripheral. I am using the example program ble_app_uart (central )program for nrf 51 board by using the device name i am able to connect to the peripheral but is not discovering the service.I have changed the base uuid of the peripheral in the nrf51 central program. The base uuid of the peripheral is" 14839a42167340cf2339" .The problem here is we have 4 characteristics 

such as TX characteristic, TX credits characteristic, RX characteristic, RX credits characteristic which i have attached the uuid of these.Here the uuid of all the characteristic is different but here in the nordic uart program the uuid are same but only one 1 byte is changed and also there are 2 characteristic which are  tx and rx but here we have 4 with different uuid. Can you plz tell me how to use these 4 characteristic uuid and with different uuid .I am not getting how to discover the service. plz help me to resolve the issue

Parents
  • Start with the ble app central and peripheral example:

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_blinky_c.html 

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_blinky.html

    Once you have that up and running the next step is to add vendor specific UUID's as shown in the example code already, e.g. look at NRF_SDH_BLE_VS_UUID_COUNT, sd_ble_uuid_vs_add(), and sd_ble_gatts_service_add(). A tip is that the uuid_type from sd_ble_uuid_vs_add() is used as an input parameter to the sd_ble_gatts_service_add(). This is for instance seen in ble_lbs_init().

  • Thanks for the reply.

    Sorry for the delay response.I am using SDK 12.3, pca10028 so in this sdk the   NRF_SDH_BLE_VS_UUID_COUNT, sd_ble_uuid_vs_add(), These functions are not there .so can you tell me do i need to use 15.3 sdk (nrf52) or can i make change in this sdk 12.3(nrf51).plz help me

  • I am using nrf51422 as central in our project.

    Plz help me

  • Hi,

    I have made changes in the program like this

    uint32_t ble_nus_c_init(ble_nus_c_t * p_ble_nus_c, ble_nus_c_init_t * p_ble_nus_c_init)
    {
        uint32_t      err_code;
        ble_uuid_t    uart_uuid;
        ble_uuid128_t nus_base_uuid = NUS_BASE_UUID;
    	  ble_uuid128_t nus_tx_char_uuid = NUS_TX_CHARACTERISTIC_UUID;
        ble_uuid128_t nus_rx_char_uuid = NUS_RX_CHARACTERISTIC_UUID;
    	ble_uuid128_t nus_tx1_char_uuid = NUS_TX1_CHARACTERISTIC_UUID;
      ble_uuid128_t nus_rx1_char_uuid = NUS_RX1_CHARACTERISTIC_UUID;
     
     
    	 
       // printf("INIT\r\n");
        
        VERIFY_PARAM_NOT_NULL(p_ble_nus_c);
        VERIFY_PARAM_NOT_NULL(p_ble_nus_c_init);
    
        err_code = sd_ble_uuid_vs_add(&nus_base_uuid, &p_ble_nus_c->uuid_type);
        VERIFY_SUCCESS(err_code);
    	printf("ddd===%d\r\n",err_code);
    	  printf("ble_uuid\r\n");
    	if(err_code==NRF_SUCCESS)
    	{
    		
        printf("sd_ble_uuid\r\n");
    	}
        uart_uuid.type = p_ble_nus_c->uuid_type;
        uart_uuid.uuid = BLE_UUID_NUS_SERVICE;
    	  err_code = sd_ble_uuid_vs_add(&nus_tx_char_uuid, &p_ble_nus_c->uuid_type);
        VERIFY_SUCCESS(err_code);
        uart_uuid.type = p_ble_nus_c->uuid_type;
        uart_uuid.uuid = BLE_UUID_NUS_TX_CHARACTERISTIC;
        err_code = sd_ble_uuid_vs_add(&nus_rx_char_uuid, &p_ble_nus_c->uuid_type);
        VERIFY_SUCCESS(err_code);
        uart_uuid.type = p_ble_nus_c->uuid_type;
        uart_uuid.uuid = BLE_UUID_NUS_RX_CHARACTERISTIC;
    err_code = sd_ble_uuid_vs_add(&nus_tx1_char_uuid, &p_ble_nus_c->uuid_type); VERIFY_SUCCESS(err_code); uart_uuid.type = p_ble_nus_c->uuid_type; uart_uuid.uuid = BLE_UUID_NUS_TX1_CHARACTERISTIC; err_code = sd_ble_uuid_vs_add(&nus_rx1_char_uuid, &p_ble_nus_c->uuid_type); VERIFY_SUCCESS(err_code); uart_uuid.type = p_ble_nus_c->uuid_type; uart_uuid.uuid = BLE_UUID_NUS_RX1_CHARACTERISTIC; // printf("%d\r\n",uart_uuid.uuid); // printf("%d\r\n",uart_uuid.type); p_ble_nus_c->conn_handle = BLE_CONN_HANDLE_INVALID; p_ble_nus_c->evt_handler = p_ble_nus_c_init->evt_handler; p_ble_nus_c->handles.nus_rx_handle = BLE_GATT_HANDLE_INVALID; p_ble_nus_c->handles.nus_tx_handle = BLE_GATT_HANDLE_INVALID; return ble_db_discovery_evt_re



    and i have made vs_uuid_count=5 not with this function  NRF_SDH_BLE_VS_UUID_COUNT as
    as this definition is not there in this sdk 12.3... still it is not connecting and
    it is not executing this function the errcode is not success for this function .
    can you help me

  • Kindly check the changes and replay..I am waiting for the replay

Reply Children
No Data
Related