art baker book - chap 8 parallel port loopback driver

Hello

I am having trouble with the parallel port loopback driver in chapter 8 of
Art Baker’s windows 2000 device driver book. I start the user mode
program and then it locks up after transmitting the first packet. Here is
the windbg trace:

PPORT: Write Operation requested (DispatchWrite)
PPORT: Start I/O Operation
PPORT: StartIO: Transmitting first byte of 20
PPORT: TransmitByte: Sending 0x00 () to port 378
PPORT: Wrote to Control: 0x03
PPORT: Read From Status: 0x007
PPORT: TransmitByte read character: 0x000 ()
PPORT: TransmitByte: generating interrupt.

At this point it locks up.

The first time I made my connector, I had a cold solder joint on one of my
pins. However I think I have a good connector now. I am wondering about
the pinouts though. I used the pin numbering on the connector as my
guide. ie. pin 1 on the connector is the pin I chose for pin1. This
makes holding the connector so that long end is on top and the short end
is on the bottom with the pins facing you, pin 1 is the top left and pin
25 is the bottom right.

Also, I did a google and I checked wiring diagram and I found something
which worries me. Instead of wiring pin 12 to pin 14, the loopback
connector pinout showed 12 going to 20. I’m not sure if that is a problem
or not.

Lastly, does the parallel port need to be in a particular setting in the
bios? eg. ecp or epp mode. In windows device manager I have the
following settings:

ECP printer port LPT1
Filter Resource Method: Never use an Interrupt
Enable legacy plug and play detection is unchecked.
Driver Resources are set to automatic settings.

Do I need to disable the existing parallel port driver?

JD

Hello

I forgot to add the following to the beginning of the trace:

PPORT: Interrupt 7 converted to kIrql = 8, kAffinity = 1, kVector = 91
PPORT: Interrupt successfully connected

I also shutdown the machine before I plugged the loopback connector onto
the parallel port.

JD

John F Davis/Raleigh/xxxxx@ibmus
Sent by: xxxxx@lists.osr.com
01/22/2004 11:06 AM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: [ntdev] art baker book - chap 8 parallel port
loopback driver

Hello

I am having trouble with the parallel port loopback driver in chapter 8 of
Art Baker’s windows 2000 device driver book. I start the user mode
program and then it locks up after transmitting the first packet. Here is
the windbg trace:

PPORT: Write Operation requested (DispatchWrite)
PPORT: Start I/O Operation
PPORT: StartIO: Transmitting first byte of 20
PPORT: TransmitByte: Sending 0x00 () to port 378
PPORT: Wrote to Control: 0x03
PPORT: Read From Status: 0x007
PPORT: TransmitByte read character: 0x000 ()
PPORT: TransmitByte: generating interrupt.

At this point it locks up.

The first time I made my connector, I had a cold solder joint on one of my
pins. However I think I have a good connector now. I am wondering about
the pinouts though. I used the pin numbering on the connector as my
guide. ie. pin 1 on the connector is the pin I chose for pin1. This
makes holding the connector so that long end is on top and the short end
is on the bottom with the pins facing you, pin 1 is the top left and pin
25 is the bottom right.

Also, I did a google and I checked wiring diagram and I found something
which worries me. Instead of wiring pin 12 to pin 14, the loopback
connector pinout showed 12 going to 20. I’m not sure if that is a problem
or not.

Lastly, does the parallel port need to be in a particular setting in the
bios? eg. ecp or epp mode. In windows device manager I have the
following settings:

ECP printer port LPT1
Filter Resource Method: Never use an Interrupt
Enable legacy plug and play detection is unchecked.
Driver Resources are set to automatic settings.

Do I need to disable the existing parallel port driver?

JD


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

You probably want to at least set your parallell port to be “use an
interrupt”, so that the interrupt handler gets called.

Another tip is to set a breakpoint in the interrupt handler code. Do you get
there?

Also set a breakpoint at the end of the function “Generating interrupt”.

This web-page seems to be a good one. However, it’s got different sorts of
loopbacks for a variety of test-software, but I would suspect that none of
them are suitable for your work…
http://pages.prodigy.net/dscribner/pub/serial-parallel_loopback_plugs.pdf

Also, try to figure out how it’s generating the interrupt and then figure
out what pin that might end up on.

Finally, connecting 12 to 20 will just ground pin 12, so I suspect that’s
not what you want. Pin 14 is auto-feed, which seems like a better choice, as
it’s at least got some function to it.


Mats

-----Original Message-----
From: John F Davis [mailto:johndavi@us.ibm.com]
Sent: Thursday, January 22, 2004 4:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] art baker book - chap 8 parallel port loopback driver

Hello

I am having trouble with the parallel port loopback driver in
chapter 8 of
Art Baker’s windows 2000 device driver book. I start the user mode
program and then it locks up after transmitting the first
packet. Here is
the windbg trace:

PPORT: Write Operation requested (DispatchWrite)
PPORT: Start I/O Operation
PPORT: StartIO: Transmitting first byte of 20
PPORT: TransmitByte: Sending 0x00 () to port 378
PPORT: Wrote to Control: 0x03
PPORT: Read From Status: 0x007
PPORT: TransmitByte read character: 0x000 ()
PPORT: TransmitByte: generating interrupt.

At this point it locks up.

The first time I made my connector, I had a cold solder joint
on one of my
pins. However I think I have a good connector now. I am
wondering about
the pinouts though. I used the pin numbering on the connector as my
guide. ie. pin 1 on the connector is the pin I chose for pin1. This
makes holding the connector so that long end is on top and
the short end
is on the bottom with the pins facing you, pin 1 is the top
left and pin
25 is the bottom right.

Also, I did a google and I checked wiring diagram and I found
something
which worries me. Instead of wiring pin 12 to pin 14, the loopback
connector pinout showed 12 going to 20. I’m not sure if that
is a problem
or not.

