Tech Support > Microsoft Windows > Drivers > Re: How to detect modem in the serial com port??
Re: How to detect modem in the serial com port??
Posted by paullee on June 30th, 2003


Thanks for you information ,I think it is very useful for hardwave design
I just want to know ,What I need to do in my "driver code" or "inf" file
that my com port can find the modem in the "device manager" when I press
"add new hardwave" button and OS can install stardard modem driver automaticly
,just like stardard com port can do.

So I add "serenum.sys" to do my upperfilter driver to enumerate device,Now it
can find mice well,but it can't find modem,Do I need to modify "serenum.sys"
source code or anything I need to do in the "inf" file??

Can you help me again??

Thanks a again^^

Posted by Doron Holan [MS] on June 30th, 2003


no need to modify serenum. since a mouse is enumerated, this shows that
yoour port responds quickly enough to the enumeration protocol. not all
modems are serial enumerable though, verify that the modem is found by the
same means when it is attached to a serial support which the OS natively
supports.

d

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"paullee" <paullee@iei.com.tw> wrote in message
news:b308514d.0306291835.7dac2602@posting.google.c om...


Posted by paullee on June 30th, 2003


Sorry I got a mistake for you information ^^"""

But I think the "serenum.sys" has detect modem well,right??
when I connect modem to com 2 ,It can detect modem well and install driver
when I connect to my com port(com5),It can't detect any thing,why??
even if I install driver manualy ,modem still can't work well,why??

I use "hyperterminal" to control modem,and connect modem to my com port(com5)
I can send AT command , and It work well,but when I install modem driver
manualy then do the work again,It can't work,do you know why??

can anybody tell me??

Thank for you help

Posted by paullee on June 30th, 2003


Sorry , I got a misstake for your information^^"""

But I think "serenum.sys" has do this work well,rgiht??

In the standard com port,It can detect my modem well,but
why it can't detect in my com port??

I have use "HyperTermianl" to control my modem via my com port(com5)
It can send AT commdand and work correctly ,when I install modem driver
manualy,and do the work again,The modem can't work,why??

Does anyone can tell me??

Thanks for you help^^

Posted by Dmitry Basko on June 30th, 2003


Hello,
Sometime ago I developed a prototype of PnP compatible serial port based
device. Later, very quickly, I wrote a small project, based on this
development and put it on the web.(Development of PnP compatible serial
(RS232) port based device (http://www.bds.dogma.net/pnp.htm)). I do not say
that this is exactly what you need, but I included simple WDM driver with
INF file and shortly described very nice utility (PnP Com simulator, the
useful utility, created by Igor Cesko) which helps understand in details the
process how OS (its components) discovers PnP compatible device and loads
proper driver.
Hope, It'll help.
Dmitry Basko.

"paullee" <paullee@iei.com.tw> wrote in message
news:b308514d.0306291835.7dac2602@posting.google.c om...


Posted by Doron Holan [MS] on July 1st, 2003


perhaps the timing on your port is not sufficient or within the tolerances
of your modem.

d

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"paullee" <paullee@iei.com.tw> wrote in message
news:b308514d.0306292252.22b3471@posting.google.co m...


Posted by paullee on July 2nd, 2003


Thanks Basko and Holan ^^

For Basko, Thanks a lot ,I will to see you HomePage^^

Now ,I can install modem driver manualy and It can work well

but still can't detect by "add new hardwave" button.

In the detect process, I found modem's signal lantern never change it's status

So OS can't detect modem ,Are you think ,It is a timing issue??

I got another question!!

What is the difference between "WRITE_REGISTER_BUFFER_UCHAR" and

"WRITE_REGISTER_UCHAR" ??

I have modify ddk serial source code in the ISR.C file 887 line

if (amountToWrite == 1)
{
Extension->PerfStats.TransmittedCount++;
Extension->WmiPerfData.TransmittedCount++;
WRITE_TRANSMIT_HOLDING(
Extension->Controller,
*(Extension->WriteCurrentChar));
}
else
{
Extension->PerfStats.TransmittedCount +=
amountToWrite;
Extension->WmiPerfData.TransmittedCount +=
amountToWrite;
WRITE_TRANSMIT_FIFO_HOLDING(
Extension->Controller,
Extension->WriteCurrentChar,
amountToWrite
);
cange to this

TempWrite = amountToWrite;

while (TempWrite>0)
{
TempWrite--;
Extension->PerfStats.TransmittedCount++;
Extension->WmiPerfData.TransmittedCount++;
WRITE_TRANSMIT_HOLDING(
Extension->Controller,
*(Extension->WriteCurrentChar));
Extension->WriteCurrentChar++;

} }
I found if I use WRITE_REGISTER_BUFFER_UCHAR to send a series of chars
In My card ,It will get fail ,for the data "0123456789" ,It just send
"Zero" char only ,So I change code like above,It can send correctly.
can you tell me why??

Another strange is , I have compare the NT and Win2000 serial soruce code
for the write.c ,read.c and isr.c ,It is the same right??
My card can work in the WinNT correctly ,but fail in the Win2000,
I need to change WRITE_REGISTER_BUFFER_UCHAR to WRITE_REGISTER_UCHAR
So What is the difference between "WRITE_REGISTER_BUFFER_UCHAR" and
"WRITE_REGISTER_UCHAR" and In WinNT ,Win2000??

Thank for your reading

Best Regards

Paul


Similar Posts