Device connection role - master or slave?

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

cross mob
Anonymous
Not applicable

I have been trying to determine the role of the device, whether it is a master or a slave using


INT32 role = (INT32)emconninfo_getRole;

ble_trace1("Role is %ld \n", role);

in the connection_up callback function.

In the trace I see the following:

Role is 65159.

But the defined values are ROLE_MASTER =0 and ROLE_SLAVE=1.

What does this mean? Or am I not calling the function right?

Also I always see this in the trace log:

Trace Decoding Error - Could not find line number 314

Any idea what this means too?

0 Likes
1 Solution
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Did you mean INT32 role = (INT32)emconninfo_getRole(); - this is a function, so you need the parentheses.

View solution in original post

3 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

I will ask the developers to respond.

0 Likes
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Did you mean INT32 role = (INT32)emconninfo_getRole(); - this is a function, so you need the parentheses.

Anonymous
Not applicable

That solved it!

0 Likes