- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there timeout check after call of blecm_CreateConnection to one device which is not reachable?
If yes, any callback will be invoked? And what't the timeout value? 10 s?
Solved! Go to Solution.
- Labels:
-
MasterSlave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should use blecen_Conn() instead of using blecm_CreateConnection() directly.
In blecen_Conn(), you can set high_scan_duration and low_scan_duration within the structure blecen_cen_cfg when you attempt to create a ble connection.
By default,
When high_scan_duration is expired, stack will switch to use low_scan_window/low_scan_interval with low_scan_duration to continue scan.
When low_scan_duration again gets expired, the connection attempt would stop.
Or you can overwrite the behavior above by registering blecen_usertimerCb() in app_create(). In the sample application hello_client in SDK 2.1.1, hello_client_timer_callback(), it keeps low_scan forever after scan timed out and cancels original connection attempt.
Only when connect is up a call back is invoked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should use blecen_Conn() instead of using blecm_CreateConnection() directly.
In blecen_Conn(), you can set high_scan_duration and low_scan_duration within the structure blecen_cen_cfg when you attempt to create a ble connection.
By default,
When high_scan_duration is expired, stack will switch to use low_scan_window/low_scan_interval with low_scan_duration to continue scan.
When low_scan_duration again gets expired, the connection attempt would stop.
Or you can overwrite the behavior above by registering blecen_usertimerCb() in app_create(). In the sample application hello_client in SDK 2.1.1, hello_client_timer_callback(), it keeps low_scan forever after scan timed out and cancels original connection attempt.
Only when connect is up a call back is invoked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi janusw,
Thanks!
It looks that only blecm_CreateConnectionCancel can stop the initiator process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you call “blecen_Conn(NO_CONN, NULL, 0);”, it will call to blecm_CreateConnectionCancel().
So you don’t have to call blecm_CreateConnectionCancel() separately in your application.