Terminating cat and other processes via serial port terminal

We have an embedded QNX 4.25 system that we communicate with via ser1. When
I need to create small files I use the cat command (analogous to the ‘copy
con’ command in DOS, where ^z terminates the copy) as follows:

cat - > filename[return]
the string
more strings
^\

The ctrl-backslash (the FS character, 0x1C) normally quits the cat program,
which terminates the redirection and closes the file. (Can use ^C from the
console but does not work via the serial port.) Normally, when it works, I
get a line:

%l <the word “Quit”> and <“cat - l>filename”>

This works on our embeded SBC with a hard disk and full QNX install. Now we
are using just a 2 M flash and an 8 M disk-on-chip, with a limited number of
utilities (but the full 103 K, 1998 ksh program) and the ^\ no longer
terminates (kills) cat. Anyone know why? Is ^\ a function of the shell, ksh?

I’ve thought of using the echo command with a string redirected to a
filename instead of cat, which does work. But why all of a sudden is ^\ not
working?

Thanks for any help.

Ed Schwartz

Previously, Edward Schwartz wrote in comp.os.qnx:

We have an embedded QNX 4.25 system that we communicate with via ser1. When
I need to create small files I use the cat command (analogous to the ‘copy
con’ command in DOS, where ^z terminates the copy) as follows:

cat - > filename[return]
the string
more strings
^

Try using ctrl-d instead.

The ctrl-backslash (the FS character, 0x1C) normally quits the cat program,
which terminates the redirection and closes the file. (Can use ^C from the
console but does not work via the serial port.) Normally, when it works, I
get a line:

%l <the word “Quit”> and <“cat - l>filename”

Ctrl-\ is new to me. I don’t know what it’s intended for, but I don’t think this is the proper use of it. I tried it on Linux and beside closing the input to cat, it also generated a core dump(!)

  • Pete

Pete, thanks for the suggestion but I’ve already tried every ctrl character
on the keyboard. Nothing works. ^\ must be an undocumented command??? By the
way, if I have console (keyboard and monitor) connected, ^\ sitll does not
work, but ^c does. And it’s not just cat that can’t be terminated by ^. I
also use it for terminating other programs.

(If I type ^s, everything I type is not echoed to the terminal until I type
^q. Then everything I’ve typed since typing ^s is dumped to the screen. ^d
does not seem to do anything.)

Did you try ^\ on QNX? Does it work for you?

Thanks for the help. Anyone else have any info?

Ed Schwartz

Pete DiMarco <peted.NOSPAM@NOSPAM.ifsreg.com> wrote in message
news:Voyager.001115114052.162B@node1…

Previously, Edward Schwartz wrote in comp.os.qnx:
We have an embedded QNX 4.25 system that we communicate with via ser1.
When
I need to create small files I use the cat command (analogous to the
‘copy
con’ command in DOS, where ^z terminates the copy) as follows:

cat - > filename[return]
the string
more strings
^\

Try using ctrl-d instead.

The ctrl-backslash (the FS character, 0x1C) normally quits the cat
program,
which terminates the redirection and closes the file. (Can use ^C from
the
console but does not work via the serial port.) Normally, when it works,
I
get a line:

%l <the word “Quit”> and <“cat - l>filename”

Ctrl-\ is new to me. I don’t know what it’s intended for, but I don’t
think this is the proper use of it. I tried it on Linux and beside closing

the input to cat, it also generated a core dump(!)

  • Pete

Check the difference in the port settings:
stty < /dev/ser1
stty < /dev/con1
for special handling of the control characters…
Are you changing the default setting for /dev/ser1 in any way?
-Paul

Edward Schwartz <edward.schwartz@l-3com.com> wrote in message news:8uucc1$g6j$1@inn.qnx.com

We have an embedded QNX 4.25 system that we communicate with via ser1. When
I need to create small files I use the cat command (analogous to the ‘copy
con’ command in DOS, where ^z terminates the copy) as follows:

cat - > filename[return]
the string
more strings
^\

The ctrl-backslash (the FS character, 0x1C) normally quits the cat program,
which terminates the redirection and closes the file. (Can use ^C from the
console but does not work via the serial port.) Normally, when it works, I
get a line:

%l <the word “Quit”> and <“cat - l>filename”

This works on our embeded SBC with a hard disk and full QNX install. Now we
are using just a 2 M flash and an 8 M disk-on-chip, with a limited number of
utilities (but the full 103 K, 1998 ksh program) and the ^\ no longer
terminates (kills) cat. Anyone know why? Is ^\ a function of the shell, ksh?

I’ve thought of using the echo command with a string redirected to a
filename instead of cat, which does work. But why all of a sudden is ^\ not
working?

Thanks for any help.

Ed Schwartz

No differences. Remember, the ^\ works on the full-install hard disk system,
but not on the DOC (disk-on-chip) system.

Here is the line in sysinit.1 for Dev.ser:

Dev.ser -b 38400 3f8,4 -b 9600 2f8,3 &

(The problem is in ser1.)

Here are the tinit lines, one for con1 and the other for ser1 (which starts
a modem utility which detects 5 rings and execs to login. When you logout or
after the 15 minute inactivity, tinit restarts modem.)

tinit -c “login serial” -T /dev/con* -t /dev/con1 &
tinit -c “/usr/narda/bin/narda_modem -b 38400 -r 5 -L -c “login
serial”” -m 15 -t /dev/ser1 &

Is there any [proper] way to end cat? ^c is a system termination command.
Can you also verify that if you just type cat then type ^. Does cat
terminate?

Thanks,

Ed Schwartz


Paul Russell <paul@jenosys.com> wrote in message
news:8uuri4$19m$1@inn.qnx.com

Check the difference in the port settings:
stty < /dev/ser1
stty < /dev/con1
for special handling of the control characters…
Are you changing the default setting for /dev/ser1 in any way?
-Paul

Edward Schwartz <> edward.schwartz@l-3com.com> > wrote in message
news:8uucc1$g6j$> 1@inn.qnx.com> …
We have an embedded QNX 4.25 system that we communicate with via ser1.
When
I need to create small files I use the cat command (analogous to the
‘copy
con’ command in DOS, where ^z terminates the copy) as follows:

cat - > filename[return]
the string
more strings
^\

The ctrl-backslash (the FS character, 0x1C) normally quits the cat
program,
which terminates the redirection and closes the file. (Can use ^C from
the
console but does not work via the serial port.) Normally, when it works,
I
get a line:

%l <the word “Quit”> and <“cat - l>filename”

This works on our embeded SBC with a hard disk and full QNX install. Now
we
are using just a 2 M flash and an 8 M disk-on-chip, with a limited
number of
utilities (but the full 103 K, 1998 ksh program) and the ^\ no longer
terminates (kills) cat. Anyone know why? Is ^\ a function of the shell,
ksh?

I’ve thought of using the echo command with a string redirected to a
filename instead of cat, which does work. But why all of a sudden is ^
not
working?

Thanks for any help.

Ed Schwartz
\

edward.schwartz@l-3com.com (Edward Schwartz) wrote in

Is there any [proper] way to end cat? ^c is a system termination command.
Can you also verify that if you just type cat then type ^. Does cat
terminate?

If you’re using qtalk I’ve found that doing a Ctrl-A (brings up the qtalk
menu) then a ‘b’ issues a break command which has the same effect as Ctrl-C
at the console.

No, ^ab does not work. I’m not using qtalk. Just a tinit (terminal init) on
ser1, so my PC is acting like a dumb terminal on ser1. I have ‘TERM=qnx’ in
…profile, by the way.

I appreciate your (or anyone’s) suggestions. I’ve tried every ctrl-key
character, but obviously, not every 2 or more character sequence.

Is this is the responsibility of ksh or of Dev.ser to intercept a character
and generate a system SIGQUIT? Does anyone have or know where to get the
source code for the above or anything else that might be relevant?

Thank you,

Ed Schwartz


Gregory Fedor <gfedor@grc.nasa.gov> wrote in message
news:8FEE567A5gfedorgrcnasagov@139.88.52.67

edward.schwartz@l-3com.com > (Edward Schwartz) wrote in
Is there any [proper] way to end cat? ^c is a system termination
command.
Can you also verify that if you just type cat then type ^. Does
cat
terminate?

If you’re using qtalk I’ve found that doing a Ctrl-A (brings up the qtalk
menu) then a ‘b’ issues a break command which has the same effect as
Ctrl-C
at the console.

One other thing to look at is the “Sigint Grp” and “Sghup pid” that stty
reports. If they do not point to the shell stated on that tty, then
the signal will not be delivered. Next obvious questions are “What
causes the mismatch?” and “How does one fix it?” I don’t remember the
answer to the first, and the only way I found to fix it was to slay and
restart the tinit & login (I think).

Richard

Edward Schwartz wrote:

No, ^ab does not work. I’m not using qtalk. Just a tinit (terminal init) on
ser1, so my PC is acting like a dumb terminal on ser1. I have ‘TERM=qnx’ in
.profile, by the way.

I appreciate your (or anyone’s) suggestions. I’ve tried every ctrl-key
character, but obviously, not every 2 or more character sequence.

Is this is the responsibility of ksh or of Dev.ser to intercept a character
and generate a system SIGQUIT? Does anyone have or know where to get the
source code for the above or anything else that might be relevant?

Thank you,

Ed Schwartz

Gregory Fedor <> gfedor@grc.nasa.gov> > wrote in message
news:8FEE567A5gfedorgrcnasagov@139.88.52.67
edward.schwartz@l-3com.com > (Edward Schwartz) wrote in
Is there any [proper] way to end cat? ^c is a system termination
command.
Can you also verify that if you just type cat then type ^. Does
cat
terminate?

If you’re using qtalk I’ve found that doing a Ctrl-A (brings up the qtalk
menu) then a ‘b’ issues a break command which has the same effect as
Ctrl-C
at the console.

I thank Paul Russel for pointing in the right direction, but questions still
remain. This ^\ is a function of stty. If I type:
stty quit=^\ </dev/ser1
then ^\ works.
Or if I type:
stty +edit </dev/ser1
it says kill = ^U but nothing about quit, but ^\ generates the quit.

Then even if I do a shutdown, the quit=^\ remains. If I power off for a
couple seconds (even short the +5 volts terminal to ground to discharge the
SBC) and re-power, the quit=^\ remains!!! When I powered off over night, I
lost the quit=^\ setting. It must remain in an uninitialized address in RAM
that takes a while to leak off.

If I do the stty +edit </dev/ser1 and then shutdown and type stty <
/dev/ser1 I get:
Name: //1/dev/ser1
Type: serial
Opens: 2 (RW)
Sigint Grp: 40, Sighup pid: 40
+edit
+osflow +ihflow +ohflow +lkhflow
quit=^\ start=^Q stop=^S min=01 time=00
par=none bits=8 stopb=1 baud=38400 rows=0,0
+DTR +RTS -BRK +cts +dsr -ri +cd ioport=3F8 irq=4

So here I loose the +edit settings and it goes back to when I typed stty
quit=^\ </dev/ser1.
I don’t know exactly what’s going on here.

