5 Replies Latest reply: Sep 8, 2009 12:50 PM by user4994457 RSS

    Linux box to Solaris box via 1-way serial feed. Help.

    807567
      I'm trying to get a 1 way serial feed working and having a hard time.

      Configuration:

      PC running Centos 4.7 32bit
      Nextcom Vigor Ultra III running Solaris 10
      Both connected with blackbox mini-fiber drivers
      Fiber connected to output on PC side and input on Sun side.
      Ports on both sides setup for 9600 8,n,1

      We have a program on the Linux (PC) side that writes to the /dev/ttyS0 port and a program on the Sun side reading from ttya. Data is coming in garbled. I know the data is coming in to the Sun ok since I did a quick test and connected to another Linux box and did a cat on the /dev/ttyS0 port. Everything fine..data clean and readable.

      I've tried every combination of turning on/off ttya parameters using eeprom and using SMC to modify ttya. I notice there were a couple of discrepencies on the two machines when comparing output from stty -a </dev/ttya (Sun side) and stty -a </dev/ttyS0 (Linux side). For example the Linux side shows "-clocal" while the sun side shows "clocal". I was going to attempt to match up the "com" parameters by setting something like `stty clocal </dev/ttya`. That doesn't seem to work (i.e. -clocal remains unchanged). I don't know if I am even going down the right road.

      Would REALLY appreciate any help. No Labor Day weekend for me, so if you have a hint, please post.

      m
        • 1. Re: Linux box to Solaris box via 1-way serial feed. Help.
          807567
          To add a little more info and what else I have done:

          Note: This works perfectly from Linux to Linux. When I cat out /dev/ttyS0 on a receiving Linux box, the data is uncorrupted.

          I have played with ALL of the eeprom tty settings as well as the basic settings you can change using SMC. So, I've decided to look into whats available through stty.

          Here are the settings from the Linux and Solaris boxes.

          ===============
          Linux
          ===========
          speed 9600 baud; rows 0; columns 0; line = 192;
          intr = ^W; quit = M-^?; erase = M-7; kill = M-t; eof = O; eol = <undef>;
          eol2 = ;; swtch = M- ; start = ^\; stop = >; susp = <undef>; rprnt = <undef>;
          werase = <undef>; lnext = ; flush = <undef>; min = 0; time = 82;
          -parenb -parodd cs8 hupcl -cstopb cread clocal crtscts -cdtrdsr
          -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
          -iuclc -ixany -imaxbel -iutf8
          -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
          -isig -icanon -iexten -echo -echoe -echok -echonl noflsh -xcase tostop echoprt
          -echoctl -echoke

          ===========
          Solaris
          ===========
          speed 9600 baud;
          rows = 0; columns = 0; ypixels = 0; xpixels = 0;
          csdata ?
          eucw 1:0:0:0, scrw 1:0:0:0
          intr = ^c; quit = ^\; erase = ^?; kill = ^u;
          eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
          start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
          rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
          -parenb -parodd cs8 -cstopb -hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
          -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
          ixon -ixany -ixoff imaxbel
          isig icanon -xcase echo echoe echok -echonl -noflsh
          -tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
          opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3

          I have tried changing all the parameters starting at parenb on the Linux side to match the Solaris side. Ex. stty -clocal </dev/ttyS0. Still no joy.

          I really need to get this problem solved, so if any experts out there have some ideas, please post.

          thanks,
          Mike
          • 2. Re: Linux box to Solaris box via 1-way serial feed. Help.
            807567
            You mean I can't even coax some help out of the experts here for 10 Duke Stars? :)
            • 3. Re: Linux box to Solaris box via 1-way serial feed. Help.
              807567
              Disregard, I have solved the problem. No Duke Stars for you :-P
              • 4. Re: Linux box to Solaris box via 1-way serial feed. Help.
                Robert Cohen
                And the answer was?
                • 5. Re: Linux box to Solaris box via 1-way serial feed. Help.
                  user4994457
                  hawaiimike wrote:
                  I have played with ALL of the eeprom tty settings
                  The eeprom settings are for the ports when no operating system drivers are in control. For the most part they are ignored once Solaris is running.
                  as well as the basic settings you can change using SMC. So, I've decided to look into whats available through stty.
                  What's the app? Can it set the port parameters directly? Many port settings will drop back to default if no process holds the port open.
                  I really need to get this problem solved, so if any experts out there have some ideas, please post.
                  There's a lot of folks that aren't reading items over the weekend! :-)

                  --
                  Darren