- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Labels:
-
Debug
-
MasterSlave
- Tags:
- a4wp
- api
- disconnection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Jingdong,
Let us talk to the developers and get back to you.
Thanks
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JT,
Do we have any update?
Thanks
Jingdong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content