code: def initialize_system_sync(self):
          
  
          retval = self._command_task.sync_command(['_query_systemstate'])
  
          self.maximum_connections = retval['max_connections']
  
          for conn in retval['active_connections']:
              self._connections[conn] = {'handle': conn, 'connection_id': len(self._connections)}
              self.disconnect_sync(0)
  
          # If the dongle was previously left in a dirty state while still scanning, it will
          # not allow new scans to be started.  So, forcibly stop any in progress scans.
          # This throws a hardware error if scanning is not in progress which should be ignored.
          try:
              self.stop_scan()
          except HardwareError:
              # If we errored our it is because we were not currently scanning, so make sure
              # we update our self.scanning flag (which would not be updated by stop_scan since
              # it raised an exception.)
              self.scanning = False
  
          self._command_task.sync_command(['_set_mode', 0, 0]) #Disable advertising
  
          self._logger.info("BLED112 adapter supports %d connections", self.maximum_connections)
docs: Remove all active connections and query the maximum number of supported connections