Lastly, does the parallel port need to be in a particular
setting in the
bios? eg. ecp or epp mode. In windows device manager I have the
following settings:

ECP printer port LPT1
Filter Resource Method: Never use an Interrupt
Enable legacy plug and play detection is unchecked.
Driver Resources are set to automatic settings.

Do I need to disable the existing parallel port driver?

JD


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

(let’s see if lyris lets me get messages through again)

when you say that it “locks up” do you mean that the entire system locks
up or just your test application?

Considering when the baker book was written, you might try setting your
parallel port in to bi-directional or normal mode rather than EPP or
ECP. You might also want to configure it with an interrupt - the bios
setting you’ve chosen might keep the controller from generating an
interrupt even if the OS sees that it has one assigned.

of course in normal mode the parallel port interrupt is amazingly
useless (it just tells you when you can start polling for data, rather
than when the other side has strobed some data in) but that’s another
matter.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
Sent: Thursday, January 22, 2004 8:13 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] art baker book - chap 8 parallel port loopback
driver

Hello

I forgot to add the following to the beginning of the trace:

PPORT: Interrupt 7 converted to kIrql = 8, kAffinity = 1, kVector = 91
PPORT: Interrupt successfully connected

I also shutdown the machine before I plugged the loopback connector onto
the parallel port.

JD

John F Davis/Raleigh/xxxxx@ibmus
Sent by: xxxxx@lists.osr.com
01/22/2004 11:06 AM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: [ntdev] art baker book - chap 8 parallel port
loopback driver

Hello

I am having trouble with the parallel port loopback driver in chapter 8
of Art Baker’s windows 2000 device driver book. I start the user mode
program and then it locks up after transmitting the first packet. Here
is the windbg trace:

PPORT: Write Operation requested (DispatchWrite)
PPORT: Start I/O Operation
PPORT: StartIO: Transmitting first byte of 20
PPORT: TransmitByte: Sending 0x00 () to port 378
PPORT: Wrote to Control: 0x03
PPORT: Read From Status: 0x007
PPORT: TransmitByte read character: 0x000 ()
PPORT: TransmitByte: generating interrupt.

At this point it locks up.

The first time I made my connector, I had a cold solder joint on one of
my pins. However I think I have a good connector now. I am wondering
about the pinouts though. I used the pin numbering on the connector as
my guide. ie. pin 1 on the connector is the pin I chose for pin1. This
makes holding the connector so that long end is on top and the short end
is on the bottom with the pins facing you, pin 1 is the top left and pin
25 is the bottom right.

Also, I did a google and I checked wiring diagram and I found something
which worries me. Instead of wiring pin 12 to pin 14, the loopback
connector pinout showed 12 going to 20. I’m not sure if that is a
problem or not.

Lastly, does the parallel port need to be in a particular setting in the
bios? eg. ecp or epp mode. In windows device manager I have the
following settings:

ECP printer port LPT1
Filter Resource Method: Never use an Interrupt Enable legacy plug and
play detection is unchecked.
Driver Resources are set to automatic settings.

Do I need to disable the existing parallel port driver?

JD


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

Mats,

Thanks for the help, but it still doesn’t work. I do have some more info
and more questions though.

Comments:
I changed bios setting for the parallel port to be standard
bidirectional instead of ECP. It did not help.

I tried to disable the existing driver. It did not help.

I tried to change the interrupt setting for the existing driver to
be Filter Resource Method - use any interrupt assigned to the port. I did
this with the port renabled in std mode and it did not help.

Question:
I have not been able to get debugging break points to work. I
meant to ask about this earlier. I am using win2k on the target machine
with the stock build. I don’t have a copy of MSDN so I can’t get the
debug symbols for Win2k. However, I thought I could still debug my own
driver. I built my driver using the checked build environment. I get a
.pdb file when I build my driver. I build on my host machine and run
windbg on my host machine. In windbg, I select File->Symbol File Path…
and then in the dialog which pops up, I browse to the directory ie.
(…/ch8driver/i386) which has my driver symbol file and click ok.
Afterwards, when I try to set the breakpoint, I get this error :*** ERROR:
Module load completed but symbols could not be loaded for parport.sys. My
debug symbol file is called PPort.pdb and my driver file is called
PPort.sys. Why is it looking for a different named file?

JD

xxxxx@3Dlabs.com
Sent by: xxxxx@lists.osr.com
01/22/2004 11:36 AM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: RE: [ntdev] art baker book - chap 8 parallel port
loopback driver

You probably want to at least set your parallell port to be “use an
interrupt”, so that the interrupt handler gets called.

Another tip is to set a breakpoint in the interrupt handler code. Do you
get
there?

Also set a breakpoint at the end of the function “Generating interrupt”.

This web-page seems to be a good one. However, it’s got different sorts of
loopbacks for a variety of test-software, but I would suspect that none of
them are suitable for your work…
http://pages.prodigy.net/dscribner/pub/serial-parallel_loopback_plugs.pdf

Also, try to figure out how it’s generating the interrupt and then figure
out what pin that might end up on.

Finally, connecting 12 to 20 will just ground pin 12, so I suspect that’s
not what you want. Pin 14 is auto-feed, which seems like a better choice,
as
it’s at least got some function to it.


Mats

