Hi Dawid, I hope you're doing well!
It's possible to change the GAP role of the device, maintain current connections, and then form a new connection using the new GAP role. This can be observed when using the Wireless UART SDK example for the FRDM-KW38 by following this procedure:
Two FRDM-KW38 devices and a mobile phone with the IoT Toolbox App are needed for this procedure.
- Program both FRDM-KW38 devices with the Wireless UART SDK Example (…\SDK_2.6.6_FRDM-KW38\boards\frdmkw38\wireless_examples\bluetooth\w_uart)
- Change the role on FRDM board A to GAP Peripheral and start advertising.
- Connect to FRDM board A using the IoT Toolbox phone app.
- Change the role on FRDM board A to GAP central and start scanning. Change the role on FRDM board B to GAP peripheral, and start advertising.
- Now both the phone and FRDM board B should be connected to FRDM board A.
Please let me know if you need any more information.
Best regards,
Sebastian