Menu
A switch configuration backup does not archive the primary or secondary secrets for. CD-ROM Drive, RJ-45 Ethernet Port, RS-232 Serial Port (optional). V5.0.1b, v5.1.0; McDATA 4300, 4400, 4500,4700, ED6140; Firmware tested: 9.00.00.
Active3 years, 6 months ago
I have difficulties setting the serial port parameters.
Program that works fine on same device, leaves followings stty output:
Program that works fine on same device, leaves followings stty output:
![Mcdata 4500 Serial Port Settings Mcdata 4500 Serial Port Settings](http://bestprofilesate.review/zsqonezu/pic1132676sony%2Bdfs%2B800%2Bswitcher%2Bmanual.jpg)
my attempt goes like this:
I've tried setting speed both B1200 and B9600 but that didn't work (in manual it says that should be B9600)
What is wrong in this options?
user5947486
kometonjakometonja
2 Answers
The
The result is that the serial port is in a half-raw mode for output.
stty
settings appear to be for raw mode, whereas your tcgetattr()
/tcsetattr()
code tries to use non-canonical mode but is incomplete for output processing (OPOST is not cleared).The result is that the serial port is in a half-raw mode for output.
Try using
cfmakeraw()
to setup non-canonical mode.cfmakeraw() sets the terminal to something like the 'raw' mode of the old Version 7 terminal driver: input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows:
For working sample code see this.
Note that the return codes from system calls during initialization are checked.
Note that the return codes from system calls during initialization are checked.
Community♦
sawdustsawdust11.4k11 gold badge2727 silver badges4040 bronze badges
You should try
one by one if you dont know which baudrate to set....
Chirag DesaiChirag Desai
Not the answer you're looking for? Browse other questions tagged clinuxserial-port or ask your own question.
Active6 years, 2 months ago
I have always use a serial to serial port or serial to usb to connect to switches. Normaly they came with RJ45 to usb cable in cases when I had a RJ45 cable to serial. But now I have 3Com switch that apparently only came with Serial to RJ45 cable I have no idea how to use it. I use the command screen /dev/ttysS0 or /dev/ttyUSB to connect to the switch, how am I supposed to called to the ethernet port, should I give it an IP address. Or I need an Rj45 to USB cable.
![How to change serial port settings How to change serial port settings](http://www.serverhome.nl/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/4/5/4500.jpg)
Juan DiegoJuan Diego
2 Answers
Usually, a professional switch has either a 9-pin serial port or an 8P8C port for dedicated console access.
The 9-pin port can be directly converted to the 8P8C port, for example by using this converter:
Once you have the 9-pin connection, you can use a standard USB-to-Serial cable to connect to it.
The important part to remember is that a 8P8C console port is completely different from a RJ45 network port.
Luc van DonkersgoedLuc van Donkersgoed
There is a lot of commonality between switches, but you will almost always get the best information about how to connect, by looking up the guide/manual for the specific model/make of the equipment you are using. Sometimes vendors change things. Or they have non-standard equipment since company got merged/purchased with another. 3Com was acquired by HP, but that doesn't automatically make 3Com gear follow the HP standards.
The Getting Started Guide for your switch has all the details you should need to connect.
From the guide:
Connecting the Workstation to the Switch
- Connect the workstation to the console port using a standard null modem cable
- Open your terminal emulation software and configure the COM port settings to which you have connected the cable. The settings should be set to match the default settings for the Switch, which are:
- 19,200 baud
- 8 data bits
- no parity
- 1 stop bit
- no hardware flow control
115k3131 gold badges239239 silver badges386386 bronze badges