> -----Original Message-----
> From: John F Davis [mailto:johndavi@us.ibm.com]
> Sent: Thursday, January 22, 2004 4:07 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] art baker book - chap 8 parallel port loopback driver
>
>
> Hello
>
> I am having trouble with the parallel port loopback driver in
> chapter 8 of
> Art Baker’s windows 2000 device driver book. I start the user mode
> program and then it locks up after transmitting the first
> packet. Here is
> the windbg trace:
>
> PPORT: Write Operation requested (DispatchWrite)
> PPORT: Start I/O Operation
> PPORT: StartIO: Transmitting first byte of 20
> PPORT: TransmitByte: Sending 0x00 () to port 378
> PPORT: Wrote to Control: 0x03
> PPORT: Read From Status: 0x007
> PPORT: TransmitByte read character: 0x000 ()
> PPORT: TransmitByte: generating interrupt.
>
> At this point it locks up.
>
> The first time I made my connector, I had a cold solder joint
> on one of my
> pins. However I think I have a good connector now. I am
> wondering about
> the pinouts though. I used the pin numbering on the connector as my
> guide. ie. pin 1 on the connector is the pin I chose for pin1. This
> makes holding the connector so that long end is on top and
> the short end
> is on the bottom with the pins facing you, pin 1 is the top
> left and pin
> 25 is the bottom right.
>
> Also, I did a google and I checked wiring diagram and I found
> something
> which worries me. Instead of wiring pin 12 to pin 14, the loopback
> connector pinout showed 12 going to 20. I’m not sure if that
> is a problem
> or not.
>
> Lastly, does the parallel port need to be in a particular
> setting in the
> bios? eg. ecp or epp mode. In windows device manager I have the
> following settings:
>
> ECP printer port LPT1
> Filter Resource Method: Never use an Interrupt
> Enable legacy plug and play detection is unchecked.
> Driver Resources are set to automatic settings.
>
> Do I need to disable the existing parallel port driver?
>
> JD
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hello Peter,

Thanks for the help. Its still not working though. Here are my
additional comments.

When I say locks up, I mean that the user mode program which tries to
exercise the driver locks up. I have to hit ctrl-c to get back the
prompt.

As far as bios setting goes it seems to agree with the driver code.

Bios:
Parallel Port - 0x378
Parallel Port Mode - Standard
Parallel Port IRQ - IRQ 7

Beneath that in gray (ie. not changable settings) it says:
Parallel Port Extended Mode - Bidirectional
Parallel Port Extended Mode DMA - No DMA

Driver code:
status = CreateDevice(pDriverObject, ulDeviceNumber,0x378,
0x7);

JD

“Peter Wieland”
Sent by: xxxxx@lists.osr.com
01/22/2004 12:30 PM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: RE: [ntdev] art baker book - chap 8 parallel port
loopback driver

(let’s see if lyris lets me get messages through again)

when you say that it “locks up” do you mean that the entire system locks
up or just your test application?

Considering when the baker book was written, you might try setting your
parallel port in to bi-directional or normal mode rather than EPP or
ECP. You might also want to configure it with an interrupt - the bios
setting you’ve chosen might keep the controller from generating an
interrupt even if the OS sees that it has one assigned.

of course in normal mode the parallel port interrupt is amazingly
useless (it just tells you when you can start polling for data, rather
than when the other side has strobed some data in) but that’s another
matter.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
Sent: Thursday, January 22, 2004 8:13 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] art baker book - chap 8 parallel port loopback
driver

Hello

I forgot to add the following to the beginning of the trace:

PPORT: Interrupt 7 converted to kIrql = 8, kAffinity = 1, kVector = 91
PPORT: Interrupt successfully connected

I also shutdown the machine before I plugged the loopback connector onto
the parallel port.

JD

John F Davis/Raleigh/xxxxx@ibmus
Sent by: xxxxx@lists.osr.com
01/22/2004 11:06 AM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: [ntdev] art baker book - chap 8 parallel port
loopback driver

Hello

I am having trouble with the parallel port loopback driver in chapter 8
of Art Baker’s windows 2000 device driver book. I start the user mode
program and then it locks up after transmitting the first packet. Here
is the windbg trace:

PPORT: Write Operation requested (DispatchWrite)
PPORT: Start I/O Operation
PPORT: StartIO: Transmitting first byte of 20
PPORT: TransmitByte: Sending 0x00 () to port 378
PPORT: Wrote to Control: 0x03
PPORT: Read From Status: 0x007
PPORT: TransmitByte read character: 0x000 ()
PPORT: TransmitByte: generating interrupt.

At this point it locks up.

The first time I made my connector, I had a cold solder joint on one of
my pins. However I think I have a good connector now. I am wondering
about the pinouts though. I used the pin numbering on the connector as
my guide. ie. pin 1 on the connector is the pin I chose for pin1. This
makes holding the connector so that long end is on top and the short end
is on the bottom with the pins facing you, pin 1 is the top left and pin
25 is the bottom right.

Also, I did a google and I checked wiring diagram and I found something
which worries me. Instead of wiring pin 12 to pin 14, the loopback
connector pinout showed 12 going to 20. I’m not sure if that is a
problem or not.

Lastly, does the parallel port need to be in a particular setting in the
bios? eg. ecp or epp mode. In windows device manager I have the
following settings:

ECP printer port LPT1
Filter Resource Method: Never use an Interrupt Enable legacy plug and
play detection is unchecked.
Driver Resources are set to automatic settings.

Do I need to disable the existing parallel port driver?

JD


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

you could put a dbgprint in the isr to see if it’s ever called since you
seem to have problems with breakpoints.

when you set breakpoints make sure you qualify them with the module name
or the debugger might try loading all sorts of random symbols. bp
mydriver!function_name.

you may have trouble using the parallel port on an ACPI system. They
typcially turn ports off if they’re disabled or if no driver is
installed for them, so if you disable the port or remove the parport
driver as the service then you may not actually be able to use the ports
(they just return 0xff when you read from them). I had this problem on
a test machine of mine when I was poking at the ports for the COM
controller through the debugger when the device was disabled.

if you think this is the problem (read the port in the debugger and see
if you get back 0xff) you could try changing the HAL on the system to
the non-ACPI version. Select the node under Computer in the device
manager, update driver, select “install from a list or …” and hit
next, select “don’t search …” and hit next, and select either “MPS
Multiprocessor PC” or “standard PC” depending on what you have. You’ll
have to reboot a few times and it will reinstall a lot of devices - I
don’t recommend doing this on your development system but it’s okay for
just screwing around with the hardware.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
Sent: Thursday, January 22, 2004 9:53 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] art baker book - chap 8 parallel port loopback
driver

Hello Peter,

Thanks for the help. Its still not working though. Here are my
additional comments.

When I say locks up, I mean that the user mode program which tries to
exercise the driver locks up. I have to hit ctrl-c to get back the
prompt.

As far as bios setting goes it seems to agree with the driver code.

Bios:
Parallel Port - 0x378
Parallel Port Mode - Standard
Parallel Port IRQ - IRQ 7

Beneath that in gray (ie. not changable settings) it says:
Parallel Port Extended Mode - Bidirectional
Parallel Port Extended Mode DMA - No DMA

Driver code:
status = CreateDevice(pDriverObject,
ulDeviceNumber,0x378,
0x7);

JD

“Peter Wieland” Sent by:
xxxxx@lists.osr.com
01/22/2004 12:30 PM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: RE: [ntdev] art baker book - chap 8 parallel
port
loopback driver

(let’s see if lyris lets me get messages through again)

when you say that it “locks up” do you mean that the entire system locks
up or just your test application?

Considering when the baker book was written, you might try setting your
parallel port in to bi-directional or normal mode rather than EPP or
ECP. You might also want to configure it with an interrupt - the bios
setting you’ve chosen might keep the controller from generating an
interrupt even if the OS sees that it has one assigned.

of course in normal mode the parallel port interrupt is amazingly
useless (it just tells you when you can start polling for data, rather
than when the other side has strobed some data in) but that’s another
matter.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
Sent: Thursday, January 22, 2004 8:13 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] art baker book - chap 8 parallel port loopback
driver

Hello

I forgot to add the following to the beginning of the trace:

PPORT: Interrupt 7 converted to kIrql = 8, kAffinity = 1, kVector = 91
PPORT: Interrupt successfully connected

I also shutdown the machine before I plugged the loopback connector onto
the parallel port.

JD

John F Davis/Raleigh/xxxxx@ibmus
Sent by: xxxxx@lists.osr.com
01/22/2004 11:06 AM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: [ntdev] art baker book - chap 8 parallel port
loopback driver

Hello

I am having trouble with the parallel port loopback driver in chapter 8
of Art Baker’s windows 2000 device driver book. I start the user mode
program and then it locks up after transmitting the first packet. Here
is the windbg trace:

PPORT: Write Operation requested (DispatchWrite)
PPORT: Start I/O Operation
PPORT: StartIO: Transmitting first byte of 20
PPORT: TransmitByte: Sending 0x00 () to port 378
PPORT: Wrote to Control: 0x03
PPORT: Read From Status: 0x007
PPORT: TransmitByte read character: 0x000 ()
PPORT: TransmitByte: generating interrupt.

At this point it locks up.

The first time I made my connector, I had a cold solder joint on one of
my pins. However I think I have a good connector now. I am wondering
about the pinouts though. I used the pin numbering on the connector as
my guide. ie. pin 1 on the connector is the pin I chose for pin1. This
makes holding the connector so that long end is on top and the short end
is on the bottom with the pins facing you, pin 1 is the top left and pin
25 is the bottom right.

Also, I did a google and I checked wiring diagram and I found something
which worries me. Instead of wiring pin 12 to pin 14, the loopback
connector pinout showed 12 going to 20. I’m not sure if that is a
problem or not.

Lastly, does the parallel port need to be in a particular setting in the
bios? eg. ecp or epp mode. In windows device manager I have the
following settings:

ECP printer port LPT1
Filter Resource Method: Never use an Interrupt Enable legacy plug and
play detection is unchecked.
Driver Resources are set to automatic settings.

Do I need to disable the existing parallel port driver?

JD


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

I’ll try to answer your debugging questions tomorrow, if no-one else has
answered. I’m about to go home (should’ve got out the door about 10 minutes
ago, really).


Mats

-----Original Message-----
From: John F Davis [mailto:johndavi@us.ibm.com]
Sent: Thursday, January 22, 2004 5:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] art baker book - chap 8 parallel port loopback
driver

Mats,

Thanks for the help, but it still doesn’t work. I do have
some more info
and more questions though.

Comments:
I changed bios setting for the parallel port to be standard
bidirectional instead of ECP. It did not help.

I tried to disable the existing driver. It did not help.

I tried to change the interrupt setting for the
existing driver to
be Filter Resource Method - use any interrupt assigned to the
port. I did
this with the port renabled in std mode and it did not help.

Question:
I have not been able to get debugging break points to
work. I
meant to ask about this earlier. I am using win2k on the
target machine
with the stock build. I don’t have a copy of MSDN so I can’t get the
debug symbols for Win2k. However, I thought I could still
debug my own
driver. I built my driver using the checked build
environment. I get a
.pdb file when I build my driver. I build on my host machine and run
windbg on my host machine. In windbg, I select File->Symbol
File Path…
and then in the dialog which pops up, I browse to the directory ie.
(…/ch8driver/i386) which has my driver symbol file and click ok.
Afterwards, when I try to set the breakpoint, I get this
error :*** ERROR:
Module load completed but symbols could not be loaded for
parport.sys. My
debug symbol file is called PPort.pdb and my driver file is called
PPort.sys. Why is it looking for a different named file?

JD

xxxxx@3Dlabs.com
Sent by: xxxxx@lists.osr.com
01/22/2004 11:36 AM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

> cc:
> Subject: RE: [ntdev] art baker book - chap 8
> parallel port
> loopback driver
>
>
> You probably want to at least set your parallell port to be “use an
> interrupt”, so that the interrupt handler gets called.
>
> Another tip is to set a breakpoint in the interrupt handler
> code. Do you
> get
> there?
>
> Also set a breakpoint at the end of the function “Generating
> interrupt”.
>
> This web-page seems to be a good one. However, it’s got
> different sorts of
> loopbacks for a variety of test-software, but I would suspect
> that none of
> them are suitable for your work…
> http://pages.prodigy.net/dscribner/pub/serial-parallel_loopbac
> k_plugs.pdf
>
>
> Also, try to figure out how it’s generating the interrupt and
> then figure
> out what pin that might end up on.
>
> Finally, connecting 12 to 20 will just ground pin 12, so I
> suspect that’s
> not what you want. Pin 14 is auto-feed, which seems like a
> better choice,
> as
> it’s at least got some function to it.
>
> –
> Mats
>
> > -----Original Message-----
> > From: John F Davis [mailto:johndavi@us.ibm.com]
> > Sent: Thursday, January 22, 2004 4:07 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] art baker book - chap 8 parallel port
> loopback driver
> >
> >
> > Hello
> >
> > I am having trouble with the parallel port loopback driver in
> > chapter 8 of
> > Art Baker’s windows 2000 device driver book. I start the user mode
> > program and then it locks up after transmitting the first
> > packet. Here is
> > the windbg trace:
> >
> > PPORT: Write Operation requested (DispatchWrite)
> > PPORT: Start I/O Operation
> > PPORT: StartIO: Transmitting first byte of 20
> > PPORT: TransmitByte: Sending 0x00 () to port 378
> > PPORT: Wrote to Control: 0x03
> > PPORT: Read From Status: 0x007
> > PPORT: TransmitByte read character: 0x000 ()
> > PPORT: TransmitByte: generating interrupt.
> >
> > At this point it locks up.
> >
> > The first time I made my connector, I had a cold solder joint
> > on one of my
> > pins. However I think I have a good connector now. I am
> > wondering about
> > the pinouts though. I used the pin numbering on the connector as my
> > guide. ie. pin 1 on the connector is the pin I chose for
> pin1. This
> > makes holding the connector so that long end is on top and
> > the short end
> > is on the bottom with the pins facing you, pin 1 is the top
> > left and pin
> > 25 is the bottom right.
> >
> > Also, I did a google and I checked wiring diagram and I found
> > something
> > which worries me. Instead of wiring pin 12 to pin 14, the loopback
> > connector pinout showed 12 going to 20. I’m not sure if that
> > is a problem
> > or not.
> >
> > Lastly, does the parallel port need to be in a particular
> > setting in the
> > bios? eg. ecp or epp mode. In windows device manager I have the
> > following settings:
> >
> > ECP printer port LPT1
> > Filter Resource Method: Never use an Interrupt
> > Enable legacy plug and play detection is unchecked.
> > Driver Resources are set to automatic settings.
> >
> > Do I need to disable the existing parallel port driver?
> >
> > JD
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: johndavi@us.ibm.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Peter,

Thanks for the info. Here are more comments and questions:

  1. I already have a dbgprint line in the isr. It is not displaying.
    That’s how I know I am never reaching the isr routine.

  2. You the man. bp PPORT!TransmitByte works. That leads me to believe I
    was totally messed up. I was trying to set a breakpoint on the DbgPrint
    line in the body of the code. Could this mean I don’t have full debugging
    info?

  3. Ok. I will try reading the port in the debugger and changing the
    system from ACPI to standard PC. Many thanks.

JD

“Peter Wieland”
Sent by: xxxxx@lists.osr.com
01/22/2004 01:28 PM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: RE: [ntdev] art baker book - chap 8 parallel port
loopback driver

you could put a dbgprint in the isr to see if it’s ever called since you
seem to have problems with breakpoints.

when you set breakpoints make sure you qualify them with the module name
or the debugger might try loading all sorts of random symbols. bp
mydriver!function_name.

you may have trouble using the parallel port on an ACPI system. They
typcially turn ports off if they’re disabled or if no driver is
installed for them, so if you disable the port or remove the parport
driver as the service then you may not actually be able to use the ports
(they just return 0xff when you read from them). I had this problem on
a test machine of mine when I was poking at the ports for the COM
controller through the debugger when the device was disabled.

if you think this is the problem (read the port in the debugger and see
if you get back 0xff) you could try changing the HAL on the system to
the non-ACPI version. Select the node under Computer in the device
manager, update driver, select “install from a list or …” and hit
next, select “don’t search …” and hit next, and select either “MPS
Multiprocessor PC” or “standard PC” depending on what you have. You’ll
have to reboot a few times and it will reinstall a lot of devices - I
don’t recommend doing this on your development system but it’s okay for
just screwing around with the hardware.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
Sent: Thursday, January 22, 2004 9:53 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] art baker book - chap 8 parallel port loopback
driver

Hello Peter,

Thanks for the help. Its still not working though. Here are my
additional comments.

When I say locks up, I mean that the user mode program which tries to
exercise the driver locks up. I have to hit ctrl-c to get back the
prompt.

As far as bios setting goes it seems to agree with the driver code.

Bios:
Parallel Port - 0x378
Parallel Port Mode - Standard
Parallel Port IRQ - IRQ 7

Beneath that in gray (ie. not changable settings) it says:
Parallel Port Extended Mode - Bidirectional
Parallel Port Extended Mode DMA - No DMA

Driver code:
status = CreateDevice(pDriverObject,
ulDeviceNumber,0x378,
0x7);

JD

“Peter Wieland” Sent by:
xxxxx@lists.osr.com
01/22/2004 12:30 PM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: RE: [ntdev] art baker book - chap 8 parallel
port
loopback driver

