|
Communicating with serial port connected devices
There are a number of ways that Users and Administrators can access serial console devices that are attached to the Opengear console server. In general all connections to the console server (and to attached Managed Devices) should be set up securely using SSH (particularly if connecting over the Internet or any other public network).
- The recommended method for accessing devices through the console server is to use SDTConnector (refer faq 265)
- Alternately the User and Administrator can use other secure SSH tools and be securely port-forwarded through the console server to the serial device (refer faq 237)
If the console server Telnet access has been enabled on the Serial & Network: Serial Port menu for a particular serial port, then any Administrator (and any User who has been granted access rights) can access the device on that serial port.
There are a number of paths the user (i.e. an Administrator or any authorized User) can take to Telnet connect to a serial device:
- One is simply to Telnet through the console server to the serial device:
- Users can run Telnet directly from their Linux/ UNIX shell or from the Windows command prompt or they can use freeware software like PUTTY or a commercial alternative
- The Telnet port address is IP Address - Port (2000 + serial Port #). So to connect to a Managed Device on Port 1, enter the console server's IP address as the 'Host Name (or IP address),' select 'Telnet' as the protocol and set the 'TCP port' to 2001 i.e. 2000 plus the physical serial port number. Then click the 'Open' button and you will be presented with the login prompt from the remote Managed Device:
The user can also Telnet to console server and connect directly through to the serial port with any console server login at all. For this "Unauthenticated Telnet" the default port address is IP Address _ Port (6000 + serial port #) i.e. 6001 - 6048. This mode is mainly used when you have an external system such as conserver managing user authentication and access privileges at the serial device level.
- When users are Telnet connected to Managed Devices they can also control the power connection to the Managed Device from the command line using a hot key (refer faq 314)
- However the communications from the user's computer to the console server are unencrypted so this is recommended only for a local connection
- The recommended method is to have the Telnet software on the user's computer connect securely using an SSH tunnel through the console server - as provided by SDTConnector (refer faq 265)
- Alternately the user can also communicate directly with devices attached to the serial ports from within the Management Console using the embedded jcterm java vt100 terminal client.
- To activate this feature select Manage: Terminal and you will be asked for username/password
- To access the serial port device console you will need to append :serial# to the username. So if your console server IP is 192.168.252.202 and you wish to access port 2 as user named "admin" you'd enter "admin:2@192.168.252.202"
- Alternately if you login with a regular username the java terminal will load and you can access the console server's command line by selecting File -> Open SHELL Session from the menu
- It is possible to log into the console server at the command line and use port communications commands such as pmchat to dialog directly with serially attached devices.
pmchat acts similar to the standard Linux chat command however all serial port access is directed via the portmanager. For example to run a chat script via the portmanager:
# pmchat -v -f /etc/config/scripts/port08.chat < /dev/port08
More information on using chat (and pmchat) is available on the UNIX man pages
Once you have connected to the serial console on the attached Managed Device you follow the device vendors instructions. For example you may wish to use specific escape codes for controlling a serially connected power strip (such as Dataprobe CP-815).
The CP-815 allows direct computer control using simple ASCII strings. To access the CP-815 for code control enter the commands as shown below. The syntax for all commands use the following:
EsC The Escape Character (Decimal 27 Hex 1B) The Security Code (Default = PASS) The Outlet Number The Enter Key (Decimal 13 Hex D)
Turn On EsCON
Turn Off EsCOFF
Cycle Outlet EsCC
Query Status EsC?
Escape Code Responses
CP-815 will confirm receipt of switching commands. The CP-815 will reportback: n Indicating the outlet (number 'n') has been changed and will be ON, OFF, CYCLE or NONE. None indicates no outlet present (e.g. outlets 5-8 of the CP-415).
The Query command returns the status of all 8 outlets:
1 ON
2 OFF
3 CYCLE
4 ON
5 NONE
6 NONE
7 NONE
8 NONE
Escape Code Examples
Send Command CP-815 Action CP-815 Response EsCPASS1ON Turn On Outlet 1
1 ON EsCPASS3C Reset Outlet 3 3 OFF CYCLE EsCPASS? Query Status 1 ON
2 ON
3 OFF
4 ON
5 ON
6 OFF
7 ON
8 ON
For complete Dataprobe manual go to www.dataprobe.com/support/manuals/pwr/cp815.pdf
|