Dev32.ser hanging problem

Hello,
I think that I have found a problem with Dev.ser (or a problem with
Dev.ser on my hardware anyhow). The symptoms are these:

I boot QNX4.25 into photon

I get a shell in a ptty

I type: cat /dev/ser1

(nothing displays as I have nothing on serial port 1)

I hook up a 9600 baud character stream to serial port 1

Appropriate characters appear on the ptty - everything works fine

I jiggle the serial port connector generating over-run and frame
errors

The display of characters cease even though my source does not

Nothing I do to /dev/ser1 (stty) will restore it to action. My only
recourse is to reboot.

Some things I have tried:
I have slayed the Dev.ser that runs serial port 1. I have tried to
re-start it by typing “/Dev.ser -F -E -m -N/dev/ser1 &” but the job
aborts with error code 23. Somehow, even though I have slayed the
Dev.ser that is running /dev/ser1, /dev/ser1 remains in the device
list when typing ls–the process does not exist with sin. I then
tried starting Dev.ser using /dev/ser3. This job runs, but the port
is still dead.

/dev/ser2 remains functional.

Somehow, it looks like the framing or overrun errors cause the UART to
get into some state that Dev.ser cannot recover from.

This problem with the serial port becoming hung also seems to occur if
I boot QNX with active character input on the serial line. QNX will
come up, but the port is hung from the beginning. If I boot QNX with
the serial port unhooked, and then hook up the serial line after QNX
is up, everything works fine–until I jiggle the cable and get those
framing or overrun errors.

I have included the pertinent information below. Is there an updated
version of Dev.ser that has delt with this problem? How can I get
around this–I cannot guarentee that there will not be characters on
the serial line when the system boots?

I am using a PCI bus system on a Micro Star BX Master Motherboard. I
have included a section of show_pci that describes the serial device.

Thanks,
Greg Laird

sin args

PID USER NAME ARGUMENTS

16 System Dev
22 System Pipe
23 System /bin/Dev.ser -m -E -F -N/dev/ser1 3f8,4
24 System /bin/Dev.ser -N/dev/ser2 2f8,3
25 System Dev.ansi -Q -n1
29 System Dev.par
30 System Dev.pty -n16

sin

SID PID PROGRAM PRI STATE BLK CODE DATA
– – Microkernel — ----- — 12976 0
0 1 /boot/sys/Proc32 30f READY — 122k 991k
0 2 /boot/sys/Slib32 10r RECV 0 53k 4096
0 4 /bin/Fsys 29r RECV 0 77k 9531k
0 5 /bin/Fsys.eide 22r RECV 0 61k 114k
0 8 idle 0r READY — 0 40k
0 16 //1/bin/Dev32 24f RECV 0 32k 94k
0 22 //1/bin/Pipe 10r RECV 0 16k 32k
0 23 //1/bin/Dev32.ser 20r RECV 0 16k 24k
0 24 //1/bin/Dev32.ser 20r RECV 0 16k 24k
0 25 //1/bin/Dev32.ansi 20r RECV 0 40k 36k
0 29 //1/bin/Dev32.par 9o RECV 0 8192 12k
0 30 //1/bin/Dev32.pty 20r RECV 0 12k 57k
0 34 //1//usr/bin/syslogd 10o RECV 0 36k 32k
0 36 //1/bin/Fsys.eide 22r RECV 0 61k 114k
0 40 //1/bin/Fsys.floppy 10o RECV 0 20k 40k
0 41 //1/bin/Iso9660fsys 10o RECV 0 28k 61k
0 45 //1/bin/Net 23r RECV 0 32k 77k
0 47 //1/bin/Net.ether905 20r RECV 0 45k 86k
0 49 //1/bin/nameloc 20o RECV 0 6144 20k
0 50 //1/bin/nameloc 20o REPLY 0 6144 20k
0 54 //1/bin/Dosfsys 10o RECV 0 49k 118k
0 55 //1/
/usr/ucb/Socklet 22r RECV 0 114k 147k
0 68 //1//4.25/usr/ucb/lpd 10o RECV 75 53k 36k
0 69 //1/
/usr/ucb/inetd 10o RECV 70 36k 32k
1 76 //1//photon/bin/Photon 12r RECV 0 57k 49k
2 80 //1/
/bin/phfontpfr 12r RECV 0 126k 389k
0 82 //1//drivers/Null.ms 10o RECV 0 12k 16k
0 85 //1/
/Pg.Banshee 12r REPLY 76 86k 176k
0 87 //1//Pg.Banshee 12r REPLY 76 86k 151k
0 88 //1/bin/Input 12o RECV 0 32k 28k
0 91 //1/bin/Input 10o RECV 0 32k 28k
3 123 //1/
/photon/bin/pwm 10o RECV 0 94k 139k
4 136 //1//photon/bin/pdm 10o REPLY 76 143k 356k
3 150 //1/
/photon/bin/pterm 10o RECV 0 32k 139k
5 153 //1/bin/ksh 10o WAIT -1 47k 36k
3 211 //1/*/photon/bin/pterm 10o RECV 0 32k 139k
6 214 //1/bin/ksh 10o REPLY 16 47k 36k
5 759 //1/bin/sin 10o REPLY 1 45k 57k

traceinfo

Dec 31 16:00:01 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=24h ascq=0h)
Mar 18 20:09:12 3 00002006 Serial Port 02F8, Hangup
Mar 18 20:09:12 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=20h ascq=0h)
Mar 18 20:09:12 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=24h ascq=0h)
Mar 18 20:09:12 2 0000403e 00000000 00000002
Mar 18 20:09:12 3 00006007 4 clusters allocated at 42FCC
Mar 18 20:09:12 3 0000600a 10 mbufs allocated at 4BC80
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4D880
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4E180
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4EB80
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4F880
Mar 18 20:09:13 2 0000806c Error EOK loading font phfontXX started OK

  • EOK
    Mar 18 20:09:17 2 00001008 Transmit NAK on vid 8211 to nid 2
    Mar 18 20:09:17 2 00004003 0 (003) NET Polled for unknown vid,
    sent nack
    Mar 18 20:09:17 2 000040e6 00000001 00002013
    Mar 18 20:09:17 2 000040e7 00000001 00000001
    Mar 18 20:09:17 2 000040e8 00000001 00000008
    Mar 18 20:09:17 2 000040e9 00000001 00000003
    Mar 18 20:09:17 2 00004019 1 (025) NET Status=3 failed proc
    _vc_detach msg
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Many more framing errors



    stty -a </dev/ser1

Name: //1/dev/ser1
Type: serial
Opens: 1 (R-)
Sigint Grp: 0, Sighup pid: 0
-hupcl +cread -clocal +isig +icanon +iexten +echo +echoe +echok
-echonl -noflsh
-ignbrk +brkint -ignpar -parmrk -istrip -inlcr -igncr +icrnl +opost
-isflow +osflow -ihflow -ohflow -lkhflow -lksflow +lkiexten -wtsflow
-nopgrp
-echoi -ispaged -ospaged -ihpaged -ohpaged
intr=^C quit=^- erase=^? kill=^U eof=^D eol=^- start=^Q
stop=^S
susp=^- min=01 time=00 pr1=^- pr2=^- pr3=^- pr4=^-
sf1=^-
sf2=^- sf3=^- sf4=^- left=^- right=^- up=^- down=^-
ins=^-
del=^- rub=^- can=^- home=^- end=^-
par=none bits=8 stopb=1 baud=9600 rows=0,0
+DTR +RTS -BRK -cts +dsr -ri +cd ioport=3F8 irq=4


PROGRAM NAME VERSION DATE
//1/bin/Dev32 Dev32 4.23G Oct 04 1996
//1/bin/Pipe Pipe 4.23A Feb 26 1996
//1/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
//1/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
//1/bin/Dev32.ansi Dev32.ansi 4.23H Nov 21 1996
//1/bin/Dev32.par Dev32.par 4.23G Oct 04 1996
//1/bin/Dev32.pty Dev32.pty 4.23G Oct 04 1996


show_pci
Vendor ID = 8086h, INTEL CORPORATION
Device ID = 7112h
PCI index = 0h
Class Code = c0300h Serial Bus (Universal Serial Bus) ProgIF=0
Revision ID = 1h
Bus number = 0
Device number = 7
Function num = 2
Status Reg = 280h
Command Reg = 5h
Header type = 0h Single-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 40h
Cache Line Size= 0h
IO@b000h length 32 bytes
Max Lat = 0ns
Min Gnt = 0ns
PCI Int Pin = 4
PCI Int Pin = INT D
Interrupt line = 10

Greg Laird wrote:

Hello,
I think that I have found a problem with Dev.ser (or a problem with
Dev.ser on my hardware anyhow). The symptoms are these:

We also have a system that boots with data coming in on the /dev/ser1
port.
But I have never heard nor noticed that the port would get stuck after
boot.

What we do that you could perhaps try, from C-code:

open the port
set the terminal characteristics
tcflow (fd, TCOONHW); /* Get rid of ohpaged flag /
tcflush(fd, TCIOFLUSH); /
Flush pending input/output */

regards


\

Per Åkesson
Carmenta AB
SWEDEN

Good post, because I was going to post one too. I too am using a serial
port and have had the serial driver lock up on me. But I can “unstick it”
without rebooting. Here’s my situation:

I’m using an IR detector for a remote control. I input the commands over
the serial port and pass them into my application. Using my own serial
code, it works OK (not the best) but decent. I figure I’ll see how
Dev32.ser will work to see if it performs better. For some reason, when I
hit 2 buttons on my remote control, it locks it up and won’t continue.
Another 2 buttons will unlock it. It is VERY consistent. I used my program
to determine what codes were being generated by my device and found that for
the 2 buttons that are freezing the unit, one is producing “19 9” as part of
the code, and the other is producing “9 19”. The two that are unfreezing
the driver are “11 17” and “17 11”. If that information somehow helps find
the problem, great.

Greg, if you can test out the unfreezing values (either 11 or 17) on the
port to see if it recovers, that would be great. I hope QNX can find a
problem and fix it too :slight_smile:

TIA!

