The Bluetooth Specification Version 4.2 [Volume 3, Part C] identifies the following aspects:
• Page 231: 2.2.2.3 Peripheral role "Any device that accepts the establishment of a physical LE connection using any of the connection setup procedures defined in clause 9 is treated as a peripheral device."
• From section 9 in the section "Restricted access mode" on page 351: 9.2.3.2 Conditions "Although the device is in the peripheral role, the device can support the limited detection mode. While the device is in the translator, observer, or the central role of the device, it must not support the limited discovery mode. " ... "In the limited detection mode, the device must send the promotion types with advertising data, including the AD Flags type, as defined in [Core Appendix Specifications], Part A, Section 1.3, which indicates all of the following flags: described" "The device must "stay in restricted detection mode until the connection is established or the host ends the mode."
• From section 9 in the section “Shared Access” on page 352: 9.2.4.2 Conditions “Although the device is in the peripheral role, the device can support the general detection mode. While the device is in the translator, observer, or the central role of the device, it must not support the common discovery mode. " ... "Although in general detection mode, the device should send promotional events with advertising data, including the Flags AD data type, as defined in [Core Appendix Specifications], Part A, Section 1.3, which lists all of the following flags: described" .. . "The device must remain in general discovery mode until the connection is established or the Host completes the mode."
The standard is persistent, you should stop advertising when the connection is established.
source share