However, I still cannot find any differences between the full install on our
system with a hard disk and our system with a minimal install on a 8 M
silicon disk-on-chip drive. Neither system has a stty command on ser1. I
certainly could put ‘stty quit=^\ </dev/ser1’ in sysinit.1, but I did not
have to with the hard disk unit.

Appreciate any more suggestions.

Ed Schwartz

Richard R. Kramer <rrkramer@kramer-smilko.com> wrote in message
news:3A1461DE.5A7AFE03@kramer-smilko.com

One other thing to look at is the “Sigint Grp” and “Sghup pid” that stty
reports. If they do not point to the shell stated on that tty, then
the signal will not be delivered. Next obvious questions are “What
causes the mismatch?” and “How does one fix it?” I don’t remember the
answer to the first, and the only way I found to fix it was to slay and
restart the tinit & login (I think).

Richard

Edward Schwartz wrote:

No, ^ab does not work. I’m not using qtalk. Just a tinit (terminal init)
on
ser1, so my PC is acting like a dumb terminal on ser1. I have ‘TERM=qnx’
in
.profile, by the way.

I appreciate your (or anyone’s) suggestions. I’ve tried every ctrl-key
character, but obviously, not every 2 or more character sequence.

Is this is the responsibility of ksh or of Dev.ser to intercept a
character
and generate a system SIGQUIT? Does anyone have or know where to get the
source code for the above or anything else that might be relevant?

Thank you,

Ed Schwartz

Gregory Fedor <> gfedor@grc.nasa.gov> > wrote in message
news:8FEE567A5gfedorgrcnasagov@139.88.52.67
edward.schwartz@l-3com.com > (Edward Schwartz) wrote in
Is there any [proper] way to end cat? ^c is a system termination
command.
Can you also verify that if you just type cat then type ^.
Does
cat
terminate?

If you’re using qtalk I’ve found that doing a Ctrl-A (brings up the
qtalk
menu) then a ‘b’ issues a break command which has the same effect as
Ctrl-C
at the console.

Try also “stty -all < /dev/ser1” to see all settings, including defaults
I’m uncertain if the defaults for serial are different for console…
Possibly Dev32.ansi and Dev32.ser differ in their defaults?
No reason for them to be 100% the same as devices have different attributes
i.e. no hardware flow control on /dev/con1

Other queries:
-Are your two installs from the same CD, QNX4.25_ ?
-Are you starting inputtrap or any other trap utilities that could be scanning
through i/o looking for devices and leaving a little history in its wake…
(nettrap, crttrap…)
-Have you compared the /etc/config/sysinit.N on the two systems?
-Have you done [sin info], [sin irqs], etc on each system?
-Do the systems have PCI? If so have the resources for com1/com2
been set in BIOS? Have the IRQs been set as Auto, ISA, or PCI?
-What else are you starting on the serial lines, I didn’t recognize the modem driver…
Possibly some other program is having some effect…
Each of your lines runs different things on the consoles/ports that
would reconfigure the ports…
tinit -c “login serial” -T /dev/con* -t /dev/con1 &
tinit -c “/usr/narda/bin/narda_modem -b 38400 -r 5 -L -c “login serial”” -m 15 -t
/dev/ser1 &
Maybe you should remove the Modem entry for the /dev/ser1, and only start login. The using
direct serial, say qtalk from another machine via null cable, try it. Maybe narda_modem(???) is
doing something to the ports settings? Do you need narda_modem?

Try

  • In your sysinit.N near the top just after Dev.ansi and Dev.ser startup, and before tinit
    or any other effects on the ports/consoles, insert the lines:
    (-all may not be necessary, but for completeness…)
    stty -all < /dev/con1 > /home/root/stty_con1a.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1a.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2a.txt
    And then just at the very end of sysinit.N, after tinit etc… put
    stty -all < /dev/con1 > /home/root/stty_con1b.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1b.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2b.txt

And then after booting up have great fun comparing all the differences…
diff /home/root/stty_con1a.txt /home/root/stty_con1b.txt
diff /home/root/stty_ser1a.txt /home/root/stty_ser1b.txt
diff /home/root/stty_ser2a.txt /home/root/stty_ser2b.txt

diff /home/root/stty_ser1a.txt /home/root/stty_ser2a.txt
diff /home/root/stty_ser1b.txt /home/root/stty_ser2b.txt

So many different machines/motherboards, so many BIOSs and how they assign
resources. We’re using Laptops, old 486’s for testing, PII’s and PIII’s,
and they’re all just enough different to make it… interesting…

And as asked in many threads - what are you trying to do? (Maybe there’s another way…)
-Paul


Edward Schwartz <edward.schwartz@l-3com.com> wrote in message news:8v3gm7$nvp$1@inn.qnx.com

I thank Paul Russel for pointing in the right direction, but questions still
remain. This ^\ is a function of stty. If I type:
stty quit=^\ </dev/ser1
then ^\ works.
Or if I type:
stty +edit </dev/ser1
it says kill = ^U but nothing about quit, but ^\ generates the quit.

Then even if I do a shutdown, the quit=^\ remains. If I power off for a
couple seconds (even short the +5 volts terminal to ground to discharge the
SBC) and re-power, the quit=^\ remains!!! When I powered off over night, I
lost the quit=^\ setting. It must remain in an uninitialized address in RAM
that takes a while to leak off.

If I do the stty +edit </dev/ser1 and then shutdown and type stty
/dev/ser1 I get:
Name: file://1/dev/ser1
Type: serial
Opens: 2 (RW)
Sigint Grp: 40, Sighup pid: 40
+edit
+osflow +ihflow +ohflow +lkhflow
quit=^\ start=^Q stop=^S min=01 time=00
par=none bits=8 stopb=1 baud=38400 rows=0,0
+DTR +RTS -BRK +cts +dsr -ri +cd ioport=3F8 irq=4

