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

Central device can not find 2 services(0x1001,0x0001)

Peripheral device has 2 services,but central can find only 1 service(0x1001). I want to find other service(0x0001) According to the message seems to be looking for 0x1001,but ! want to looking for every services.

I don not know why this program look for only 0x1001.

Incidentally Central program is based ble_app_uart_c.

Please tell me how to find every services.

I Hope to have a central sample program that handles multiple services

Message is Starting discovery of service with UUID 0x1001 on connection handle 0x0. Found service UUID 0x1001. Discovery of service with UUID 0x1001 completed with success on connection handle 0x0

Parents
  • Thank you for your reply. What I added is as follows.

    ■added

    uart_uuid.type = p_ble_nus_c->uuid_type; uart_uuid.uuid = 0x0001;

    err_code = ble_db_discovery_evt_register(&uart_uuid);

    in function ble_nus_c_init

    ■added

    else if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE &&
        p_evt->params.discovered_db.srv_uuid.uuid == 0x0001 &&
        p_evt->params.discovered_db.srv_uuid.type == p_ble_nus_c->uuid_type)
    {
    	.....
    

    in function ble_nus_c_on_db_disc_evt

    ■added

    uint16_t nus_rx_handle2;      /**< Handle of the NUS RX characteristic as provided by a discovery. */
    

    to struct ble_nus_c_handles_t

    I think there are other things I have to do, I do not know what it is.

    Is there a sample source code for multiservice?

Reply
  • Thank you for your reply. What I added is as follows.

    ■added

    uart_uuid.type = p_ble_nus_c->uuid_type; uart_uuid.uuid = 0x0001;

    err_code = ble_db_discovery_evt_register(&uart_uuid);

    in function ble_nus_c_init

    ■added

    else if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE &&
        p_evt->params.discovered_db.srv_uuid.uuid == 0x0001 &&
        p_evt->params.discovered_db.srv_uuid.type == p_ble_nus_c->uuid_type)
    {
    	.....
    

    in function ble_nus_c_on_db_disc_evt

    ■added

    uint16_t nus_rx_handle2;      /**< Handle of the NUS RX characteristic as provided by a discovery. */
    

    to struct ble_nus_c_handles_t

    I think there are other things I have to do, I do not know what it is.

    Is there a sample source code for multiservice?

Children
No Data
Related