Forum Mac Os X server

Forum francophone sur les technologies serveur d'Apple
AccueilAccueil  FAQFAQ  RechercherRechercher  S'enregistrerS'enregistrer  MembresMembres  GroupesGroupes  Connexion  

Partagez | 

 utiliser le port série dans leopard server

Voir le sujet précédent Voir le sujet suivant Aller en bas 

Nombre de messages : 442
Localisation : Nantes_Fr
Date d'inscription : 13/11/2005

MessageSujet: utiliser le port série dans leopard server   Mer 5 Mar - 18:10

petit article décrivant comment avoir accès au port série dans Leopard Server
utile dans bien des cas (router cisco, par exemple…)

in english pour une fois ;-)

Having a pressing need to access a Cisco router via the console cable, and not having a PC with a serial port laying around anywhere, I decided to look into how to access the serial port on an Xserve that's running Leopard Server. Previous hints targeted at Tiger Server and below, however, do not work any more as the serial support files are no longer found in /System » Library » StartupItems/. Through some digging, I found the solution to the problem and can now access the router via the serial port at any time, even from my iPhone (through Terminal, of course)!

Leopard Server moved the SerialTerminalSupport shell script to /usr » libexec » serial. The syntax for launching it remains the same, though, just the location has changed. Thinking that was all it took, I stopped the SerialTerminalSupport service with this command (run all these commands as superuser):

/usr/libexec/serial/SerialTerminalSupport stop

And tried to launch the screen program to open a connection via the serial port with screen /dev/cu.serial. No luck. I see bits and pieces of the Cisco's console prompt in my Terminal window, but the screen session keeps sending garbage -- to the point where I'd have to close the Terminal window and issue a kill command to let go of /dev/cu.serial and the screen session.

It turns out that by default, OS X Server sets the baud rate of the serial port to 57600, which is too fast for the Cisco console port.

The magic file to change to fix this problem is /etc/gettytab. Open that file up in your favorite editor and do a search for Xserve. Comment out the three lines beginning with:

serial.57600|serial db9 port:

Save the file and reboot. To verify that the change was correct, you can check info on /dev/cu.serial with:

stty -f /dev/cu.serial

If the first line says speed 9600 baud;, you are good to go. Simply stop SerialTerminalSupport and launch screen with the above command. I wrote a simple shell script to correctly launch screen. For the sake of putting it all together, here it is:

#! /bin/sh

/usr/libexec/serial/SerialTerminalSupport stop
screen /dev/cu.serial
To quit cleanly out of screen, type Control-A followed by Control-. (period). You'll be prompted to quit; type y and you'll be back at your regular shell. Hope this hint helps someone out there, not that you need to use it every day, but it can be a lifesaver just that once. I know it worked for me.

Revenir en haut Aller en bas
Voir le profil de l'utilisateur
utiliser le port série dans leopard server
Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1
 Sujets similaires
» [Administration] Pouvoir utiliser certaines variables des templates dans les pages HTML
» UTILISER Mapsource comme cartographie dans Poiedit
» plus moyen d'utiliser le html dans le PA
» Utiliser le bbCode dans les profils
» [Résolu] Texte impossible dans Outlook Express

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Forum Mac Os X server :: Services réseau-
Sauter vers: