Hi all,
I’m new at this list and also in driver coding, by now I need some ideas
at last to understand what is happening with my system.
Primarily I’m a hardware designer. Today I have a PCI board with 3
different functions but each one has a 16550 interface to the PCI bus. I
wanna to see my board as 3 COM ports in my system. I’m trying to use
the windows supplied serial.sys and serenum.sys to do the hard job for me.
So my part of the job is just to wrote a INF file. Now I have the 3 port
visible in my system, I can open the ports, read data generated by my
functions on PCI card, but I can’t write some data do my card, when I try
this I get a “write timerout error” from the serial.sys. When any of my 3
ports are opened and I insue an output directly to the address of TX (in
the virtual 16550), my board acept the data and works fine. When I use the
API (and the drivers), I get the error and the data is not posted to the
card. Someone has some ideia where to start the debuging?
Thaks a lot.
–
Gustavo V Vargas
xxxxx@hsssistemas.com.br
Hi (Oi) Gustavo:
(1) Write timeout error is an error that is returned with a program uses
IOCTL_SERIAL_SET_TIMEOUTS or a higher-level Com api that will get translated
to this and your Write has not completed in that time. This could be your
application problem. Which application are you using?
(2) I would use Hyperterm that comes with Windows and connect a NULL modem
cable between two of you COM ports to see that you can type back and forth
and send a file between them.
(3) You can also get Portmon from www.sysinternals.com. This will show you
the COM level IoRequest Packets (IRPs) that are being sent to your program.
(4) I would use the mode command to make sure you can set line parameters as
well.
(5) Some things to get you started.
-William Michael Jones “Mike”
“Gustavo Vilela Vargas” wrote in message
news:xxxxx@ntdev…
>
> Hi all,
>
> I’m new at this list and also in driver coding, by now I need some ideas
> at last to understand what is happening with my system.
> Primarily I’m a hardware designer. Today I have a PCI board with 3
> different functions but each one has a 16550 interface to the PCI bus. I
> wanna to see my board as 3 COM ports in my system. I’m trying to use
> the windows supplied serial.sys and serenum.sys to do the hard job for me.
> So my part of the job is just to wrote a INF file. Now I have the 3 port
> visible in my system, I can open the ports, read data generated by my
> functions on PCI card, but I can’t write some data do my card, when I try
> this I get a “write timerout error” from the serial.sys. When any of my 3
> ports are opened and I insue an output directly to the address of TX (in
> the virtual 16550), my board acept the data and works fine. When I use the
> API (and the drivers), I get the error and the data is not posted to the
> card. Someone has some ideia where to start the debuging?
>
> Thaks a lot.
> –
> Gustavo V Vargas
> xxxxx@hsssistemas.com.br
>
How do you set the serial port mode and the write timeouts when
you open your virtual 16550 through the serial.sys and the Win32
COMM APIs? If, for instance, the port is opened whith RTS/CTS flow
control and with a finite write timeout, and your 16550 emulation
doesn’t assert the CTS bit in the Modem Status Register, you write
will fail with a timeout error. As a quick check, you could try to
disable the flow control or enable the soft (Xon/Xoff) flow control
and see if the write succeeds
Carlo
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Gustavo Vilela
Vargas
Sent: luned? 18 dicembre 2006 17.34
To: Windows System Software Devs Interest List
Subject: [ntdev] Mult-serial Problem
Hi all,
I’m new at this list and also in driver coding, by now I need
some ideas
at last to understand what is happening with my system.
Primarily I’m a hardware designer. Today I have a PCI board with 3
different functions but each one has a 16550 interface to the
PCI bus. I
wanna to see my board as 3 COM ports in my system. I’m
> trying to use
> the windows supplied serial.sys and serenum.sys to do the
> hard job for me.
> So my part of the job is just to wrote a INF file. Now I have
> the 3 port
> visible in my system, I can open the ports, read data generated by my
> functions on PCI card, but I can’t write some data do my
> card, when I try
> this I get a “write timerout error” from the serial.sys. When
> any of my 3
> ports are opened and I insue an output directly to the
> address of TX (in
> the virtual 16550), my board acept the data and works fine.
> When I use the
> API (and the drivers), I get the error and the data is not
> posted to the
> card. Someone has some ideia where to start the debuging?
>
> Thaks a lot.
> –
> Gustavo V Vargas
> xxxxx@hsssistemas.com.br
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Ola William
I’m using my own ordinary terminal, and I explicitly set this times when I
open the port. This terminal was tested in others serial ports with a null
cable and works fine. Hiperterminal has the same problem…
Thanks by portmon! Great help! But confirm the timeout problem only in the
write operation (IRJ_MJ_WRITE). My write timeout was seted to 10
seconds…
Thank you again,
Gustavo
Hi (Oi) Gustavo:
(1) Write timeout error is an error that is returned with a program uses
IOCTL_SERIAL_SET_TIMEOUTS or a higher-level Com api that will get
translated
to this and your Write has not completed in that time. This could be your
application problem. Which application are you using?
(2) I would use Hyperterm that comes with Windows and connect a NULL modem
cable between two of you COM ports to see that you can type back and forth
and send a file between them.
(3) You can also get Portmon from www.sysinternals.com. This will show
you
the COM level IoRequest Packets (IRPs) that are being sent to your
program.
(4) I would use the mode command to make sure you can set line parameters
as
well.
(5) Some things to get you started.
-William Michael Jones “Mike”
“Gustavo Vilela Vargas” wrote in message
> news:xxxxx@ntdev…
>>
>> Hi all,
>>
>> I’m new at this list and also in driver coding, by now I need some ideas
>> at last to understand what is happening with my system.
>> Primarily I’m a hardware designer. Today I have a PCI board with 3
>> different functions but each one has a 16550 interface to the PCI bus. I
>> wanna to see my board as 3 COM ports in my system. I’m trying to use
>> the windows supplied serial.sys and serenum.sys to do the hard job for
>> me.
>> So my part of the job is just to wrote a INF file. Now I have the 3 port
>> visible in my system, I can open the ports, read data generated by my
>> functions on PCI card, but I can’t write some data do my card, when I
>> try
>> this I get a “write timerout error” from the serial.sys. When any of my
>> 3
>> ports are opened and I insue an output directly to the address of TX (in
>> the virtual 16550), my board acept the data and works fine. When I use
>> the
>> API (and the drivers), I get the error and the data is not posted to the
>> card. Someone has some ideia where to start the debuging?
>>
>> Thaks a lot.
>> –
>> Gustavo V Vargas
>> xxxxx@hsssistemas.com.br
>>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Gustavo V Vargas
xxxxx@hsssistemas.com.br
Carlo,
I’m using no flow control. And my times are seted and tested in others ports.
At this time I’m thinking the problem is in my INF file (the only one I
wrote), I’m not so experienced in it. The windows says the instalation is
done, but it is really done? When I ask the API to send a byte the API
even do not try to put the byte in my card, instead of try the API spend
the seted timeout and return with the timeout error, why? But when my card
generate an interruption of received byte the API works fine and give the
byte to my application.
Or if my instalation is fine the problem could be my hardware… in this
case I like to know what the serial.sys hope to find before I ask it to
send some data and put that data on the TX port. The CTR, DSR, CD and RI
are all present and favorable to data transfer… so I guess the problem
is the instalation…
Thanks,
Gustavo Vargas
How do you set the serial port mode and the write timeouts when
you open your virtual 16550 through the serial.sys and the Win32
COMM APIs? If, for instance, the port is opened whith RTS/CTS flow
control and with a finite write timeout, and your 16550 emulation
doesn’t assert the CTS bit in the Modem Status Register, you write
will fail with a timeout error. As a quick check, you could try to
disable the flow control or enable the soft (Xon/Xoff) flow control
and see if the write succeeds
Carlo
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Gustavo Vilela
> Vargas
> Sent: lunedì 18 dicembre 2006 17.34
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Mult-serial Problem
>
>
>
> Hi all,
>
> I’m new at this list and also in driver coding, by now I need
> some ideas
> at last to understand what is happening with my system.
> Primarily I’m a hardware designer. Today I have a PCI board with 3
> different functions but each one has a 16550 interface to the
> PCI bus. I
> wanna to see my board as 3 COM ports in my system. I’m
>> trying to use
>> the windows supplied serial.sys and serenum.sys to do the
>> hard job for me.
>> So my part of the job is just to wrote a INF file. Now I have
>> the 3 port
>> visible in my system, I can open the ports, read data generated by my
>> functions on PCI card, but I can’t write some data do my
>> card, when I try
>> this I get a “write timerout error” from the serial.sys. When
>> any of my 3
>> ports are opened and I insue an output directly to the
>> address of TX (in
>> the virtual 16550), my board acept the data and works fine.
>> When I use the
>> API (and the drivers), I get the error and the data is not
>> posted to the
>> card. Someone has some ideia where to start the debuging?
>>
>> Thaks a lot.
>> –
>> Gustavo V Vargas
>> xxxxx@hsssistemas.com.br
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Gustavo V Vargas
xxxxx@hsssistemas.com.br
Another idea: in your emulation, how do you handle the 16550 TBE
(Transmitter Buffer Empty, bit 5 in Line Status Register) and TXE
(Transmitter Empty, bit 6 in Line Status Register)? At least the
former must be set to allow serial.sys to send a byte to the 16550;
this could explain what you see (the API doesn’t even attempt to
send a byte to your port and the write operation times out).
Anyway, if you want to check in detail how serial.sys behaves, the
sources are in the DDK samples
Carlo
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Gustavo Vilela
Vargas
Sent: luned? 18 dicembre 2006 19.46
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Mult-serial Problem
Carlo,
I’m using no flow control. And my times are seted and tested
in others ports.
At this time I’m thinking the problem is in my INF file (the
only one I
wrote), I’m not so experienced in it. The windows says the
instalation is
done, but it is really done? When I ask the API to send a byte the API
even do not try to put the byte in my card, instead of try
the API spend
the seted timeout and return with the timeout error, why? But
when my card
generate an interruption of received byte the API works fine
and give the
byte to my application.
Or if my instalation is fine the problem could be my
hardware… in this
case I like to know what the serial.sys hope to find before I
ask it to
send some data and put that data on the TX port. The CTR,
DSR, CD and RI
are all present and favorable to data transfer… so I guess
the problem
is the instalation…
Thanks,
Gustavo Vargas
Carlo,
The serial.sys in Microsoft’s DDk is the same supplied with the OS? Great!!
I’ll check this now! Thank you!
Gustavo
Another idea: in your emulation, how do you handle the 16550 TBE
(Transmitter Buffer Empty, bit 5 in Line Status Register) and TXE
(Transmitter Empty, bit 6 in Line Status Register)? At least the
former must be set to allow serial.sys to send a byte to the 16550;
this could explain what you see (the API doesn’t even attempt to
send a byte to your port and the write operation times out).
Anyway, if you want to check in detail how serial.sys behaves, the
sources are in the DDK samples
Carlo
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Gustavo Vilela
> Vargas
> Sent: lunedì 18 dicembre 2006 19.46
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Mult-serial Problem
>
>
>
> Carlo,
>
> I’m using no flow control. And my times are seted and tested
> in others ports.
>
> At this time I’m thinking the problem is in my INF file (the
> only one I
> wrote), I’m not so experienced in it. The windows says the
> instalation is
> done, but it is really done? When I ask the API to send a byte the API
> even do not try to put the byte in my card, instead of try
> the API spend
> the seted timeout and return with the timeout error, why? But
> when my card
> generate an interruption of received byte the API works fine
> and give the
> byte to my application.
>
> Or if my instalation is fine the problem could be my
> hardware… in this
> case I like to know what the serial.sys hope to find before I
> ask it to
> send some data and put that data on the TX port. The CTR,
> DSR, CD and RI
> are all present and favorable to data transfer… so I guess
> the problem
> is the instalation…
>
> Thanks,
> Gustavo Vargas
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
–
Gustavo V Vargas
xxxxx@hsssistemas.com.br
I can’t say for sure if the sample serial.sys in the DDK is exactly the
same supplied with the OS, but anyway it should be enough to tell how
the serial hardware is handled (be prepared to a quite long reading…)
Did you check how do you handle the TBE/TXE bits in LSR?
Carlo
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Gustavo Vilela
Vargas
Sent: marted? 19 dicembre 2006 12.12
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Mult-serial Problem
Carlo,
The serial.sys in Microsoft’s DDk is the same supplied with
the OS? Great!!
I’ll check this now! Thank you!
Gustavo
> Another idea: in your emulation, how do you handle the 16550 TBE
> (Transmitter Buffer Empty, bit 5 in Line Status Register) and TXE
> (Transmitter Empty, bit 6 in Line Status Register)? At least the
> former must be set to allow serial.sys to send a byte to the 16550;
> this could explain what you see (the API doesn’t even attempt to
> send a byte to your port and the write operation times out).
>
> Anyway, if you want to check in detail how serial.sys behaves, the
> sources are in the DDK samples
>
> Carlo
>
Carlo,
Just to finish the thread my system works now! I found the sources of
serial.sys and identify a mismatch between the THE functionality in my
hardware and in the ISR code. TBE and TXE was ok.
Thank you again!
Regards,
Gustavo
Carlo,
The serial.sys in Microsoft’s DDk is the same supplied with the OS?
Great!!
I’ll check this now! Thank you!
Gustavo
> Another idea: in your emulation, how do you handle the 16550 TBE
> (Transmitter Buffer Empty, bit 5 in Line Status Register) and TXE
> (Transmitter Empty, bit 6 in Line Status Register)? At least the
> former must be set to allow serial.sys to send a byte to the 16550;
> this could explain what you see (the API doesn’t even attempt to
> send a byte to your port and the write operation times out).
>
> Anyway, if you want to check in detail how serial.sys behaves, the
> sources are in the DDK samples
>
> Carlo
>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com]On Behalf Of Gustavo Vilela
>> Vargas
>> Sent: lunedì 18 dicembre 2006 19.46
>> To: Windows System Software Devs Interest List
>> Subject: RE: [ntdev] Mult-serial Problem
>>
>>
>>
>> Carlo,
>>
>> I’m using no flow control. And my times are seted and tested
>> in others ports.
>>
>> At this time I’m thinking the problem is in my INF file (the
>> only one I
>> wrote), I’m not so experienced in it. The windows says the
>> instalation is
>> done, but it is really done? When I ask the API to send a byte the API
>> even do not try to put the byte in my card, instead of try
>> the API spend
>> the seted timeout and return with the timeout error, why? But
>> when my card
>> generate an interruption of received byte the API works fine
>> and give the
>> byte to my application.
>>
>> Or if my instalation is fine the problem could be my
>> hardware… in this
>> case I like to know what the serial.sys hope to find before I
>> ask it to
>> send some data and put that data on the TX port. The CTR,
>> DSR, CD and RI
>> are all present and favorable to data transfer… so I guess
>> the problem
>> is the instalation…
>>
>> Thanks,
>> Gustavo Vargas
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Gustavo V Vargas
xxxxx@hsssistemas.com.br
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
–
Gustavo V Vargas
xxxxx@hsssistemas.com.br
They are the same.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Carlo Andreoli - Numerica Progetti
Sent: Tuesday, December 19, 2006 6:52 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Mult-serial Problem
I can’t say for sure if the sample serial.sys in the DDK is exactly the
same supplied with the OS, but anyway it should be enough to tell how
the serial hardware is handled (be prepared to a quite long reading…)
Did you check how do you handle the TBE/TXE bits in LSR?
Carlo
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Gustavo Vilela
Vargas
Sent: marted? 19 dicembre 2006 12.12
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Mult-serial Problem
Carlo,
The serial.sys in Microsoft’s DDk is the same supplied with
the OS? Great!!
I’ll check this now! Thank you!
Gustavo
> Another idea: in your emulation, how do you handle the 16550 TBE
> (Transmitter Buffer Empty, bit 5 in Line Status Register) and TXE
> (Transmitter Empty, bit 6 in Line Status Register)? At least the
> former must be set to allow serial.sys to send a byte to the 16550;
> this could explain what you see (the API doesn’t even attempt to
> send a byte to your port and the write operation times out).
>
> Anyway, if you want to check in detail how serial.sys behaves, the
> sources are in the DDK samples
>
> Carlo
>
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer