EmbeddedRelated.com
Forums
Memfault Beyond the Launch

USB CDC Driver PnP Problem !!

Started by "sgimin.tw" October 24, 2006
Dear sirs,

Did you ever use the CDC driver for AT91 USB serial emulation ?!
Now I have a problem for Plug and Play usage.

I use the AT91SAM7S256 and HyperTerminal to exchange data for usb
serial emulation, so I apply the ATMEL "atm6124ser.inf" to "usbser.sys"
driver. Normally it can work correctly. But after I un-plug and re-plug
the usb cable, I try to hang up and hang on the terminal again, then it
cannot open the same com port again.

>From the internet information, I find many people say that the
driver "usbser.sys" isn't capable of PnP applicaion, and they have no
idea about the solution for this driver. So they almost use the other
driver designed by the vendors or themself.

Because I don't have any knowledge and time to design new driver, so I
want to know if anyone of you has tried to solve this problem or
related experience. Any information from you will help me greatly.

I need your help. Please help me.
Thanks a lot!!

Albert
Hi,

The Atmel driver should work fine.
You should try to disconnect the CDC port on Hyperterminal *before* you unplug USB though.
If you unplug while HyperTerminal still is connected, that port will still be opened, but there's
no CDC anymore.
Normally unplugging like that does work though - once you exit and restart Hyperterm.
Sometime it will cause Hyper to crash however.
I've tried this on 3 diff PCs and was fine - XP SP2.

Best Regards,
Kris

________________________________________
From: A... [mailto:A...] On Behalf Of sgimin.tw
Sent: Tuesday, 24 October 2006 4:00 PM
To: A...
Subject: [AT91SAM] USB CDC Driver PnP Problem !!

Dear sirs,

Did you ever use the CDC driver for AT91 USB serial emulation ?!
Now I have a problem for Plug and Play usage.

I use the AT91SAM7S256 and HyperTerminal to exchange data for usb
serial emulation, so I apply the ATMEL "atm6124ser.inf" to "usbser.sys"
driver. Normally it can work correctly. But after I un-plug and re-plug
the usb cable, I try to hang up and hang on the terminal again, then it
cannot open the same com port again.

>From the internet information, I find many people say that the
driver "usbser.sys" isn't capable of PnP applicaion, and they have no
idea about the solution for this driver. So they almost use the other
driver designed by the vendors or themself.

Because I don't have any knowledge and time to design new driver, so I
want to know if anyone of you has tried to solve this problem or
related experience. Any information from you will help me greatly.

I need your help. Please help me.
Thanks a lot!!

Albert




Dear Kris,

Yes!! I understand your suggestion, and actually I have tried many t
imes this way you state. I agree that the reason you state for this
problem is very reasonable. But when I tried another USB-Serial
converter product provided with other company, it can work with the
condition I stated in my first posted message. So I just think the
PnP function for USB-Serial converter can be reachable.

Further, I also found that the *.inf file content by that product
applys both the microsoft's driver "serenum.sys" and their own
driver. From the internet information I know that the
driver "serenum.sys" can handle PnP function for serial ports. So I
want to know if the "usbser.sys" still can be used to handle PnP
function with some modification or other drivers.

Should I need other driver instead of "usbser.sys" ?!
Albert

--- In A..., "Microbit" wrote:
>
> Hi,
>
> The Atmel driver should work fine.
> You should try to disconnect the CDC port on Hyperterminal
*before* you unplug USB though.
> If you unplug while HyperTerminal still is connected, that port
will still be opened, but there's
> no CDC anymore.
> Normally unplugging like that does work though - once you exit and
restart Hyperterm.
> Sometime it will cause Hyper to crash however.
> I've tried this on 3 diff PCs and was fine - XP SP2.
>
> Best Regards,
> Kris
> ?
Hi Albert,

I guess it depends on what you consider to be PnP for serial.
When I tried several things with CDC, I ran into some really weird stuff too.
Many moons ago, I tried to get interrupt notification to Host going with the USBSER.SYS driver.
The polling rate can be changed, but it's "nobody home".
I spent days trying to get to the bottom of that... The very few that were able to give some
suggestion all proposed that I don't use usbser.sys, as it's supposedly 'buggy'. (????)
I was in the belief that the CDC driver actually presents a USB/serial port to the PC just like
any other serial port - IOW you still need to poll on it etc.
I only do code on embedded, so I'm very limited when it comes to PCs.

Apparently the CDC commands etc. that bubble up to the Host need to be actually _acted_ upon by an
application, so I was told....

So basically, most things seem to require something more than just the standard MS usbser.sys
driver.... Others claim that many functions (such as eg. servicing the interrupt pipe notification
in the Host PC) are simply not implemented in usbser.sys, or don't work properly...

I posted about that stuff on this group many months ago.

Who's right ? Who knows....

Best Regards,
Kris

________________________________________
From: A... [mailto:A...] On Behalf Of sgimin.tw
Sent: Wednesday, 25 October 2006 12:56 PM
To: A...
Subject: [AT91SAM] Re: USB CDC Driver PnP Problem !!

Dear Kris,

Yes!! I understand your suggestion, and actually I have tried many t
imes this way you state. I agree that the reason you state for this
problem is very reasonable. But when I tried another USB-Serial
converter product provided with other company, it can work with the
condition I stated in my first posted message. So I just think the
PnP function for USB-Serial converter can be reachable.

Further, I also found that the *.inf file content by that product
applys both the microsoft's driver "serenum.sys" and their own
driver. From the internet information I know that the
driver "serenum.sys" can handle PnP function for serial ports. So I
want to know if the "usbser.sys" still can be used to handle PnP
function with some modification or other drivers.

Should I need other driver instead of "usbser.sys" ?!

Albert

--- In A..., "Microbit" wrote:
>
> Hi,
>
> The Atmel driver should work fine.
> You should try to disconnect the CDC port on Hyperterminal
*before* you unplug USB though.
> If you unplug while HyperTerminal still is connected, that port
will still be opened, but there's
> no CDC anymore.
> Normally unplugging like that does work though - once you exit and
restart Hyperterm.
> Sometime it will cause Hyper to crash however.
> I've tried this on 3 diff PCs and was fine - XP SP2.
>
> Best Regards,
> Kris
> ?




Dear Kris,

I have tried to understand and modify the inf file, but the problem
still exists. And from the internet information, I still don't find
any solution. Maybe the driver "usbser.sys" itself is just the
problem.

Now my company will try to search technical support by related
vendors. It's pity that we can't solve this problem by ourselves.

Thank you for your information and suggestion, and your kindly help.
Albert

--- In A..., "Microbit" wrote:
>
> Hi Albert,
>
> I guess it depends on what you consider to be PnP for serial.
> When I tried several things with CDC, I ran into some really weird
stuff too.
> Many moons ago, I tried to get interrupt notification to Host
going with the USBSER.SYS driver.
> The polling rate can be changed, but it's "nobody home".
> I spent days trying to get to the bottom of that... The very few
that were able to give some
> suggestion all proposed that I don't use usbser.sys, as it's
supposedly 'buggy'. (????)
> I was in the belief that the CDC driver actually presents a
USB/serial port to the PC just like
> any other serial port - IOW you still need to poll on it etc.
> I only do code on embedded, so I'm very limited when it comes to
PCs.
>
> Apparently the CDC commands etc. that bubble up to the Host need
to be actually _acted_ upon by an
> application, so I was told....
>
> So basically, most things seem to require something more than just
the standard MS usbser.sys
> driver.... Others claim that many functions (such as eg. servicing
the interrupt pipe notification
> in the Host PC) are simply not implemented in usbser.sys, or don't
work properly...
>
> I posted about that stuff on this group many months ago.
>
> Who's right ? Who knows....
>
> Best Regards,
> Kris
> ?

Memfault Beyond the Launch