(let’s see if lyris lets me get messages through again)

when you say that it “locks up” do you mean that the entire system locks
up or just your test application?

Considering when the baker book was written, you might try setting your
parallel port in to bi-directional or normal mode rather than EPP or
ECP. You might also want to configure it with an interrupt - the bios
setting you’ve chosen might keep the controller from generating an
interrupt even if the OS sees that it has one assigned.

of course in normal mode the parallel port interrupt is amazingly
useless (it just tells you when you can start polling for data, rather
than when the other side has strobed some data in) but that’s another
matter.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
Sent: Thursday, January 22, 2004 8:13 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] art baker book - chap 8 parallel port loopback
driver

Hello

I forgot to add the following to the beginning of the trace:

PPORT: Interrupt 7 converted to kIrql = 8, kAffinity = 1, kVector = 91
PPORT: Interrupt successfully connected

I also shutdown the machine before I plugged the loopback connector onto
the parallel port.

JD

John F Davis/Raleigh/xxxxx@ibmus
Sent by: xxxxx@lists.osr.com
01/22/2004 11:06 AM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

cc:
Subject: [ntdev] art baker book - chap 8 parallel port
loopback driver

Hello

I am having trouble with the parallel port loopback driver in chapter 8
of Art Baker’s windows 2000 device driver book. I start the user mode
program and then it locks up after transmitting the first packet. Here
is the windbg trace:

PPORT: Write Operation requested (DispatchWrite)
PPORT: Start I/O Operation
PPORT: StartIO: Transmitting first byte of 20
PPORT: TransmitByte: Sending 0x00 () to port 378
PPORT: Wrote to Control: 0x03
PPORT: Read From Status: 0x007
PPORT: TransmitByte read character: 0x000 ()
PPORT: TransmitByte: generating interrupt.

At this point it locks up.

The first time I made my connector, I had a cold solder joint on one of
my pins. However I think I have a good connector now. I am wondering
about the pinouts though. I used the pin numbering on the connector as
my guide. ie. pin 1 on the connector is the pin I chose for pin1. This
makes holding the connector so that long end is on top and the short end
is on the bottom with the pins facing you, pin 1 is the top left and pin
25 is the bottom right.

Also, I did a google and I checked wiring diagram and I found something
which worries me. Instead of wiring pin 12 to pin 14, the loopback
connector pinout showed 12 going to 20. I’m not sure if that is a
problem or not.

Lastly, does the parallel port need to be in a particular setting in the
bios? eg. ecp or epp mode. In windows device manager I have the
following settings:

ECP printer port LPT1
Filter Resource Method: Never use an Interrupt Enable legacy plug and
play detection is unchecked.
Driver Resources are set to automatic settings.

Do I need to disable the existing parallel port driver?

JD


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: johndavi@us.ibm.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Make sure you are using the latest version of windbg (released or beta). You
can get that here: http://www.microsoft.com/whdc/ddk/debugging/default.mspx

Read the online documentation about setting the debugger up to access the
public symbol server:
http://www.microsoft.com/whdc/ddk/debugging/symbols.mspx

When you are having trouble setting breakpoints, a good trick is to add a
‘break on entry’ code path to your DriverEntry routine. This uses a flag you
setup in the registry (Services\YourDriver\Parameters\BreakOnEntry) and/or a
conditional compilation flag to force your driver into a breakpoint. Once
there you can fix up whatever is wrong with windbg and its symbol
resolution. Use !sym noisy to see what windbg is doing when trying to
resolve symbols.

You do not need MSDN access at all. The DDK + the free windbg + the public
symbol server are sufficient.

=====================
Mark Roddy

-----Original Message-----
From: John F Davis [mailto:johndavi@us.ibm.com]
Sent: Thursday, January 22, 2004 12:42 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] art baker book - chap 8 parallel port
loopback driver

Mats,

Thanks for the help, but it still doesn’t work. I do have
some more info and more questions though.

Comments:
I changed bios setting for the parallel port to be
standard bidirectional instead of ECP. It did not help.

I tried to disable the existing driver. It did not help.

I tried to change the interrupt setting for the
existing driver to be Filter Resource Method - use any
interrupt assigned to the port. I did this with the port
renabled in std mode and it did not help.

Question:
I have not been able to get debugging break points to
work. I meant to ask about this earlier. I am using win2k
on the target machine with the stock build. I don’t have a
copy of MSDN so I can’t get the debug symbols for Win2k.
However, I thought I could still debug my own driver. I
built my driver using the checked build environment. I get a
.pdb file when I build my driver. I build on my host machine
and run windbg on my host machine. In windbg, I select
File->Symbol File Path…
and then in the dialog which pops up, I browse to the directory ie.
(…/ch8driver/i386) which has my driver symbol file and click ok.
Afterwards, when I try to set the breakpoint, I get this
error :*** ERROR:
Module load completed but symbols could not be loaded for
parport.sys. My debug symbol file is called PPort.pdb and my
driver file is called PPort.sys. Why is it looking for a
different named file?

JD

xxxxx@3Dlabs.com
Sent by: xxxxx@lists.osr.com
01/22/2004 11:36 AM
Please respond to “Windows System Software Devs Interest List”

To: “Windows System Software Devs Interest List”

