This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF51 p_ble_gattc_evt->gatt_status = 0x010A

Hi. I'm using PCA10028, SDK10.0.0, S130 and "ble_app_hrs_c" "ble_app_uart_c" as reference.

My peripheral's Service UUID = 000098000000100080000017FFE07A00. I want to discover this UUID. But whenever I check "p_ble_gattc_evt->gatt_status" in "on_primary_srv_discovery_rsp" function, it returns value = 0x010A which means Attribute not found.

My code is...

#define BLE_UUID_spcDev_SERVICE_BASE
                  {{0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x17, 0x00, 0x00, 0x7A, 0x00}} /**< Used vendor specific UUID. */
#define BLE_UUID_spcDev_SERVICE							0xE0FF

spcDev ble_iRevo_c_s
{

    uint8_t                 uuid_type;          /**< UUID type. */
    uint16_t                conn_handle;     /**< Connection handle as provided by the SoftDevice. */
    uint16_t                bl_cccd_handle;  /**< Handle of the CCCD of the Battery Level characteristic. */
    uint16_t                bl_handle;       /**< Handle of the Battery Level characteristic as provided by the SoftDevice. */
    ble_iRevo_c_evt_handler_t evt_handler;     /**< Application event handler to be called when there is an event related to the Battery service. */
};


uint32_t ble_spcDev_c_init(ble_spcDev_c_t * p_ble_spcDev_c, ble_spcDev_c_init_t * p_ble_spcDev_c_init)

{

    if ((p_ble_spcDev_c == NULL) || (p_ble_spcDev_c_init == NULL))
    {
        return NRF_ERROR_NULL;
    }
    uint32_t      err_code;
    ble_uuid128_t spcDev_base_uuid = BLE_UUID_spcDev_SERVICE_BASE;
    ble_uuid_t    spcDev_uuid;
    err_code = sd_ble_uuid_vs_add(&spcDev_base_uuid, &p_ble_spcDev_c->uuid_type);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }
    
    spcDev_uuid.type = p_ble_spcDev_c->uuid_type;
    spcDev_uuid.uuid = BLE_UUID_spcDev_SERVICE;

    mp_ble_spcDev_c                 = p_ble_spcDev_c;

    mp_ble_spcDev_c->conn_handle    = BLE_CONN_HANDLE_ALL;
    mp_ble_spcDev_c->bl_cccd_handle = BLE_CONN_HANDLE_ALL;
    mp_ble_spcDev_c->bl_handle      = BLE_CONN_HANDLE_ALL;
    mp_ble_spcDev_c->evt_handler    = p_ble_spcDev_c_init->evt_handler;

    return ble_db_discovery_evt_register(&spcDev_uuid,
                                         db_discovery_evt_handler);
}


static void spcDev_c_init(void)
{

    ble_spcDev_c_init_t spcDev_c_init_obj;

    spcDev_c_init_obj.evt_handler = spcDev_c_evt_handler;

    uint32_t err_code = ble_spcDev_c_init(&m_ble_spcDev_c, &spcDev_c_init_obj);
    APP_ERROR_CHECK(err_code);
}

int main(void)
{

    bool erase_bonds;

    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, NULL);
	buttons_leds_init(&erase_bonds);
	uart_init();

    ble_stack_init();
    device_manager_init(erase_bonds);
    db_discovery_init();
    spcDev_c_init();
    scan_start();

    for (;; )
    {
        power_manage();
    }
}

I need your help.

Parents Reply Children
No Data
Related