R B Adler


“Greg Laird” <glaird@teleport.com> wrote in message
news:3ab5923f.2564747@inn.qnx.com

Hello,
I think that I have found a problem with Dev.ser (or a problem with
Dev.ser on my hardware anyhow). The symptoms are these:

I boot QNX4.25 into photon

I get a shell in a ptty

I type: cat /dev/ser1

(nothing displays as I have nothing on serial port 1)

I hook up a 9600 baud character stream to serial port 1

Appropriate characters appear on the ptty - everything works fine

I jiggle the serial port connector generating over-run and frame
errors

The display of characters cease even though my source does not

Nothing I do to /dev/ser1 (stty) will restore it to action. My only
recourse is to reboot.

Some things I have tried:
I have slayed the Dev.ser that runs serial port 1. I have tried to
re-start it by typing “/Dev.ser -F -E -m -N/dev/ser1 &” but the job
aborts with error code 23. Somehow, even though I have slayed the
Dev.ser that is running /dev/ser1, /dev/ser1 remains in the device
list when typing ls–the process does not exist with sin. I then
tried starting Dev.ser using /dev/ser3. This job runs, but the port
is still dead.

/dev/ser2 remains functional.

Somehow, it looks like the framing or overrun errors cause the UART to
get into some state that Dev.ser cannot recover from.

This problem with the serial port becoming hung also seems to occur if
I boot QNX with active character input on the serial line. QNX will
come up, but the port is hung from the beginning. If I boot QNX with
the serial port unhooked, and then hook up the serial line after QNX
is up, everything works fine–until I jiggle the cable and get those
framing or overrun errors.

I have included the pertinent information below. Is there an updated
version of Dev.ser that has delt with this problem? How can I get
around this–I cannot guarentee that there will not be characters on
the serial line when the system boots?

I am using a PCI bus system on a Micro Star BX Master Motherboard. I
have included a section of show_pci that describes the serial device.

Thanks,
Greg Laird

sin args

PID USER NAME ARGUMENTS

16 System Dev
22 System Pipe
23 System /bin/Dev.ser -m -E -F -N/dev/ser1 3f8,4
24 System /bin/Dev.ser -N/dev/ser2 2f8,3
25 System Dev.ansi -Q -n1
29 System Dev.par
30 System Dev.pty -n16

sin

SID PID PROGRAM PRI STATE BLK CODE DATA
– – Microkernel — ----- — 12976 0
0 1 /boot/sys/Proc32 30f READY — 122k 991k
0 2 /boot/sys/Slib32 10r RECV 0 53k 4096
0 4 /bin/Fsys 29r RECV 0 77k 9531k
0 5 /bin/Fsys.eide 22r RECV 0 61k 114k
0 8 idle 0r READY — 0 40k
0 16 file://1/bin/Dev32 24f RECV 0 32k 94k
0 22 file://1/bin/Pipe 10r RECV 0 16k 32k
0 23 file://1/bin/Dev32.ser 20r RECV 0 16k 24k
0 24 file://1/bin/Dev32.ser 20r RECV 0 16k 24k
0 25 file://1/bin/Dev32.ansi 20r RECV 0 40k 36k
0 29 file://1/bin/Dev32.par 9o RECV 0 8192 12k
0 30 file://1/bin/Dev32.pty 20r RECV 0 12k 57k
0 34 file://1//usr/bin/syslogd 10o RECV 0 36k 32k
0 36 file://1/bin/Fsys.eide 22r RECV 0 61k 114k
0 40 file://1/bin/Fsys.floppy 10o RECV 0 20k 40k
0 41 file://1/bin/Iso9660fsys 10o RECV 0 28k 61k
0 45 file://1/bin/Net 23r RECV 0 32k 77k
0 47 file://1/bin/Net.ether905 20r RECV 0 45k 86k
0 49 file://1/bin/nameloc 20o RECV 0 6144 20k
0 50 file://1/bin/nameloc 20o REPLY 0 6144 20k
0 54 file://1/bin/Dosfsys 10o RECV 0 49k 118k
0 55 file://1/
/usr/ucb/Socklet 22r RECV 0 114k 147k
0 68 file://1//4.25/usr/ucb/lpd 10o RECV 75 53k 36k
0 69 file://1/
/usr/ucb/inetd 10o RECV 70 36k 32k
1 76 file://1//photon/bin/Photon 12r RECV 0 57k 49k
2 80 file://1/
/bin/phfontpfr 12r RECV 0 126k 389k
0 82 file://1//drivers/Null.ms 10o RECV 0 12k 16k
0 85 file://1/
/Pg.Banshee 12r REPLY 76 86k 176k
0 87 file://1//Pg.Banshee 12r REPLY 76 86k 151k
0 88 file://1/bin/Input 12o RECV 0 32k 28k
0 91 file://1/bin/Input 10o RECV 0 32k 28k
3 123 file://1/
/photon/bin/pwm 10o RECV 0 94k 139k
4 136 file://1//photon/bin/pdm 10o REPLY 76 143k 356k
3 150 file://1/
/photon/bin/pterm 10o RECV 0 32k 139k
5 153 file://1/bin/ksh 10o WAIT -1 47k 36k
3 211 file://1/*/photon/bin/pterm 10o RECV 0 32k 139k
6 214 file://1/bin/ksh 10o REPLY 16 47k 36k
5 759 file://1/bin/sin 10o REPLY 1 45k 57k

