if the device on the other end of the connection is under your control (and a cc2540) you could simply issue GAPRole_TerminateConnection(); on a write to a dedicated characteristics and when the state changes to GAPROLE_WAITING restart the advertising.
↧