Announcement

Collapse
No announcement yet.

Serial Terminal HELP ME!!!!

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Serial Terminal HELP ME!!!!

    I acquired an IBM 3151 from work that wasn't in use. I found that it had parallel-esque ports on the back that converted to RJ45 serial, then to male 3pin serial (db9 compat). Anyway, I bought a converter for the male to connect to the male port on my Linux box, and set to work trying to configure it (which I thought was a plug'n'play deal, haha, ****). Anyway, I've tried all manner of getties and cannot get it to work, and have found many references to /etc/inittab which doesn't exist, as upstart has replaced it. I tried copying the tty1 entry to ttyS0 and changing accordingly for upstart, to no avail. How do I get this stupid serial console working, and am I going to need to crossover the pins (or are they already?)...

    Plz!

    (PS@moderators: I wasn't entirely sure whether to post this as boot, software, network, or hardware, but since I am having the most trouble configuring kubuntu for it I chose software. If you feel it'd be more approprate or get answered quicker elsewhere, by all means please move it!)

    #2
    Re: Serial Terminal HELP ME!!!!

    It really belongs in hardware, but everyone who reads and helps in hardware is in here too. :P

    Anyway, what happens if you do "getty /dev/ttyS0"? (If you're not sure it's ttyS0, try also S1.)
    For external use only.

    Comment


      #3
      Re: Serial Terminal HELP ME!!!!

      Code:
      raven@Blackwing:~$ getty /dev/ttyS0
      Usage: getty [-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] baud_rate,... line [termtype]
      or   [-hiLmw] [-l login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,... [termtype]
      raven@Blackwing:~$
      Apparently improper syntax.. I used alien to get agetty installed, and it listens (I think..) but doesn't give me a prompt. All my 3151 ever does is one of three things when I turn it on:
      80% of the time it comes up with a blinking cursor, I think this means its looking for a connection.
      15% of the time it'll say "there is a problem in the keyboard"
      5% of the time it'll say "there is a problem in the video or keyboard"

      I dunno why it'd do the last two, but either way no logins ever...

      I tried inittab, upstart, agetty, mingetty, getty, mgetty... I can't figure it out. Its quite possible I'm doing everything wrong however, as I've never configured a serial terminal.

      Comment


        #4
        Re: Serial Terminal HELP ME!!!!

        If I type
        Code:
        raven@Blackwing:~$ agetty /dev/ttyS0 9600
        
        raven@Blackwing:~$
        That space will sit like a listening program until I ctrl+c it.. The cursor blinks on the terminal still.

        The machine only has 1 serial port btw, so I'm pretty sure its S0... The PC does list two of them, and I've tried the above with S1...

        Edit:
        Again, if it weren't null-modemed would this be the symptom? It is well possible that the odd configuration of RJ45, DB25, and DE9 are not null-modemed, and I may have to buy a null-modem adapter (god forbid, another $10 at radio shack O.o). Anyway, if ne1 knows much about serial hardware please look into that for me! I could be doing the software part right :P.

        Edit Again:
        I've got one of these:
        http://www.dealtime.com/xPF-Raritan-...ODULAR-ADAPTER
        Hooked upto the back of the unit,
        A Serial RJ45 Cable,
        Then...
        http://www.pccables.com/01911.htm
        Then a M->F serial adapter, then the PC's serial port. My hunch is that I should have gotten a DB-9F adapter instead of M, and that the null-modem-ness has become a straight-through because of this. Am I correct? It confuses me.

        Edit 3:
        Judging by various wiring diagrams for RJ45->DB-9M/F, I think that the wiring is the same and what I've done is valid. However, I'm still left with the fact that there's no login.

        Edit 4:
        I've tried echoing things into the connection, no luck. ps -t ttyS0 does return getty on the port, at least. My configuration appears to be correct. I was able to echo before rebooting, now I can't do that. It says permission issues, even when sudoing. BTW: I can't change the terminal's settings or look at them, there's no setup or etc. buttons on my keyboard as necessary.

        Comment


          #5
          Re: Serial Terminal HELP ME!!!!

          Here's a session of me messing with this. BTW: I enabled IrDA in the BIOS, disabling COM2 (which doesn't exist physically on my board anyway, cept as IrDA), so that's why ttyS0 is the only one in dmesg I think.
          Code:
          raven@Blackwing:~$ ps -t
          Warning: bad ps syntax, perhaps a bogus '-'? See [url]http://procps.sf.net/faq.html[/url]
           PID TTY   STAT TIME COMMAND
           5054 pts/0  Ss  0:00 -bash
           5070 pts/0  R+  0:00 ps -t
          raven@Blackwing:~$ ps -t ttyS0
           PID TTY     TIME CMD
           4146 ttyS0  00:00:00 getty
          raven@Blackwing:~$ date > /dev/ttyS0
          -bash: /dev/ttyS0: Permission denied
          raven@Blackwing:~$ sudo date > /dev/ttyS0
          -bash: /dev/ttyS0: Permission denied
          raven@Blackwing:~$ sudo date > /dev/ttyS0
          -bash: /dev/ttyS0: Permission denied
          raven@Blackwing:~$ cat /dev/ttyS0
          cat: /dev/ttyS0: Permission denied
          raven@Blackwing:~$ sudo date > /dev/ttyS0
          -bash: /dev/ttyS0: Permission denied
          raven@Blackwing:~$ date
          Mon Jul 2 20:24:02 EDT 2007
          raven@Blackwing:~$ date > /dev/ttyS0
          -bash: /dev/ttyS0: Permission denied
          raven@Blackwing:~$ date > /dev/ttyS1
          raven@Blackwing:~$ cat /dev/tty1
          cat: /dev/tty1: Permission denied
          raven@Blackwing:~$ cat /dev/tty1 > /dev/ttyS0
          -bash: /dev/ttyS0: Permission denied
          raven@Blackwing:~$ tty
          /dev/pts/0
          raven@Blackwing:~$ cat /dev/pts/0 > /dev/ttyS0
          -bash: /dev/ttyS0: Permission denied
          raven@Blackwing:~$ cat /dev/pts/0
          test
          test
          test
          test
          weee
          weee
          
          raven@Blackwing:~$ date
          Mon Jul 2 20:28:07 EDT 2007
          raven@Blackwing:~$ date
          Mon Jul 2 20:29:01 EDT 2007
          raven@Blackwing:~$ date > /dev/ttyS0
          -bash: /dev/ttyS0: Permission denied
          raven@Blackwing:~$ sudo
          usage: sudo -K | -L | -V | -h | -k | -l | -v
          usage: sudo [-HPSb] [-p prompt] [-u username|#uid]
                { -e file [...] | -i | -s | <command> }
          raven@Blackwing:~$ sudo -s
          Password:
          Sorry, try again.
          Password:
          root@Blackwing:~# date
          Mon Jul 2 20:29:22 EDT 2007
          root@Blackwing:~# date > /dev/ttyS0
          
          root@Blackwing:~# date > /dev/ttyS0
          
          root@Blackwing:~# date > /dev/ttyS1
          root@Blackwing:~# ps -t ttyS1
           PID TTY     TIME CMD
          root@Blackwing:~# ps -t ttyS0
           PID TTY     TIME CMD
           4146 ttyS0  00:00:00 getty
          root@Blackwing:~# dmesg | grep ttyS
          [ 90.574578] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
          [ 90.575079] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
          [ 90.576843] 00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
          root@Blackwing:~# cat /dev/ttyS1
          this is a test
          
          root@Blackwing:~# cat /dev/ttyS0
          this is a test
          hello
          root@Blackwing:~# cat /dev/ttyS1
          test
          
          root@Blackwing:~# cat /dev/ttyS0
          test
          
          
          root@Blackwing:~#
          All the while just a blinking box. There are two ports that the DB25 adapter fits onto in the back, and I alternated at points where you see doubles of commands up there.

          Comment


            #6
            Re: Serial Terminal HELP ME!!!!

            This may or may not be helpful, but I just noticed that in the "examples" section of the getty man page, it doesn't use /dev; only ttyS0 (i.e. where I wrote "/dev/ttyS0", it should be "ttyS0".)

            Also of interest may be the output of "ls -Al /dev/tty*".

            I'll look into it a little deeper tomorrow, it's a bit late here.

            (By the way, don't ask me for help on cabling, especially with all those connectors and adaptors going on. The most experience I have in that area is taking a whole pile of cables and connectors and hooking them all together. (Hey, I was six years old.))
            For external use only.

            Comment


              #7
              Re: Serial Terminal HELP ME!!!!

              I'm messing with it again, I figured out how to get to the terminal setup. It has all manner of setup options but I've got no idea what to put in there cept the 9600 baud rate I shoved assuming the terminal could handle it before.

              I reset defaults and tried ttyS0-4 with cat, date >, and getty (which btw needs a baud rate, I use 9600 for now, so its like "getty ttyS0 9600").. Nothing. I think its a bad setup or terminal, but I could still be wrong. If I'm not mistaken though, piping date into the terminal should do something almost always.

              Comment


                #8
                Re: Serial Terminal HELP ME!!!!

                I found a null modem cable in a closet that I'd looked in several times thinking it was a printer cable. Anyway, still no luck, but now I know there's not a cabling issue. Either the terminal is dead or it's misconfigured. I'm gonna scrap Kubuntu and put Debian on there if this doesn't work out soon, seeing as this was previously a desktop and is now being a terminal server. I'll check it out w/ freebsd in the meantime.

                Comment


                  #9
                  Re: Serial Terminal HELP ME!!!!

                  Should have posted earlier but oh well, FreeBSD same outcome, though I wasn't as good at configuring that. I didn't even get a getty on the tty, like i did in Kubuntu. However, still no login from either of them. On Thursday (or maybe tomarrow) I'll swap this terminal out for another I could get and see if it works. Otherwise I'll still need help.

                  Comment

                  Working...
                  X