> cc:
> Subject: RE: [ntdev] art baker book - chap 8
> parallel port
> loopback driver
>
>
> You probably want to at least set your parallell port to be
> “use an interrupt”, so that the interrupt handler gets called.
>
> Another tip is to set a breakpoint in the interrupt handler
> code. Do you get there?
>
> Also set a breakpoint at the end of the function “Generating
> interrupt”.
>
> This web-page seems to be a good one. However, it’s got
> different sorts of loopbacks for a variety of test-software,
> but I would suspect that none of them are suitable for your work…
> http://pages.prodigy.net/dscribner/pub/serial-parallel_loopbac
> k_plugs.pdf
>
>
> Also, try to figure out how it’s generating the interrupt and
> then figure out what pin that might end up on.
>
> Finally, connecting 12 to 20 will just ground pin 12, so I
> suspect that’s not what you want. Pin 14 is auto-feed, which
> seems like a better choice, as it’s at least got some function to it.
>
> –
> Mats
>
> > -----Original Message-----
> > From: John F Davis [mailto:johndavi@us.ibm.com]
> > Sent: Thursday, January 22, 2004 4:07 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] art baker book - chap 8 parallel port
> loopback driver
> >
> >
> > Hello
> >
> > I am having trouble with the parallel port loopback driver
> in chapter
> > 8 of Art Baker’s windows 2000 device driver book. I start the user
> > mode program and then it locks up after transmitting the
> first packet.
> > Here is the windbg trace:
> >
> > PPORT: Write Operation requested (DispatchWrite)
> > PPORT: Start I/O Operation
> > PPORT: StartIO: Transmitting first byte of 20
> > PPORT: TransmitByte: Sending 0x00 () to port 378
> > PPORT: Wrote to Control: 0x03
> > PPORT: Read From Status: 0x007
> > PPORT: TransmitByte read character: 0x000 ()
> > PPORT: TransmitByte: generating interrupt.
> >
> > At this point it locks up.
> >
> > The first time I made my connector, I had a cold solder
> joint on one
> > of my pins. However I think I have a good connector now. I am
> > wondering about the pinouts though. I used the pin
> numbering on the
> > connector as my guide. ie. pin 1 on the connector is the
> pin I chose
> > for pin1. This makes holding the connector so that long
> end is on top
> > and the short end is on the bottom with the pins facing
> you, pin 1 is
> > the top left and pin
> > 25 is the bottom right.
> >
> > Also, I did a google and I checked wiring diagram and I found
> > something which worries me. Instead of wiring pin 12 to
> pin 14, the
> > loopback connector pinout showed 12 going to 20. I’m not
> sure if that
> > is a problem or not.
> >
> > Lastly, does the parallel port need to be in a particular
> setting in
> > the bios? eg. ecp or epp mode. In windows device manager
> I have the
> > following settings:
> >
> > ECP printer port LPT1
> > Filter Resource Method: Never use an Interrupt Enable
> legacy plug and
> > play detection is unchecked.
> > Driver Resources are set to automatic settings.
> >
> > Do I need to disable the existing parallel port driver?
> >
> > JD
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@3dlabs.com To unsubscribe send a blank email
> to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: johndavi@us.ibm.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@stratus.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

If your breakpoints end up in the wrong place you have a mismatch between
source code, executable image and symbols. Generally windbg takes care that
the symbols match the image, but it has no such mechanism to determine that
the source matches up with the other two. Once again use verbose mode for
symbol lookup, and !drivers or lm lv to see what is actually on your test
system.

=====================
Mark Roddy

-----Original Message-----
From: John F Davis [mailto:johndavi@us.ibm.com]
Sent: Thursday, January 22, 2004 1:50 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] art baker book - chap 8 parallel port
loopback driver

Peter,

Thanks for the info. Here are more comments and questions:

  1. I already have a dbgprint line in the isr. It is not displaying.
    That’s how I know I am never reaching the isr routine.

  2. You the man. bp PPORT!TransmitByte works. That leads me
    to believe I was totally messed up. I was trying to set a
    breakpoint on the DbgPrint line in the body of the code.
    Could this mean I don’t have full debugging info?

  3. Ok. I will try reading the port in the debugger and
    changing the system from ACPI to standard PC. Many thanks.

JD