So here I loose the +edit settings and it goes back to when I typed stty
quit=^\ </dev/ser1.
I don’t know exactly what’s going on here.

However, I still cannot find any differences between the full install on our
system with a hard disk and our system with a minimal install on a 8 M
silicon disk-on-chip drive. Neither system has a stty command on ser1. I
certainly could put ‘stty quit=^\ </dev/ser1’ in sysinit.1, but I did not
have to with the hard disk unit.

Appreciate any more suggestions.

Ed Schwartz

The defaults seem to be the same for the console and ser1.
We use the same Dev32.ser on the HD and the DOC.
Both are QNX 4.25.
Sin info are same. irqs a little different. I’ll analyze it more Monday.
No PCI.
The narda_modem is just a small change to the modem utility so our programs
can tell if it is running or not.
When we boot the same SBC off the HD, the quit=^\ is there, but not when
booted off the flash.
Right now I put “stty quit=1C < /dev/ser1” in my sysinit.1 as an insurance.
That works!
Will try the things you suggested Monday.
Thanks again for the help.
Regards,
Ed Schwartz


Paul Russell <paul@jenosys.com> wrote in message
news:8v45hg$efj$1@inn.qnx.com

Try also “stty -all < /dev/ser1” to see all settings, including defaults
I’m uncertain if the defaults for serial are different for console…
Possibly Dev32.ansi and Dev32.ser differ in their defaults?
No reason for them to be 100% the same as devices have different
attributes
i.e. no hardware flow control on /dev/con1

Other queries:
-Are your two installs from the same CD, QNX4.25_ ?
-Are you starting inputtrap or any other trap utilities that could be
scanning
through i/o looking for devices and leaving a little history in its
wake…
(nettrap, crttrap…)
-Have you compared the /etc/config/sysinit.N on the two systems?
-Have you done [sin info], [sin irqs], etc on each system?
-Do the systems have PCI? If so have the resources for com1/com2
been set in BIOS? Have the IRQs been set as Auto, ISA, or PCI?
-What else are you starting on the serial lines, I didn’t recognize the
modem driver…
Possibly some other program is having some effect…
Each of your lines runs different things on the consoles/ports that
would reconfigure the ports…
tinit -c “login serial” -T /dev/con* -t /dev/con1 &
tinit -c “/usr/narda/bin/narda_modem -b 38400 -r 5 -L -c “login
serial”” -m 15 -t
/dev/ser1 &
Maybe you should remove the Modem entry for the /dev/ser1, and only
start login. The using
direct serial, say qtalk from another machine via null cable, try it.
Maybe narda_modem(???) is
doing something to the ports settings? Do you need narda_modem?

Try

  • In your sysinit.N near the top just after Dev.ansi and Dev.ser startup,
    and before tinit
    or any other effects on the ports/consoles, insert the lines:
    (-all may not be necessary, but for completeness…)
    stty -all < /dev/con1 > /home/root/stty_con1a.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1a.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2a.txt
    And then just at the very end of sysinit.N, after tinit etc… put
    stty -all < /dev/con1 > /home/root/stty_con1b.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1b.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2b.txt

And then after booting up have great fun comparing all the differences…
diff /home/root/stty_con1a.txt /home/root/stty_con1b.txt
diff /home/root/stty_ser1a.txt /home/root/stty_ser1b.txt
diff /home/root/stty_ser2a.txt /home/root/stty_ser2b.txt

diff /home/root/stty_ser1a.txt /home/root/stty_ser2a.txt
diff /home/root/stty_ser1b.txt /home/root/stty_ser2b.txt

So many different machines/motherboards, so many BIOSs and how they assign
resources. We’re using Laptops, old 486’s for testing, PII’s and PIII’s,
and they’re all just enough different to make it… interesting…

And as asked in many threads - what are you trying to do? (Maybe there’s
another way…)
-Paul


Edward Schwartz <> edward.schwartz@l-3com.com> > wrote in message
news:8v3gm7$nvp$> 1@inn.qnx.com> …
I thank Paul Russel for pointing in the right direction, but questions
still
remain. This ^\ is a function of stty. If I type:
stty quit=^\ </dev/ser1
then ^\ works.
Or if I type:
stty +edit </dev/ser1
it says kill = ^U but nothing about quit, but ^\ generates the quit.

Then even if I do a shutdown, the quit=^\ remains. If I power off for a
couple seconds (even short the +5 volts terminal to ground to discharge
the
SBC) and re-power, the quit=^\ remains!!! When I powered off over night,
I
lost the quit=^\ setting. It must remain in an uninitialized address in
RAM
that takes a while to leak off.

If I do the stty +edit </dev/ser1 and then shutdown and type stty
/dev/ser1 I get:
Name: file://1/dev/ser1
Type: serial
Opens: 2 (RW)
Sigint Grp: 40, Sighup pid: 40
+edit
+osflow +ihflow +ohflow +lkhflow
quit=^\ start=^Q stop=^S min=01 time=00
par=none bits=8 stopb=1 baud=38400 rows=0,0
+DTR +RTS -BRK +cts +dsr -ri +cd ioport=3F8 irq=4

So here I loose the +edit settings and it goes back to when I typed stty
quit=^\ </dev/ser1.
I don’t know exactly what’s going on here.

However, I still cannot find any differences between the full install on
our
system with a hard disk and our system with a minimal install on a 8 M
silicon disk-on-chip drive. Neither system has a stty command on ser1. I
certainly could put ‘stty quit=^\ </dev/ser1’ in sysinit.1, but I did
not
have to with the hard disk unit.

