EasyManuals Logo

Lantronix SLC 8048 User Manual

Lantronix SLC 8048
425 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #218 background imageLoading...
Page #218 background image
9: Device Ports
SLCâ„¢ 8000 Advanced Console Manager User Guide 218
print("Timeout waiting to login.")
p.terminate(True)
sys.exit(1)
elif i == 1: # EOF
print("Session unexpectedly terminated.")
p.terminate(True)
sys.exit(1)
elif i == 2: # SLC8000 model number
model = p.match.group(1)
numPorts = int(model)
elif i == 3: # SLB882 model number
numPorts = 8
elif i == 4: # prompt
loggedIn = True
slcPrompt = p.match.group(1).decode('utf-8')
if numPorts == 0:
print("Cannot determine number of device ports.")
p.terminate(True)
sys.exit(1)
print("Number of device ports:", numPorts)
# Terminate the CLI session
p.sendline("logout")
time.sleep(.500)
p.wait()
skipPorts = False
devicePort = 1
pList = []
if numPorts == 24 or numPorts == 40:
# Adjust port numbering for SLC8024 and SLC8040
skipPorts = True
numPorts = numPorts + 8
# Loop through device ports, connect and try to detect the prompt
while devicePort <= numPorts:
if skipPorts and devicePort >= 9 and devicePort <= 16:
devicePort = devicePort + 1
pList.append('')
continue
print("Scanning device port", devicePort, "...")
port = str(devicePort)
p=pexpect.spawn('portsession', ['-p', port])
# Login (if required), and wait for the first prompt
p.sendline("")
gotPrompt = False
slcDevice = False
cnt = 1
while not gotPrompt:
i = p.expect([pexpect.TIMEOUT, pexpect.EOF,

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Lantronix SLC 8048 and is the answer not in the manual?

Lantronix SLC 8048 Specifications

General IconGeneral
BrandLantronix
ModelSLC 8048
CategorySwitch
LanguageEnglish

Related product manuals