“Peter Wieland” Sent by:
> xxxxx@lists.osr.com
> 01/22/2004 01:28 PM
> Please respond to “Windows System Software Devs Interest List”
>
> To: “Windows System Software Devs Interest List”
>
> cc:
> Subject: RE: [ntdev] art baker book - chap 8
> parallel port
> loopback driver
>
>
> you could put a dbgprint in the isr to see if it’s ever
> called since you seem to have problems with breakpoints.
>
> when you set breakpoints make sure you qualify them with the
> module name or the debugger might try loading all sorts of
> random symbols. bp mydriver!function_name.
>
> you may have trouble using the parallel port on an ACPI
> system. They typcially turn ports off if they’re disabled or
> if no driver is installed for them, so if you disable the
> port or remove the parport driver as the service then you may
> not actually be able to use the ports (they just return 0xff
> when you read from them). I had this problem on a test
> machine of mine when I was poking at the ports for the COM
> controller through the debugger when the device was disabled.
>
> if you think this is the problem (read the port in the
> debugger and see if you get back 0xff) you could try changing
> the HAL on the system to the non-ACPI version. Select the
> node under Computer in the device manager, update driver,
> select “install from a list or …” and hit next, select
> “don’t search …” and hit next, and select either “MPS
> Multiprocessor PC” or “standard PC” depending on what you
> have. You’ll have to reboot a few times and it will
> reinstall a lot of devices - I don’t recommend doing this on
> your development system but it’s okay for just screwing
> around with the hardware.
>
> -p
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
> Sent: Thursday, January 22, 2004 9:53 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] art baker book - chap 8 parallel port
> loopback driver
>
> Hello Peter,
>
> Thanks for the help. Its still not working though. Here are
> my additional comments.
>
> When I say locks up, I mean that the user mode program which
> tries to exercise the driver locks up. I have to hit ctrl-c
> to get back the prompt.
>
> As far as bios setting goes it seems to agree with the driver code.
>
> Bios:
> Parallel Port - 0x378
> Parallel Port Mode - Standard
> Parallel Port IRQ - IRQ 7
>
> Beneath that in gray (ie. not changable settings) it says:
> Parallel Port Extended Mode - Bidirectional Parallel Port
> Extended Mode DMA - No DMA
>
> Driver code:
> status = CreateDevice(pDriverObject,
> ulDeviceNumber,0x378,
> 0x7);
>
>
> JD
>
>
>
>
> “Peter Wieland” Sent by:
> xxxxx@lists.osr.com
> 01/22/2004 12:30 PM
> Please respond to “Windows System Software Devs Interest List”
>
> To: “Windows System Software Devs Interest List”
>
> cc:
> Subject: RE: [ntdev] art baker book - chap 8 parallel
> port
> loopback driver
>
>
> (let’s see if lyris lets me get messages through again)
>
> when you say that it “locks up” do you mean that the entire
> system locks up or just your test application?
>
> Considering when the baker book was written, you might try
> setting your parallel port in to bi-directional or normal
> mode rather than EPP or ECP. You might also want to
> configure it with an interrupt - the bios setting you’ve
> chosen might keep the controller from generating an interrupt
> even if the OS sees that it has one assigned.
>
> of course in normal mode the parallel port interrupt is
> amazingly useless (it just tells you when you can start
> polling for data, rather than when the other side has strobed
> some data in) but that’s another matter.
>
> -p
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of John F Davis
> Sent: Thursday, January 22, 2004 8:13 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] art baker book - chap 8 parallel port
> loopback driver
>
> Hello
>
> I forgot to add the following to the beginning of the trace:
>
> PPORT: Interrupt 7 converted to kIrql = 8, kAffinity = 1, kVector = 91
> PPORT: Interrupt successfully connected
>
> I also shutdown the machine before I plugged the loopback
> connector onto the parallel port.
>
> JD
>
>
>
>
> John F Davis/Raleigh/xxxxx@ibmus
> Sent by: xxxxx@lists.osr.com
> 01/22/2004 11:06 AM
> Please respond to “Windows System Software Devs Interest List”
>
> To: “Windows System Software Devs Interest List”
>
> cc:
> Subject: [ntdev] art baker book - chap 8 parallel port
> loopback driver
>
>
> Hello
>
> I am having trouble with the parallel port loopback driver in
> chapter 8 of Art Baker’s windows 2000 device driver book. I
> start the user mode program and then it locks up after
> transmitting the first packet. Here is the windbg trace:
>
> PPORT: Write Operation requested (DispatchWrite)
> PPORT: Start I/O Operation
> PPORT: StartIO: Transmitting first byte of 20
> PPORT: TransmitByte: Sending 0x00 () to port 378
> PPORT: Wrote to Control: 0x03
> PPORT: Read From Status: 0x007
> PPORT: TransmitByte read character: 0x000 ()
> PPORT: TransmitByte: generating interrupt.
>
> At this point it locks up.
>
> The first time I made my connector, I had a cold solder joint
> on one of my pins. However I think I have a good connector
> now. I am wondering about the pinouts though. I used the
> pin numbering on the connector as my guide. ie. pin 1 on the
> connector is the pin I chose for pin1. This makes holding
> the connector so that long end is on top and the short end is
> on the bottom with the pins facing you, pin 1 is the top left and pin
> 25 is the bottom right.
>
> Also, I did a google and I checked wiring diagram and I found
> something which worries me. Instead of wiring pin 12 to pin
> 14, the loopback connector pinout showed 12 going to 20. I’m
> not sure if that is a problem or not.
>
> Lastly, does the parallel port need to be in a particular
> setting in the bios? eg. ecp or epp mode. In windows
> device manager I have the following settings:
>
> ECP printer port LPT1
> Filter Resource Method: Never use an Interrupt Enable legacy
> plug and play detection is unchecked.
> Driver Resources are set to automatic settings.
>
> Do I need to disable the existing parallel port driver?
>
> JD
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: johndavi@us.ibm.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@microsoft.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: johndavi@us.ibm.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@windows.microsoft.com To unsubscribe send a blank
> email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: johndavi@us.ibm.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@stratus.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

> > with the stock build. I don’t have a copy of MSDN so I can’t get the

> debug symbols for Win2k. However, I thought I could still

You don’t need MSDN anymore to get symbols.

  1. Get the latest version of Windbg if you don’t have it already (the
    “beta” version).
  2. Find the Microsoft web page that says “how to get symbols” or “using
    the symbol server” and set the debugger up to use the symbol server (if you
    are online while debugging).
  3. If not online while debugging, go to www.technet.net and hunt around
    for the service pack page that matches what you have installed. Down under
    something like “Customer diagnostics” you will find the symbol file
    downloads. But the symbol server is usally better.

Once you have that stuff (latest Windbg with symbol server setup by
preference) you should be in fat city.

On how to configure the parallel port - probably either bog standard or EPP.
ECP somewhat presumes that you are going to be pushing formatted messages
across the port for input.

Check how the loopback thing is supposed to be wired. If you are looping
for data bits into other signals like paper out and end of page, then bog
standard will be the right way to go, and things liek ECP might confuse the
issue. Come to think of it, if you have a loopback plug at all, bog
standard is correct, since all the other modes use the data pins
bidirectionally.

Loren

> 2. Find the Microsoft web page that says “how to get symbols” or "using

the symbol server" and set the debugger up to use the symbol server (if you
are online while debugging).

.symfix command in latest WinDbg sets up the symbol server connection
automatically.

It requires a good Internet connection to download around 10MB first time
you’re stalled on a breakpoint and said “kb”, so be prepared. 1Mpbs ADSL is OK,
dialup is definitely not.

Otherwise, create a symbol directory for each OS+SP combination and take the
symbols from MSDN CDs. This also works.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com