cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

Anonymous
Not applicable

Hi,

In a4wp_power_transmitter.c, I have a question about the bleptum_check_transaction_timer() function. We know when transaction timeout, device should be disconnected from central. The source code uses the following API to disconnect device:

blecm_disconnect(BT_ERROR_CODE_CONNECTION_TERMINATED_BY_LOCAL_HOST);

In my understanding, when we have multiple devices, we need to call blecm_SetPtrConMux(conhanle) before calling blecm_disconnect(), but the source code directly calls blecm_disconnect().

Is it a bug? How can it determine which device to disconnect if it doesn't call blecm_SetPtrConMux() in advance?

Thanks

Here is the reference link of using blecm_SetPtrConMux()

disconnect recipe (from central) when multiple peripherals are connected

0 Likes
Reply
1 Solution
Anonymous
Not applicable

Hello Jingdong

There is a bug in A4WP_power_transmitter.  Simply add this line of code in RED:

 

#ifdef BLEPTUM_TRANS_TO_DISCONNECTION

 

if (bleprofile_p_cfg->disc_required & BLEPTUM_TRANS_TO_DISCONNECTION)

 

{

 

blecm_SetPtrConMux(bleptum_info.bleptu_conhandle);

 

blecm_disconnect(BT_ERROR_CODE_CONNECTION_TERMINATED_BY_LOCAL_HOST);

 

}

 

#endif

 

Thanks

JT

View solution in original post

0 Likes
Reply
4 Replies
Anonymous
Not applicable

Hello Jingdong,

Let us talk to the developers and get back to you.

Thanks

JT

0 Likes
Reply
Anonymous
Not applicable

Hi JT,

Do we have any update?

Thanks

Jingdong

0 Likes
Reply
Anonymous
Not applicable

Hello Jingdong

There is a bug in A4WP_power_transmitter.  Simply add this line of code in RED:

 

#ifdef BLEPTUM_TRANS_TO_DISCONNECTION

 

if (bleprofile_p_cfg->disc_required & BLEPTUM_TRANS_TO_DISCONNECTION)

 

{

 

blecm_SetPtrConMux(bleptum_info.bleptu_conhandle);

 

blecm_disconnect(BT_ERROR_CODE_CONNECTION_TERMINATED_BY_LOCAL_HOST);

 

}

 

#endif

 

Thanks

JT

View solution in original post

0 Likes
Reply
Anonymous
Not applicable

Hi noalac,

Any luck with the code that JT gave you?

-Kevin

0 Likes
Reply