code: def stop_sync(self):
          
  
          # Disconnect connected device
          if self.connected:
              self.disconnect_sync(self._connection_handle)
  
          # Disable advertising
          self.set_advertising(False)
          # Stop the baBLE interface
          self.bable.stop()
  
          self.actions.queue.clear()
docs: Safely stop this BLED112 instance without leaving it in a weird state.