traceinfo

Dec 31 16:00:01 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=24h ascq=0h)
Mar 18 20:09:12 3 00002006 Serial Port 02F8, Hangup
Mar 18 20:09:12 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=20h ascq=0h)
Mar 18 20:09:12 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=24h ascq=0h)
Mar 18 20:09:12 2 0000403e 00000000 00000002
Mar 18 20:09:12 3 00006007 4 clusters allocated at 42FCC
Mar 18 20:09:12 3 0000600a 10 mbufs allocated at 4BC80
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4D880
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4E180
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4EB80
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4F880
Mar 18 20:09:13 2 0000806c Error EOK loading font phfontXX started OK

  • EOK
    Mar 18 20:09:17 2 00001008 Transmit NAK on vid 8211 to nid 2
    Mar 18 20:09:17 2 00004003 0 (003) NET Polled for unknown vid,
    sent nack
    Mar 18 20:09:17 2 000040e6 00000001 00002013
    Mar 18 20:09:17 2 000040e7 00000001 00000001
    Mar 18 20:09:17 2 000040e8 00000001 00000008
    Mar 18 20:09:17 2 000040e9 00000001 00000003
    Mar 18 20:09:17 2 00004019 1 (025) NET Status=3 failed proc
    _vc_detach msg
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Many more framing errors



    stty -a </dev/ser1

Name: file://1/dev/ser1
Type: serial
Opens: 1 (R-)
Sigint Grp: 0, Sighup pid: 0
-hupcl +cread -clocal +isig +icanon +iexten +echo +echoe +echok
-echonl -noflsh
-ignbrk +brkint -ignpar -parmrk -istrip -inlcr -igncr +icrnl +opost
-isflow +osflow -ihflow -ohflow -lkhflow -lksflow +lkiexten -wtsflow
-nopgrp
-echoi -ispaged -ospaged -ihpaged -ohpaged
intr=^C quit=^- erase=^? kill=^U eof=^D eol=^- start=^Q
stop=^S
susp=^- min=01 time=00 pr1=^- pr2=^- pr3=^- pr4=^-
sf1=^-
sf2=^- sf3=^- sf4=^- left=^- right=^- up=^- down=^-
ins=^-
del=^- rub=^- can=^- home=^- end=^-
par=none bits=8 stopb=1 baud=9600 rows=0,0
+DTR +RTS -BRK -cts +dsr -ri +cd ioport=3F8 irq=4


PROGRAM NAME VERSION DATE
file://1/bin/Dev32 Dev32 4.23G Oct 04 1996
file://1/bin/Pipe Pipe 4.23A Feb 26 1996
file://1/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
file://1/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
file://1/bin/Dev32.ansi Dev32.ansi 4.23H Nov 21 1996
file://1/bin/Dev32.par Dev32.par 4.23G Oct 04 1996
file://1/bin/Dev32.pty Dev32.pty 4.23G Oct 04 1996


show_pci
Vendor ID = 8086h, INTEL CORPORATION
Device ID = 7112h
PCI index = 0h
Class Code = c0300h Serial Bus (Universal Serial Bus) ProgIF=0
Revision ID = 1h
Bus number = 0
Device number = 7
Function num = 2
Status Reg = 280h
Command Reg = 5h
Header type = 0h Single-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 40h
Cache Line Size= 0h
IO@b000h length 32 bytes
Max Lat = 0ns
Min Gnt = 0ns
PCI Int Pin = 4
PCI Int Pin = INT D
Interrupt line = 10

Are you using software flow contro? ^S is 19, ^Q is 17.

Previously, R B Adler wrote in qdn.public.qnx4:

Good post, because I was going to post one too. I too am using a serial
port and have had the serial driver lock up on me. But I can “unstick it”
without rebooting. Here’s my situation:

I’m using an IR detector for a remote control. I input the commands over
the serial port and pass them into my application. Using my own serial
code, it works OK (not the best) but decent. I figure I’ll see how
Dev32.ser will work to see if it performs better. For some reason, when I
hit 2 buttons on my remote control, it locks it up and won’t continue.
Another 2 buttons will unlock it. It is VERY consistent. I used my program
to determine what codes were being generated by my device and found that for
the 2 buttons that are freezing the unit, one is producing “19 9” as part of
the code, and the other is producing “9 19”. The two that are unfreezing
the driver are “11 17” and “17 11”. If that information somehow helps find
the problem, great.

Greg, if you can test out the unfreezing values (either 11 or 17) on the
port to see if it recovers, that would be great. I hope QNX can find a
problem and fix it too > :slight_smile:

TIA!

R B Adler


“Greg Laird” <> glaird@teleport.com> > wrote in message
news:> 3ab5923f.2564747@inn.qnx.com> …
Hello,
I think that I have found a problem with Dev.ser (or a problem with
Dev.ser on my hardware anyhow). The symptoms are these:

I boot QNX4.25 into photon

I get a shell in a ptty

I type: cat /dev/ser1

(nothing displays as I have nothing on serial port 1)

I hook up a 9600 baud character stream to serial port 1

Appropriate characters appear on the ptty - everything works fine

I jiggle the serial port connector generating over-run and frame
errors

The display of characters cease even though my source does not

Nothing I do to /dev/ser1 (stty) will restore it to action. My only
recourse is to reboot.

Some things I have tried:
I have slayed the Dev.ser that runs serial port 1. I have tried to
re-start it by typing “/Dev.ser -F -E -m -N/dev/ser1 &” but the job
aborts with error code 23. Somehow, even though I have slayed the
Dev.ser that is running /dev/ser1, /dev/ser1 remains in the device
list when typing ls–the process does not exist with sin. I then
tried starting Dev.ser using /dev/ser3. This job runs, but the port
is still dead.

/dev/ser2 remains functional.

Somehow, it looks like the framing or overrun errors cause the UART to
get into some state that Dev.ser cannot recover from.

This problem with the serial port becoming hung also seems to occur if
I boot QNX with active character input on the serial line. QNX will
come up, but the port is hung from the beginning. If I boot QNX with
the serial port unhooked, and then hook up the serial line after QNX
is up, everything works fine–until I jiggle the cable and get those
framing or overrun errors.

I have included the pertinent information below. Is there an updated
version of Dev.ser that has delt with this problem? How can I get
around this–I cannot guarentee that there will not be characters on
the serial line when the system boots?

I am using a PCI bus system on a Micro Star BX Master Motherboard. I
have included a section of show_pci that describes the serial device.

Thanks,
Greg Laird

sin args

PID USER NAME ARGUMENTS

16 System Dev
22 System Pipe
23 System /bin/Dev.ser -m -E -F -N/dev/ser1 3f8,4
24 System /bin/Dev.ser -N/dev/ser2 2f8,3
25 System Dev.ansi -Q -n1
29 System Dev.par
30 System Dev.pty -n16

sin

SID PID PROGRAM PRI STATE BLK CODE DATA
– – Microkernel — ----- — 12976 0
0 1 /boot/sys/Proc32 30f READY — 122k 991k
0 2 /boot/sys/Slib32 10r RECV 0 53k 4096
0 4 /bin/Fsys 29r RECV 0 77k 9531k
0 5 /bin/Fsys.eide 22r RECV 0 61k 114k
0 8 idle 0r READY — 0 40k
0 16 file://1/bin/Dev32 24f RECV 0 32k 94k
0 22 file://1/bin/Pipe 10r RECV 0 16k 32k
0 23 file://1/bin/Dev32.ser 20r RECV 0 16k 24k
0 24 file://1/bin/Dev32.ser 20r RECV 0 16k 24k
0 25 file://1/bin/Dev32.ansi 20r RECV 0 40k 36k
0 29 file://1/bin/Dev32.par 9o RECV 0 8192 12k
0 30 file://1/bin/Dev32.pty 20r RECV 0 12k 57k
0 34 file://1//usr/bin/syslogd 10o RECV 0 36k 32k
0 36 file://1/bin/Fsys.eide 22r RECV 0 61k 114k
0 40 file://1/bin/Fsys.floppy 10o RECV 0 20k 40k
0 41 file://1/bin/Iso9660fsys 10o RECV 0 28k 61k
0 45 file://1/bin/Net 23r RECV 0 32k 77k
0 47 file://1/bin/Net.ether905 20r RECV 0 45k 86k
0 49 file://1/bin/nameloc 20o RECV 0 6144 20k
0 50 file://1/bin/nameloc 20o REPLY 0 6144 20k
0 54 file://1/bin/Dosfsys 10o RECV 0 49k 118k
0 55 file://1/
/usr/ucb/Socklet 22r RECV 0 114k 147k
0 68 file://1//4.25/usr/ucb/lpd 10o RECV 75 53k 36k
0 69 file://1/
/usr/ucb/inetd 10o RECV 70 36k 32k
1 76 file://1//photon/bin/Photon 12r RECV 0 57k 49k
2 80 file://1/
/bin/phfontpfr 12r RECV 0 126k 389k
0 82 file://1//drivers/Null.ms 10o RECV 0 12k 16k
0 85 file://1/
/Pg.Banshee 12r REPLY 76 86k 176k
0 87 file://1//Pg.Banshee 12r REPLY 76 86k 151k
0 88 file://1/bin/Input 12o RECV 0 32k 28k
0 91 file://1/bin/Input 10o RECV 0 32k 28k
3 123 file://1/
/photon/bin/pwm 10o RECV 0 94k 139k
4 136 file://1//photon/bin/pdm 10o REPLY 76 143k 356k
3 150 file://1/
/photon/bin/pterm 10o RECV 0 32k 139k
5 153 file://1/bin/ksh 10o WAIT -1 47k 36k
3 211 file://1/*/photon/bin/pterm 10o RECV 0 32k 139k
6 214 file://1/bin/ksh 10o REPLY 16 47k 36k
5 759 file://1/bin/sin 10o REPLY 1 45k 57k