Appreciate any more suggestions.

Ed Schwartz

Hi,

I said I’d look at more today. The output of sin irqs from the SBC w/DOC (no
hard drive):
$ sin irqs
IRQ PID PROGRAM CS:IP DS
-1 20 //1/bin/Fsys.floppy 0005:0026FC 000D
-1 23 //1/bin/Dev 0005:005760 000D
-1 26 //1/bin/Dev.ansi 0005:005DC0 000D
-1 28 //1/bin/Dev.ser 0005:0024FC 000D
0 1 sys/Proc32 00F0:004CB3 00F8
1 26 //1/bin/Dev.ansi 0005:00690C 000D
3 28 //1/bin/Dev.ser 0005:00177C 000D
4 28 //1/bin/Dev.ser 0005:0017A4 000D
6 20 //1/bin/Fsys.floppy 0005:0026E5 000D

With the hard drive:
$ sin irqs
IRQ PID PROGRAM CS:IP DS
-1 16 //1/bin/Dev32 0005:005760 000D
-1 20 //1/bin/Dev32.ser 0005:0024FC 000D
-1 27 //1/bin/Fsys.floppy 0005:0026FC 000D
0 1 sys/Proc32 00F0:005AE0 00F8
3 20 //1/bin/Dev32.ser 0005:00177C 000D
4 20 //1/bin/Dev32.ser 0005:0017A4 000D
6 27 //1/bin/Fsys.floppy 0005:0026E5 000D
14 5 /bin/Fsys.eide 0005:00ACB4 000D

(Note, the rtf format puts the word “file:” before the double /. I deleted
the word “file:”)

(Actually, Dev.ser is actually Dev32.ser.)

If you read my very first question, I say what I’m trying to do: create a
file analogous to the “copy con” command in DOS. I recently found I could
use echo, but that would mean changes to the software that talks to this
embedded system. Maybe echo might have been a better choice, but when I
first started on this QNX project, I asked how to do this, and echo was not
suggested. Since ^\ worked, I used it. Never expected it to stop working.
(Plus ^\ is a very useful kill command.)

Anyway, I now have “stty quit=1C < /dev/ser1” in my sysinit.1. This is a
solution, so I think I’ll put it to bed. Obviously there’s something
different between the full install on the HD vs. the limited install on the
small embedded flash DOC, but cannot spend any more time on it now that I
have a solution that seems to be solid. Thank you all for your help. It’s
really appreciated.

Ed Schwartz

Paul Russell <paul@jenosys.com> wrote in message
news:8v45hg$efj$1@inn.qnx.com

Try also “stty -all < /dev/ser1” to see all settings, including defaults
I’m uncertain if the defaults for serial are different for console…
Possibly Dev32.ansi and Dev32.ser differ in their defaults?
No reason for them to be 100% the same as devices have different
attributes
i.e. no hardware flow control on /dev/con1

Other queries:
-Are your two installs from the same CD, QNX4.25_ ?
-Are you starting inputtrap or any other trap utilities that could be
scanning
through i/o looking for devices and leaving a little history in its
wake…
(nettrap, crttrap…)
-Have you compared the /etc/config/sysinit.N on the two systems?
-Have you done [sin info], [sin irqs], etc on each system?
-Do the systems have PCI? If so have the resources for com1/com2
been set in BIOS? Have the IRQs been set as Auto, ISA, or PCI?
-What else are you starting on the serial lines, I didn’t recognize the
modem driver…
Possibly some other program is having some effect…
Each of your lines runs different things on the consoles/ports that
would reconfigure the ports…
tinit -c “login serial” -T /dev/con* -t /dev/con1 &
tinit -c “/usr/narda/bin/narda_modem -b 38400 -r 5 -L -c “login
serial”” -m 15 -t
/dev/ser1 &
Maybe you should remove the Modem entry for the /dev/ser1, and only
start login. The using
direct serial, say qtalk from another machine via null cable, try it.
Maybe narda_modem(???) is
doing something to the ports settings? Do you need narda_modem?

Try

  • In your sysinit.N near the top just after Dev.ansi and Dev.ser startup,
    and before tinit
    or any other effects on the ports/consoles, insert the lines:
    (-all may not be necessary, but for completeness…)
    stty -all < /dev/con1 > /home/root/stty_con1a.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1a.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2a.txt
    And then just at the very end of sysinit.N, after tinit etc… put
    stty -all < /dev/con1 > /home/root/stty_con1b.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1b.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2b.txt

And then after booting up have great fun comparing all the differences…
diff /home/root/stty_con1a.txt /home/root/stty_con1b.txt
diff /home/root/stty_ser1a.txt /home/root/stty_ser1b.txt
diff /home/root/stty_ser2a.txt /home/root/stty_ser2b.txt

diff /home/root/stty_ser1a.txt /home/root/stty_ser2a.txt
diff /home/root/stty_ser1b.txt /home/root/stty_ser2b.txt

So many different machines/motherboards, so many BIOSs and how they assign
resources. We’re using Laptops, old 486’s for testing, PII’s and PIII’s,
and they’re all just enough different to make it… interesting…

And as asked in many threads - what are you trying to do? (Maybe there’s
another way…)
-Paul


Edward Schwartz <> edward.schwartz@l-3com.com> > wrote in message
news:8v3gm7$nvp$> 1@inn.qnx.com> …
I thank Paul Russel for pointing in the right direction, but questions
still
remain. This ^\ is a function of stty. If I type:
stty quit=^\ </dev/ser1
then ^\ works.
Or if I type:
stty +edit </dev/ser1
it says kill = ^U but nothing about quit, but ^\ generates the quit.

