code: def _query_systemstate(self):
          
  
          def status_filter_func(event):
              if event.command_class == 3 and event.command == 0:
                  return True
  
              return False
  
          try:
              response = self._send_command(0, 6, [])
              maxconn, = unpack("<B", response.payload)
          except InternalTimeoutError:
              return False, {'reason': 'Timeout waiting for command response'}
  
          events = self._wait_process_events(0.5, status_filter_func, lambda x: False)
  
          conns = []
          for event in events:
              handle, flags, addr, addr_type, interval, timeout, lat, bond = unpack("<BB6sBHHHB", event.payload)
  
              if flags != 0:
                  conns.append(handle)
  
          return True, {'max_connections': maxconn, 'active_connections': conns}
docs: Query the maximum number of connections supported by this adapter