traceinfo

Dec 31 16:00:01 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=24h ascq=0h)
Mar 18 20:09:12 3 00002006 Serial Port 02F8, Hangup
Mar 18 20:09:12 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=20h ascq=0h)
Mar 18 20:09:12 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=24h ascq=0h)
Mar 18 20:09:12 2 0000403e 00000000 00000002
Mar 18 20:09:12 3 00006007 4 clusters allocated at 42FCC
Mar 18 20:09:12 3 0000600a 10 mbufs allocated at 4BC80
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4D880
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4E180
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4EB80
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4F880
Mar 18 20:09:13 2 0000806c Error EOK loading font phfontXX started OK

  • EOK
    Mar 18 20:09:17 2 00001008 Transmit NAK on vid 8211 to nid 2
    Mar 18 20:09:17 2 00004003 0 (003) NET Polled for unknown vid,
    sent nack
    Mar 18 20:09:17 2 000040e6 00000001 00002013
    Mar 18 20:09:17 2 000040e7 00000001 00000001
    Mar 18 20:09:17 2 000040e8 00000001 00000008
    Mar 18 20:09:17 2 000040e9 00000001 00000003
    Mar 18 20:09:17 2 00004019 1 (025) NET Status=3 failed proc
    _vc_detach msg
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Many more framing errors



    stty -a </dev/ser1

Name: file://1/dev/ser1
Type: serial
Opens: 1 (R-)
Sigint Grp: 0, Sighup pid: 0
-hupcl +cread -clocal +isig +icanon +iexten +echo +echoe +echok
-echonl -noflsh
-ignbrk +brkint -ignpar -parmrk -istrip -inlcr -igncr +icrnl +opost
-isflow +osflow -ihflow -ohflow -lkhflow -lksflow +lkiexten -wtsflow
-nopgrp
-echoi -ispaged -ospaged -ihpaged -ohpaged
intr=^C quit=^- erase=^? kill=^U eof=^D eol=^- start=^Q
stop=^S
susp=^- min=01 time=00 pr1=^- pr2=^- pr3=^- pr4=^-
sf1=^-
sf2=^- sf3=^- sf4=^- left=^- right=^- up=^- down=^-
ins=^-
del=^- rub=^- can=^- home=^- end=^-
par=none bits=8 stopb=1 baud=9600 rows=0,0
+DTR +RTS -BRK -cts +dsr -ri +cd ioport=3F8 irq=4


PROGRAM NAME VERSION DATE
file://1/bin/Dev32 Dev32 4.23G Oct 04 1996
file://1/bin/Pipe Pipe 4.23A Feb 26 1996
file://1/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
file://1/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
file://1/bin/Dev32.ansi Dev32.ansi 4.23H Nov 21 1996
file://1/bin/Dev32.par Dev32.par 4.23G Oct 04 1996
file://1/bin/Dev32.pty Dev32.pty 4.23G Oct 04 1996


show_pci
Vendor ID = 8086h, INTEL CORPORATION
Device ID = 7112h
PCI index = 0h
Class Code = c0300h Serial Bus (Universal Serial Bus) ProgIF=0
Revision ID = 1h
Bus number = 0
Device number = 7
Function num = 2
Status Reg = 280h
Command Reg = 5h
Header type = 0h Single-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 40h
Cache Line Size= 0h
IO@b000h length 32 bytes
Max Lat = 0ns
Min Gnt = 0ns
PCI Int Pin = 4
PCI Int Pin = INT D
Interrupt line = 10

\


David L. Hawley D.L. Hawley and Associates

DOH!

Thanks, I didn’t notice that. My serial port isn’t hanging anymore :slight_smile:

R B Adler


“David Hawley” <David.L.Hawley@computer.org> wrote in message
news:Voyager.010320110459.548882E@shadow.hawley.com

Are you using software flow contro? ^S is 19, ^Q is 17.

Previously, R B Adler wrote in qdn.public.qnx4:
Good post, because I was going to post one too. I too am using a serial
port and have had the serial driver lock up on me. But I can “unstick
it”
without rebooting. Here’s my situation:

I’m using an IR detector for a remote control. I input the commands
over
the serial port and pass them into my application. Using my own serial
code, it works OK (not the best) but decent. I figure I’ll see how
Dev32.ser will work to see if it performs better. For some reason, when
I
hit 2 buttons on my remote control, it locks it up and won’t continue.
Another 2 buttons will unlock it. It is VERY consistent. I used my
program
to determine what codes were being generated by my device and found that
for
the 2 buttons that are freezing the unit, one is producing “19 9” as
part of
the code, and the other is producing “9 19”. The two that are
unfreezing
the driver are “11 17” and “17 11”. If that information somehow helps
find
the problem, great.

Greg, if you can test out the unfreezing values (either 11 or 17) on the
port to see if it recovers, that would be great. I hope QNX can find a
problem and fix it too > :slight_smile:

TIA!

R B Adler


“Greg Laird” <> glaird@teleport.com> > wrote in message
news:> 3ab5923f.2564747@inn.qnx.com> …
Hello,
I think that I have found a problem with Dev.ser (or a problem with
Dev.ser on my hardware anyhow). The symptoms are these:

