Black Box NBS008A manual Programming Tips for Using the RS-232 Terminal Commands, Background

Page 20

Chapter 5: Operation

 

 

 

Table 5-2 (Continued). Commands.

 

 

 

Command

Response

Switch Action

 

 

 

 

set port 8

A

Port 8 set to A

COMMON Port 8 will be connected to A Port 8, all other COMMON port connections will remain as is.

 

 

 

 

set port 8

B

Port 8 set to B

COMMON Port 8 will be connected to B Port 8, all other COMMON port connections will remain as is.

 

 

 

get version 1

Rack 1 Version NBS008s Rev. A

No switching action taken.

 

 

 

 

help

 

See Table 5-1.

No switching action taken.

 

 

 

 

exit

 

Goodbye

Exits terminal mode.

 

 

 

 

Programming Tips for Using the RS-232 Terminal Commands

This section applies to switches WITHOUT an Ethernet Module installed (NBS004A, NBS006A, NBS008A, NBSALL8, or NBS016 models only), and is intended for programmers who want to control the switch in an automated environment using a computer.

BACKGROUND:

When first energized, the switch provides a special rack-to-rack interface at the GANG IN connector, which operates at 2400, N, 8, 1. When the switch receives a 1200 baud SPACE character, it detects a framing error with null data. This causes it to enter “Terminal” mode and to automatically change its data rate to 1200 bps. The switch indicates that is has entered terminal mode by displaying a prompt character (“>”, ASCII HEX 0x3E). It then stays in terminal mode, until it receives the “exit” command, or detects 2400 baud characters.

While in terminal mode, the switch echoes the received characters and collects them into a buffer until it receives a carriage return character. The carriage return is echoed and then the switch begins to process the received command. Any characters received while it is processing the command are ignored. When the command is processed, the switch responds, followed by a prompt character, indicating that it is ready to receive another command. If the switch gets a command that is intended for another switch, it passes that command out the GANG OUT port, and waits up to three seconds for a response. If it does not get a response, it responds “No Response,” followed by a prompt.

PROGRAMMING:

First, your program must set its RS-232 COM port to 1200, N, 8, 1.

Since the switch may be in rack-to-rack interface mode, your program should force the switch into terminal mode. This can be done by sending a SPACE character, followed by a carriage return character. If the switch is in rack-to-rack interface mode, the SPACE character will cause it to go into Terminal mode, and will then respond with a prompt character. The carriage return will then cause it to respond with “Invalid Command,” followed by another prompt character. If the switch was already in terminal mode, then it will simply respond “Invalid Command,” followed by a prompt character.

Now that the switch is in terminal mode, your program can issue other commands, but must wait for the switch to issue the prompt character (“>”, ASCII HEX 0x3E) before sending each new command.

If the switch loses power, it will reset itself when power is restored and come back up in the rack-to-rack interface mode. You may want to include an error recovery routine in your program that tries to force terminal mode if your program does not receive a response from the switch. In applications where your program will issue commands very infrequently, you may find it useful to force terminal mode before every command in case the switch has lost power since your last command.

Page 20

724-746-5500 blackbox.com

NBS008A

Image 20
Contents Pro Switching System 4 Network Backup Switches Trademarks Used in this Manual Trademarks Used in this ManualFCC and IC RFI Statements NOM Statement Table of Contents Specifications SpecificationsOverview Overview IntroductionAvailable Models What’s IncludedBack panel components Hardware DescriptionNBS008MA, NBSALL8, NBSALL8MGR, NBS016A, NBS016MA Front Panel of NBS004A, NBS004MA 16 17Front Panel of NBS006A, NBS006MA NBS006A, NBS006MA NBS006A, NBS006MA front panel componentsFront Panel of NBS008A, NBS008MA, NBSALL8, NBSALL8MGR Front Panel of NBS016A, NBS016MA Configuration ConfigurationDIP switch SW1 and SW2 settings RJ-11 GANG-OUT port pin assignment Installation InstallationOperation Manual SwitchingOperation Example Port 12 in rack 3 has port address Programming Programming Tips for Using the RS-232 Terminal CommandsBackground R6000 Console Commands Getset Pingreply ON/OFF Getset Snmpenable ON/OFFGetset Monitormac X X X X X X X = HEX Chars Getset Alerttype TRAP/SYSLOGAuto failover and manual recovery Operation Ethernet Network Interface Setup Ethernet Network Interface Setup Console Commands Console CommandsGET ALL GET VersionGET Power N SET System ABGET Rack N SET Rack N ABSET Snmpenable Onoff GET Snmpenable SET Webenable Onoff GET WebenableGET Webpassword SET Ipaddress GET IpaddressGET Webtimeout SET Telnetenable Onoff GET TelnetenableGET Telnetpassword GET TelnettimeoutSET Authenticationtrap Onoff GET Authenticationtrap SET Monitormac X X X X X GET MonitormacSET Monitorinterval N GET Monitorinterval SET Monitorfailcount N GET MonitorfailcountSET Adminip N GET Adminip NGET Alerttype SET Manager NReset SET DefaultsR6000 Console Commands GET Getset Webenable ON/OFFSET Save settings for next startupRestart use after Save Web Interface Web InterfaceWeb Interface MIB Path Summary and Trap Definitions MIB Path Summary and Trap DefinitionsAbRackGangPort-1.3.6.1.4.1.9477.1.4.2.1.2.RackIndex AbRackKeyStat-1.3.6.1.4.1.9477.1.4.2.1.3.RackIndexMIB Path Summary and Trap Definitions MIB Path Summary and Trap Definitions Syslog Messages Syslog MessagesSyslog Messages Blackbox.com Black Box Tech Support FREE! Live /7