Is connection done?

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

cross mob
YaTr_3516311
Level 5
Level 5
25 sign-ins First solution authored 100 replies posted

Hi,

I want to confirm central(A: with hello_sensor demo) to connect to pheriphy(B: with hello_client demo) and transfer data with pheriphy.  So I add scan function to hello_sensor.example to searched the B, then wiced_bt_gatt_le_connect to the B. But it seems that is not successful because B no any connection comming in the log(If I use app in mobilephone to connect to B, there is related log). But wiced_bt_gatt_connect status is 1. I don't know why.

pastedImage_0.png

pastedImage_1.png

Below is my code

pastedImage_2.png

0 Likes
4 Replies
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi Treacy,

I do not understand your query.

You are referring A as central then it should have hello_client code running on it. If A is central and B is peripheral (with hello sensor code), then in B's scan callback function you will search for A and then connect to it.

I am not able to understand your code, please elaborate more.

0 Likes

Sorry, I got misunderstanding of hello_sensor and hello-client. I'm retesting and seems ok. But I can't understand the communication sequence clealy. Who initiate connection firstly? Who initiate paried? How to get the keys? Do you have a clear spec to introduce all of these?

0 Likes

I test connection is OK. But notification seem not ok? master conn_id and ccc should be 1 if notification is ok?

pastedImage_0.png

0 Likes

Hi Treacy,

The conn_id should be 1 after connection is successful.

I would suggest you to go through the functions & APIs in both hello sensor and hello client projects; Also check the details of those functions in wiced_bt_dev.h file. It explains about the pairing, bonding related functions.