BLE scan/connect/read/write

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

I start on the BLE domain.

I'm starting to use the WICED library / drivers / bluetooth library to connect to a BLE object.

I manage to scan objects around me using the function

wiced_bt_ble_scan ()

But fail to read and write a parameter using the functions.

wiced_bt_gatt_send_read()

wiced_bt_gatt_send_write()

My goal is to read / write a data in BLE objet with mac adress xx:xx:xx:xx:xx according to the following information to change the name

pastedImage_0.png

Do you have a simple BLE demo to allow me to solve this problem ?

1 Solution
Anonymous
Not applicable

sorry for the delay, using the demo bt_internet_gateway/bt_http_proxy_service client and server, everything works better.

View solution in original post

3 Replies
Anonymous
Not applicable

After connecting to a BLE device I try to use the read / write / discover functions but I get WICED_BT_GATT_NO_RESOURCES               = 0x80,         /**< No Resources */ as a result of the call.

Can you tell me it can be the problem ?

0 Likes

Hello,

Could you please confirm that you are writing/reading the attribute by passing the correct corresponding attribute Handle  to these APIs?

For example --

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

        p_write_req->handle   = handle;

        p_write_req->offset   = 0;

        p_write_req->len      = len;

        p_write_req->auth_req = GATT_AUTH_REQ_NONE;

        memcpy( p_write_req->value, p_data, len );

        status = wiced_bt_gatt_send_write( conn_id, GATT_WRITE, p_write_req );

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

-> If issue persists ,could you please attach your project files to reproduce the issue?

-> Also, please let's know the exact BLE device part number you are using?

-Gyan

Anonymous
Not applicable

sorry for the delay, using the demo bt_internet_gateway/bt_http_proxy_service client and server, everything works better.