I boot QNX4.25 into photon

I get a shell in a ptty

I type: cat /dev/ser1

(nothing displays as I have nothing on serial port 1)

I hook up a 9600 baud character stream to serial port 1

Appropriate characters appear on the ptty - everything works fine

I jiggle the serial port connector generating over-run and frame
errors

The display of characters cease even though my source does not

Nothing I do to /dev/ser1 (stty) will restore it to action. My only
recourse is to reboot.

Some things I have tried:
I have slayed the Dev.ser that runs serial port 1. I have tried to
re-start it by typing “/Dev.ser -F -E -m -N/dev/ser1 &” but the job
aborts with error code 23. Somehow, even though I have slayed the
Dev.ser that is running /dev/ser1, /dev/ser1 remains in the device
list when typing ls–the process does not exist with sin. I then
tried starting Dev.ser using /dev/ser3. This job runs, but the port
is still dead.

/dev/ser2 remains functional.

Somehow, it looks like the framing or overrun errors cause the UART to
get into some state that Dev.ser cannot recover from.

This problem with the serial port becoming hung also seems to occur if
I boot QNX with active character input on the serial line. QNX will
come up, but the port is hung from the beginning. If I boot QNX with
the serial port unhooked, and then hook up the serial line after QNX
is up, everything works fine–until I jiggle the cable and get those
framing or overrun errors.

I have included the pertinent information below. Is there an updated
version of Dev.ser that has delt with this problem? How can I get
around this–I cannot guarentee that there will not be characters on
the serial line when the system boots?

I am using a PCI bus system on a Micro Star BX Master Motherboard. I
have included a section of show_pci that describes the serial device.

Thanks,
Greg Laird

sin args

PID USER NAME ARGUMENTS

16 System Dev
22 System Pipe
23 System /bin/Dev.ser -m -E -F -N/dev/ser1 3f8,4
24 System /bin/Dev.ser -N/dev/ser2 2f8,3
25 System Dev.ansi -Q -n1
29 System Dev.par
30 System Dev.pty -n16

sin

SID PID PROGRAM PRI STATE BLK CODE DATA
– – Microkernel — ----- — 12976 0
0 1 /boot/sys/Proc32 30f READY — 122k 991k
0 2 /boot/sys/Slib32 10r RECV 0 53k 4096
0 4 /bin/Fsys 29r RECV 0 77k 9531k
0 5 /bin/Fsys.eide 22r RECV 0 61k 114k
0 8 idle 0r READY — 0 40k
0 16 file://1/bin/Dev32 24f RECV 0 32k 94k
0 22 file://1/bin/Pipe 10r RECV 0 16k 32k
0 23 file://1/bin/Dev32.ser 20r RECV 0 16k 24k
0 24 file://1/bin/Dev32.ser 20r RECV 0 16k 24k
0 25 file://1/bin/Dev32.ansi 20r RECV 0 40k 36k
0 29 file://1/bin/Dev32.par 9o RECV 0 8192 12k
0 30 file://1/bin/Dev32.pty 20r RECV 0 12k 57k
0 34 file://1//usr/bin/syslogd 10o RECV 0 36k 32k
0 36 file://1/bin/Fsys.eide 22r RECV 0 61k 114k
0 40 file://1/bin/Fsys.floppy 10o RECV 0 20k 40k
0 41 file://1/bin/Iso9660fsys 10o RECV 0 28k 61k
0 45 file://1/bin/Net 23r RECV 0 32k 77k
0 47 file://1/bin/Net.ether905 20r RECV 0 45k 86k
0 49 file://1/bin/nameloc 20o RECV 0 6144 20k
0 50 file://1/bin/nameloc 20o REPLY 0 6144 20k
0 54 file://1/bin/Dosfsys 10o RECV 0 49k 118k
0 55 file://1/
/usr/ucb/Socklet 22r RECV 0 114k 147k
0 68 file://1//4.25/usr/ucb/lpd 10o RECV 75 53k 36k
0 69 file://1/
/usr/ucb/inetd 10o RECV 70 36k 32k
1 76 file://1//photon/bin/Photon 12r RECV 0 57k 49k
2 80 file://1/
/bin/phfontpfr 12r RECV 0 126k 389k
0 82 file://1//drivers/Null.ms 10o RECV 0 12k 16k
0 85 file://1/
/Pg.Banshee 12r REPLY 76 86k 176k
0 87 file://1//Pg.Banshee 12r REPLY 76 86k 151k
0 88 file://1/bin/Input 12o RECV 0 32k 28k
0 91 file://1/bin/Input 10o RECV 0 32k 28k
3 123 file://1/
/photon/bin/pwm 10o RECV 0 94k 139k
4 136 file://1//photon/bin/pdm 10o REPLY 76 143k 356k
3 150 file://1/
/photon/bin/pterm 10o RECV 0 32k 139k
5 153 file://1/bin/ksh 10o WAIT -1 47k 36k
3 211 file://1/*/photon/bin/pterm 10o RECV 0 32k 139k
6 214 file://1/bin/ksh 10o REPLY 16 47k 36k
5 759 file://1/bin/sin 10o REPLY 1 45k 57k