Then even if I do a shutdown, the quit=^\ remains. If I power off for a
couple seconds (even short the +5 volts terminal to ground to discharge
the
SBC) and re-power, the quit=^\ remains!!! When I powered off over night,
I
lost the quit=^\ setting. It must remain in an uninitialized address in
RAM
that takes a while to leak off.

If I do the stty +edit </dev/ser1 and then shutdown and type stty
/dev/ser1 I get:
Name: file://1/dev/ser1
Type: serial
Opens: 2 (RW)
Sigint Grp: 40, Sighup pid: 40
+edit
+osflow +ihflow +ohflow +lkhflow
quit=^\ start=^Q stop=^S min=01 time=00
par=none bits=8 stopb=1 baud=38400 rows=0,0
+DTR +RTS -BRK +cts +dsr -ri +cd ioport=3F8 irq=4

So here I loose the +edit settings and it goes back to when I typed stty
quit=^\ </dev/ser1.
I don’t know exactly what’s going on here.

However, I still cannot find any differences between the full install on
our
system with a hard disk and our system with a minimal install on a 8 M
silicon disk-on-chip drive. Neither system has a stty command on ser1. I
certainly could put ‘stty quit=^\ </dev/ser1’ in sysinit.1, but I did
not
have to with the hard disk unit.

Appreciate any more suggestions.

Ed Schwartz

Glad its working …
Makes sense why there is no Dev.eide on the system with the FlashDisk.
But strange one system has a Dev.ansi and the other doesn’t…
especially since that’s the driver for the console…
-Paul

Edward Schwartz <edward.schwartz@l-3com.com> wrote in message news:8vbh7u$hc4$1@inn.qnx.com

Hi,

I said I’d look at more today. The output of sin irqs from the SBC w/DOC (no
hard drive):
$ sin irqs
IRQ PID PROGRAM CS:IP DS
-1 20 file://1/bin/Fsys.floppy 0005:0026FC 000D
-1 23 file://1/bin/Dev 0005:005760 000D
-1 26 file://1/bin/Dev.ansi 0005:005DC0 000D
-1 28 file://1/bin/Dev.ser 0005:0024FC 000D
0 1 sys/Proc32 00F0:004CB3 00F8
1 26 file://1/bin/Dev.ansi 0005:00690C 000D
3 28 file://1/bin/Dev.ser 0005:00177C 000D
4 28 file://1/bin/Dev.ser 0005:0017A4 000D
6 20 file://1/bin/Fsys.floppy 0005:0026E5 000D

With the hard drive:
$ sin irqs
IRQ PID PROGRAM CS:IP DS
-1 16 file://1/bin/Dev32 0005:005760 000D
-1 20 file://1/bin/Dev32.ser 0005:0024FC 000D
-1 27 file://1/bin/Fsys.floppy 0005:0026FC 000D
0 1 sys/Proc32 00F0:005AE0 00F8
3 20 file://1/bin/Dev32.ser 0005:00177C 000D
4 20 file://1/bin/Dev32.ser 0005:0017A4 000D
6 27 file://1/bin/Fsys.floppy 0005:0026E5 000D
14 5 /bin/Fsys.eide 0005:00ACB4 000D

(Note, the rtf format puts the word “file:” before the double /. I deleted
the word “file:”)

(Actually, Dev.ser is actually Dev32.ser.)

If you read my very first question, I say what I’m trying to do: create a
file analogous to the “copy con” command in DOS. I recently found I could
use echo, but that would mean changes to the software that talks to this
embedded system. Maybe echo might have been a better choice, but when I
first started on this QNX project, I asked how to do this, and echo was not
suggested. Since ^\ worked, I used it. Never expected it to stop working.
(Plus ^\ is a very useful kill command.)

Anyway, I now have “stty quit=1C < /dev/ser1” in my sysinit.1. This is a
solution, so I think I’ll put it to bed. Obviously there’s something
different between the full install on the HD vs. the limited install on the
small embedded flash DOC, but cannot spend any more time on it now that I
have a solution that seems to be solid. Thank you all for your help. It’s
really appreciated.

Ed Schwartz

Paul Russell <> paul@jenosys.com> > wrote in message
news:8v45hg$efj$> 1@inn.qnx.com> …
Try also “stty -all < /dev/ser1” to see all settings, including defaults
I’m uncertain if the defaults for serial are different for console…
Possibly Dev32.ansi and Dev32.ser differ in their defaults?
No reason for them to be 100% the same as devices have different
attributes
i.e. no hardware flow control on /dev/con1

Other queries:
-Are your two installs from the same CD, QNX4.25_ ?
-Are you starting inputtrap or any other trap utilities that could be
scanning
through i/o looking for devices and leaving a little history in its
wake…
(nettrap, crttrap…)
-Have you compared the /etc/config/sysinit.N on the two systems?
-Have you done [sin info], [sin irqs], etc on each system?
-Do the systems have PCI? If so have the resources for com1/com2
been set in BIOS? Have the IRQs been set as Auto, ISA, or PCI?
-What else are you starting on the serial lines, I didn’t recognize the
modem driver…
Possibly some other program is having some effect…
Each of your lines runs different things on the consoles/ports that
would reconfigure the ports…
tinit -c “login serial” -T /dev/con* -t /dev/con1 &
tinit -c “/usr/narda/bin/narda_modem -b 38400 -r 5 -L -c “login
serial”” -m 15 -t
/dev/ser1 &
Maybe you should remove the Modem entry for the /dev/ser1, and only
start login. The using
direct serial, say qtalk from another machine via null cable, try it.
Maybe narda_modem(???) is
doing something to the ports settings? Do you need narda_modem?

