Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
CYW20706 can support multi-connection as a Peripheral device. To realize the multi-connection functionality, you need to restart advertising after a connection is established with a Central device. CYW20706 will maintain the current connection and can be scanned and connected by other Central devices at the same time.
The attached hello_sensor example demonstrates how to realize the multi-connection function.
Change the hello_sensor application as follows:
1. In the hello_sensor.c file, add the following API to hello_sensor_gatts_connection_up function to stop and restart advertising:
result = wiced_bt_start_advertisements( BTM_BLE_ADVERT_OFF, 0, NULL );
result = wiced_bt_start_advertisements( BTM_BLE_ADVERT_UNDIRECTED_HIGH, 0, NULL );
2. In the wiced_bt_cfg.c file, change the server_max_links parameter to allow multi-connection. The default value is ‘1’ (single connection); change it to the number of Central devices that the device can connect to.
Note that there is no maximum value for the number of connections, but it is limited by the memory and PHY. The hello_sensor application can connect steadily with up to four Central devices (tested with the CySmart app on phone). There might be packet drops and reduction in throughput because of collision of connection intervals.
See the attached project based on the hello_sensor demo for multi-connection.