traceinfo

Dec 31 16:00:01 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=24h ascq=0h)
Mar 18 20:09:12 3 00002006 Serial Port 02F8, Hangup
Mar 18 20:09:12 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=20h ascq=0h)
Mar 18 20:09:12 5 00005109 Scsi sense (unit=0 scsi=2 err=70h sense=5h
asc=24h ascq=0h)
Mar 18 20:09:12 2 0000403e 00000000 00000002
Mar 18 20:09:12 3 00006007 4 clusters allocated at 42FCC
Mar 18 20:09:12 3 0000600a 10 mbufs allocated at 4BC80
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4D880
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4E180
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4EB80
Mar 18 20:09:13 3 0000600a 10 mbufs allocated at 4F880
Mar 18 20:09:13 2 0000806c Error EOK loading font phfontXX started OK

  • EOK
    Mar 18 20:09:17 2 00001008 Transmit NAK on vid 8211 to nid 2
    Mar 18 20:09:17 2 00004003 0 (003) NET Polled for unknown vid,
    sent nack
    Mar 18 20:09:17 2 000040e6 00000001 00002013
    Mar 18 20:09:17 2 000040e7 00000001 00000001
    Mar 18 20:09:17 2 000040e8 00000001 00000008
    Mar 18 20:09:17 2 000040e9 00000001 00000003
    Mar 18 20:09:17 2 00004019 1 (025) NET Status=3 failed proc
    _vc_detach msg
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Mar 18 20:09:51 2 00002002 Serial Port 03F8, Framing error
    Many more framing errors



    stty -a </dev/ser1

Name: file://1/dev/ser1
Type: serial
Opens: 1 (R-)
Sigint Grp: 0, Sighup pid: 0
-hupcl +cread -clocal +isig +icanon +iexten +echo +echoe +echok
-echonl -noflsh
-ignbrk +brkint -ignpar -parmrk -istrip -inlcr -igncr +icrnl +opost
-isflow +osflow -ihflow -ohflow -lkhflow -lksflow +lkiexten -wtsflow
-nopgrp
-echoi -ispaged -ospaged -ihpaged -ohpaged
intr=^C quit=^- erase=^? kill=^U eof=^D eol=^- start=^Q
stop=^S
susp=^- min=01 time=00 pr1=^- pr2=^- pr3=^- pr4=^-
sf1=^-
sf2=^- sf3=^- sf4=^- left=^- right=^- up=^- down=^-
ins=^-
del=^- rub=^- can=^- home=^- end=^-
par=none bits=8 stopb=1 baud=9600 rows=0,0
+DTR +RTS -BRK -cts +dsr -ri +cd ioport=3F8 irq=4


PROGRAM NAME VERSION DATE
file://1/bin/Dev32 Dev32 4.23G Oct 04 1996
file://1/bin/Pipe Pipe 4.23A Feb 26 1996
file://1/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
file://1/bin/Dev32.ser Dev32.ser 4.23I Jun 27 1997
file://1/bin/Dev32.ansi Dev32.ansi 4.23H Nov 21 1996
file://1/bin/Dev32.par Dev32.par 4.23G Oct 04 1996
file://1/bin/Dev32.pty Dev32.pty 4.23G Oct 04 1996


show_pci
Vendor ID = 8086h, INTEL CORPORATION
Device ID = 7112h
PCI index = 0h
Class Code = c0300h Serial Bus (Universal Serial Bus) ProgIF=0
Revision ID = 1h
Bus number = 0
Device number = 7
Function num = 2
Status Reg = 280h
Command Reg = 5h
Header type = 0h Single-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 40h
Cache Line Size= 0h
IO@b000h length 32 bytes
Max Lat = 0ns
Min Gnt = 0ns
PCI Int Pin = 4
PCI Int Pin = INT D
Interrupt line = 10




\

David L. Hawley D.L. Hawley and Associates

I think this will have no effect since the port is hung by the time
the OS comes up. I have tried everything possible (removing flow
control, flushing, etc.) via stty and cannot unstick the port. But, I
will try your idea. I have received some email from Karsten Hoffman
who has had similar problems and has modified Dev.ser a little to
remedy them. He sent me his updated Dev.ser and I will try it.

I will post the results of both tests in a day or two.

Thanks for your suggestion.

Best to you,
Greg Laird


On Tue, 20 Mar 2001 08:31:23 +0100, Per Akesson
<Per.Akesson@carmenta.se> wrote:

Greg Laird wrote:

Hello,
I think that I have found a problem with Dev.ser (or a problem with
Dev.ser on my hardware anyhow). The symptoms are these:


We also have a system that boots with data coming in on the /dev/ser1
port.
But I have never heard nor noticed that the port would get stuck after
boot.

What we do that you could perhaps try, from C-code:

open the port
set the terminal characteristics
tcflow (fd, TCOONHW); /* Get rid of ohpaged flag /
tcflush(fd, TCIOFLUSH); /
Flush pending input/output */=


regards


\

Per =C5kesson
Carmenta AB
SWEDEN