Try

  • In your sysinit.N near the top just after Dev.ansi and Dev.ser startup,
    and before tinit
    or any other effects on the ports/consoles, insert the lines:
    (-all may not be necessary, but for completeness…)
    stty -all < /dev/con1 > /home/root/stty_con1a.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1a.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2a.txt
    And then just at the very end of sysinit.N, after tinit etc… put
    stty -all < /dev/con1 > /home/root/stty_con1b.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1b.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2b.txt

And then after booting up have great fun comparing all the differences…
diff /home/root/stty_con1a.txt /home/root/stty_con1b.txt
diff /home/root/stty_ser1a.txt /home/root/stty_ser1b.txt
diff /home/root/stty_ser2a.txt /home/root/stty_ser2b.txt

diff /home/root/stty_ser1a.txt /home/root/stty_ser2a.txt
diff /home/root/stty_ser1b.txt /home/root/stty_ser2b.txt

So many different machines/motherboards, so many BIOSs and how they assign
resources. We’re using Laptops, old 486’s for testing, PII’s and PIII’s,
and they’re all just enough different to make it… interesting…

And as asked in many threads - what are you trying to do? (Maybe there’s
another way…)
-Paul


Edward Schwartz <> edward.schwartz@l-3com.com> > wrote in message
news:8v3gm7$nvp$> 1@inn.qnx.com> …
I thank Paul Russel for pointing in the right direction, but questions
still
remain. This ^\ is a function of stty. If I type:
stty quit=^\ </dev/ser1
then ^\ works.
Or if I type:
stty +edit </dev/ser1
it says kill = ^U but nothing about quit, but ^\ generates the quit.

Then even if I do a shutdown, the quit=^\ remains. If I power off for a
couple seconds (even short the +5 volts terminal to ground to discharge
the
SBC) and re-power, the quit=^\ remains!!! When I powered off over night,
I
lost the quit=^\ setting. It must remain in an uninitialized address in
RAM
that takes a while to leak off.

If I do the stty +edit </dev/ser1 and then shutdown and type stty
/dev/ser1 I get:
Name: file://1/dev/ser1
Type: serial
Opens: 2 (RW)
Sigint Grp: 40, Sighup pid: 40
+edit
+osflow +ihflow +ohflow +lkhflow
quit=^\ start=^Q stop=^S min=01 time=00
par=none bits=8 stopb=1 baud=38400 rows=0,0
+DTR +RTS -BRK +cts +dsr -ri +cd ioport=3F8 irq=4

So here I loose the +edit settings and it goes back to when I typed stty
quit=^\ </dev/ser1.
I don’t know exactly what’s going on here.

However, I still cannot find any differences between the full install on
our
system with a hard disk and our system with a minimal install on a 8 M
silicon disk-on-chip drive. Neither system has a stty command on ser1. I
certainly could put ‘stty quit=^\ </dev/ser1’ in sysinit.1, but I did
not
have to with the hard disk unit.

Appreciate any more suggestions.

Ed Schwartz

\

Sorry for not explaining fully. The SBC w/DOC I’m using happens to have a
video card with a monitor and keyboard attached. So that one detects the
console on boot up (ls /dev shows 4 consoles) and Dev.ansi starts. The other
one (with the HD) is embedded in a actual system with no console, just a
serial port. So there will be minor differences. But if I connect a video
card to the embedded HD SBC, the ^\ always did and still does work (and is
shown to be present when stty is run).

I’ve checked that stty, tinit, Dev.ser are the same versions on both. There
may possibly be a file or files that are different, or, more likely, do not
exist on the DOC unit.

Thanks,
Ed

Paul Russell <paul@jenosys.com> wrote in message
news:8vbqkq$qc3$1@inn.qnx.com

Glad its working …
Makes sense why there is no Dev.eide on the system with the FlashDisk.
But strange one system has a Dev.ansi and the other doesn’t…
especially since that’s the driver for the console…
-Paul

Edward Schwartz <> edward.schwartz@l-3com.com> > wrote in message
news:8vbh7u$hc4$> 1@inn.qnx.com> …
Hi,

I said I’d look at more today. The output of sin irqs from the SBC w/DOC
(no
hard drive):
$ sin irqs
IRQ PID PROGRAM CS:IP DS
-1 20 file://1/bin/Fsys.floppy 0005:0026FC 000D
-1 23 file://1/bin/Dev 0005:005760 000D
-1 26 file://1/bin/Dev.ansi 0005:005DC0 000D
-1 28 file://1/bin/Dev.ser 0005:0024FC 000D
0 1 sys/Proc32 00F0:004CB3 00F8
1 26 file://1/bin/Dev.ansi 0005:00690C 000D
3 28 file://1/bin/Dev.ser 0005:00177C 000D
4 28 file://1/bin/Dev.ser 0005:0017A4 000D
6 20 file://1/bin/Fsys.floppy 0005:0026E5 000D

With the hard drive:
$ sin irqs
IRQ PID PROGRAM CS:IP DS
-1 16 file://1/bin/Dev32 0005:005760 000D
-1 20 file://1/bin/Dev32.ser 0005:0024FC 000D
-1 27 file://1/bin/Fsys.floppy 0005:0026FC 000D
0 1 sys/Proc32 00F0:005AE0 00F8
3 20 file://1/bin/Dev32.ser 0005:00177C 000D
4 20 file://1/bin/Dev32.ser 0005:0017A4 000D
6 27 file://1/bin/Fsys.floppy 0005:0026E5 000D
14 5 /bin/Fsys.eide 0005:00ACB4 000D

