BLE Discovery Service Can Not Find Service

Hi,

I have a hardware that I want to connect via BLE and send data via NUS (Nordic UART Service). I can connect to this hardware via the NRF Connect application on android and see the service UUIDs in the Client tab. When I want to connect to the same hardware using the central_uart sample in the nrf Connect SDK, it says no service found in RTT. Therefore, I cannot send data over BLE. I am running the uart_central sample on the nRF52833 DK.
The advertise interval of the hardware I want to connect to is 4750 ms, slightly higher than other hardware. So should I change a parameter in the config?
RTT logs are listed below.

00> [00:00:18.700,286] <inf> central_uart: Filters matched. Address: EE:C4:00:98:C8:2D (random) connectable: 1
00> [00:00:18.744,689] <inf> central_uart: Connected: EE:C4:00:98:C8:2D (random)
00> [00:00:18.896,270] <inf> central_uart: MTU exchange done
00> [00:00:18.996,032] <dbg> bt_gatt_dm.discovery_callback: NULL attribute
00> [00:00:18.996,063] <dbg> bt_gatt_dm.discovery_complete_not_found: Discover complete. No service found.
00> [00:00:18.996,063] <dbg> bt_gatt_dm.svc_attr_memory_release: Attr memory release
00> [00:00:18.996,215] <inf> central_uart: Service not found
00> [00:00:44.817,108] <wrn> central_uart: Failed to send data over BLE connection(err -128)
00> [00:00:44.967,193] <wrn> central_uart: NUS send timeout
00> [00:00:44.967,193] <wrn> central_uart: Failed to send data over BLE connection(err -128)
00> [00:00:45.117,309] <wrn> central_uart: NUS send timeout

 Edit: In the uart_central sample I just edited the filter to be device_name. Other than that, no changes were made.
Parents
  • Hi

    Can you show me what exact changes you made to the filter on the central side? Are you sure there aren't more than one peripheral device with the name you're scanning for? And can you confirm whether the peripheral device is based on the peripheral_uart sample project and does indeed have the NUS service implemented?

    Best regards,

    Simon

  • Hi,

    The change I made in the uart_central sample is below.

    #define DEVICE_NAME	"TFT100_LE"
    .
    .
    .
    
    static int scan_init(void)
    {
        .
        .
        .
    	err = bt_scan_filter_add(BT_SCAN_FILTER_TYPE_NAME, DEVICE_NAME);
    	if (err) {
    		LOG_ERR("Scanning name filter cannot be set (err %d)", err);
    		return err;
    	}
    
    	err = bt_scan_filter_enable(BT_SCAN_NAME_FILTER, false);
    	if (err) {
    		LOG_ERR("Name Filter cannot be turned on (err %d)", err);
    		return err;
    	}
    		
    	LOG_INF("Scan module initialized");
    	return err;
    }

    There is only 1 piece of hardware with this BLE name in my environment.

    The services seen in the nRF connect application on android for the peripheral device are shown in the screenshot below.

    In addition, the records in the nRF Logger in android are listed below. It says services discovered about 550 milliseconds after service discovery. In the central_uart sample, service discover does not wait this long.

Reply
  • Hi,

    The change I made in the uart_central sample is below.

    #define DEVICE_NAME	"TFT100_LE"
    .
    .
    .
    
    static int scan_init(void)
    {
        .
        .
        .
    	err = bt_scan_filter_add(BT_SCAN_FILTER_TYPE_NAME, DEVICE_NAME);
    	if (err) {
    		LOG_ERR("Scanning name filter cannot be set (err %d)", err);
    		return err;
    	}
    
    	err = bt_scan_filter_enable(BT_SCAN_NAME_FILTER, false);
    	if (err) {
    		LOG_ERR("Name Filter cannot be turned on (err %d)", err);
    		return err;
    	}
    		
    	LOG_INF("Scan module initialized");
    	return err;
    }

    There is only 1 piece of hardware with this BLE name in my environment.

    The services seen in the nRF connect application on android for the peripheral device are shown in the screenshot below.

    In addition, the records in the nRF Logger in android are listed below. It says services discovered about 550 milliseconds after service discovery. In the central_uart sample, service discover does not wait this long.

Children
No Data
Related