(Note, the rtf format puts the word “file:” before the double /. I
deleted
the word “file:”)

(Actually, Dev.ser is actually Dev32.ser.)

If you read my very first question, I say what I’m trying to do: create
a
file analogous to the “copy con” command in DOS. I recently found I
could
use echo, but that would mean changes to the software that talks to this
embedded system. Maybe echo might have been a better choice, but when I
first started on this QNX project, I asked how to do this, and echo was
not
suggested. Since ^\ worked, I used it. Never expected it to stop
working.
(Plus ^\ is a very useful kill command.)

Anyway, I now have “stty quit=1C < /dev/ser1” in my sysinit.1. This is a
solution, so I think I’ll put it to bed. Obviously there’s something
different between the full install on the HD vs. the limited install on
the
small embedded flash DOC, but cannot spend any more time on it now that
I
have a solution that seems to be solid. Thank you all for your help.
It’s
really appreciated.

Ed Schwartz

Paul Russell <> paul@jenosys.com> > wrote in message
news:8v45hg$efj$> 1@inn.qnx.com> …
Try also “stty -all < /dev/ser1” to see all settings, including
defaults
I’m uncertain if the defaults for serial are different for console…
Possibly Dev32.ansi and Dev32.ser differ in their defaults?
No reason for them to be 100% the same as devices have different
attributes
i.e. no hardware flow control on /dev/con1

Other queries:
-Are your two installs from the same CD, QNX4.25_ ?
-Are you starting inputtrap or any other trap utilities that could be
scanning
through i/o looking for devices and leaving a little history in its
wake…
(nettrap, crttrap…)
-Have you compared the /etc/config/sysinit.N on the two systems?
-Have you done [sin info], [sin irqs], etc on each system?
-Do the systems have PCI? If so have the resources for com1/com2
been set in BIOS? Have the IRQs been set as Auto, ISA, or PCI?
-What else are you starting on the serial lines, I didn’t recognize
the
modem driver…
Possibly some other program is having some effect…
Each of your lines runs different things on the consoles/ports
that
would reconfigure the ports…
tinit -c “login serial” -T /dev/con* -t /dev/con1 &
tinit -c “/usr/narda/bin/narda_modem -b 38400 -r 5 -L -c
“login
serial”” -m 15 -t
/dev/ser1 &
Maybe you should remove the Modem entry for the /dev/ser1, and
only
start login. The using
direct serial, say qtalk from another machine via null cable, try it.
Maybe narda_modem(???) is
doing something to the ports settings? Do you need narda_modem?

Try

  • In your sysinit.N near the top just after Dev.ansi and Dev.ser
    startup,
    and before tinit
    or any other effects on the ports/consoles, insert the lines:
    (-all may not be necessary, but for completeness…)
    stty -all < /dev/con1 > /home/root/stty_con1a.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1a.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2a.txt
    And then just at the very end of sysinit.N, after tinit etc… put
    stty -all < /dev/con1 > /home/root/stty_con1b.txt
    stty -all < /dev/ser1 > /home/root/stty_ser1b.txt
    stty -all < /dev/ser2 > /home/root/stty_ser2b.txt

And then after booting up have great fun comparing all the difference
s…
diff /home/root/stty_con1a.txt /home/root/stty_con1b.txt
diff /home/root/stty_ser1a.txt /home/root/stty_ser1b.txt
diff /home/root/stty_ser2a.txt /home/root/stty_ser2b.txt

diff /home/root/stty_ser1a.txt /home/root/stty_ser2a.txt
diff /home/root/stty_ser1b.txt /home/root/stty_ser2b.txt

So many different machines/motherboards, so many BIOSs and how they
assign
resources. We’re using Laptops, old 486’s for testing, PII’s and
PIII’s,
and they’re all just enough different to make it… interesting…

And as asked in many threads - what are you trying to do? (Maybe
there’s
another way…)
-Paul


Edward Schwartz <> edward.schwartz@l-3com.com> > wrote in message
news:8v3gm7$nvp$> 1@inn.qnx.com> …
I thank Paul Russel for pointing in the right direction, but
questions
still
remain. This ^\ is a function of stty. If I type:
stty quit=^\ </dev/ser1
then ^\ works.
Or if I type:
stty +edit </dev/ser1
it says kill = ^U but nothing about quit, but ^\ generates the quit.

Then even if I do a shutdown, the quit=^\ remains. If I power off
for a
couple seconds (even short the +5 volts terminal to ground to
discharge
the
SBC) and re-power, the quit=^\ remains!!! When I powered off over
night,
I
lost the quit=^\ setting. It must remain in an uninitialized address
in
RAM
that takes a while to leak off.

If I do the stty +edit </dev/ser1 and then shutdown and type stty
/dev/ser1 I get:
Name: file://1/dev/ser1
Type: serial
Opens: 2 (RW)
Sigint Grp: 40, Sighup pid: 40
+edit
+osflow +ihflow +ohflow +lkhflow
quit=^\ start=^Q stop=^S min=01 time=00
par=none bits=8 stopb=1 baud=38400 rows=0,0
+DTR +RTS -BRK +cts +dsr -ri +cd ioport=3F8 irq=4

So here I loose the +edit settings and it goes back to when I typed
stty
quit=^\ </dev/ser1.
I don’t know exactly what’s going on here.

However, I still cannot find any differences between the full
install on
our
system with a hard disk and our system with a minimal install on a 8
M
silicon disk-on-chip drive. Neither system has a stty command on
ser1. I
certainly could put ‘stty quit=^\ </dev/ser1’ in sysinit.1, but I
did
not
have to with the hard disk unit.

Appreciate any more suggestions.

Ed Schwartz



\