Hello experts,

here is the question on CE 4.1.

The scenarion in short is this. A customer has Windows CE
4.1 based device with USB port. The image we build for
them contains all drivers to support that port.
Customer conencts a USB printer to this USB port. Then
after a few seconds CE creates a virtual LPT2: port for
this USB printer. Customer then uses a control panel and
adds a new printer, as a parallel printer connected to
LTP2: port. And then saves settings into persistent
registry on flash disk. All works fine so far. Good !

Now customer turns the power off on the device. The USB
printer is still connected. Then next day customer turns
power on back on the devices and it boots up into CE.
However, it was found that LPT2: virtual port isn't
created !
Further, it was found that if a customer disconnects a USB
printer and then reconnects it back, then, after a few
seconds CE does create back again the virtual LPT2: port
for this printer.

My question is that : how do we ask CE to create virtual
LPT2: on startup, if a USB printer is detected connected
and up ? Is that possible at all or not - I cannot get
definite information from the documentation. We need to
know this to tell customer that, say, USB printers aren't
supported after reboot or so.

PS. Windows CE 4.1, enterprise web pad-like application,
has control panel. Device has built-in one parallel port
and one USB port.

Sincerely
Sergei

Re: start-up creating of virtual LPT2: port from USB prn by David

David
Wed Jul 28 10:53:36 CDT 2004

From software point of view, Re-inserted USB device should be same as
plug-in before booting up. The question is why first time it does not
enumerate this USB printer?
Did you use CEPC platform?
David Liao.
"sergeir" <anonymous@discussions.microsoft.com> wrote in message
news:59e101c4749e$001b7230$a601280a@phx.gbl...
> Hello experts,
>
> here is the question on CE 4.1.
>
> The scenarion in short is this. A customer has Windows CE
> 4.1 based device with USB port. The image we build for
> them contains all drivers to support that port.
> Customer conencts a USB printer to this USB port. Then
> after a few seconds CE creates a virtual LPT2: port for
> this USB printer. Customer then uses a control panel and
> adds a new printer, as a parallel printer connected to
> LTP2: port. And then saves settings into persistent
> registry on flash disk. All works fine so far. Good !
>
> Now customer turns the power off on the device. The USB
> printer is still connected. Then next day customer turns
> power on back on the devices and it boots up into CE.
> However, it was found that LPT2: virtual port isn't
> created !
> Further, it was found that if a customer disconnects a USB
> printer and then reconnects it back, then, after a few
> seconds CE does create back again the virtual LPT2: port
> for this printer.
>
> My question is that : how do we ask CE to create virtual
> LPT2: on startup, if a USB printer is detected connected
> and up ? Is that possible at all or not - I cannot get
> definite information from the documentation. We need to
> know this to tell customer that, say, USB printers aren't
> supported after reboot or so.
>
> PS. Windows CE 4.1, enterprise web pad-like application,
> has control panel. Device has built-in one parallel port
> and one USB port.
>
> Sincerely
> Sergei



Re: start-up creating of virtual LPT2: port from USB prn by sergeir

sergeir
Thu Jul 29 01:24:48 CDT 2004

Hi David,

thank you for quickly taking a look at our problem.

Yes, we use a National Semiconductor Geode BSP, which is a
part of a platform builder 4.1 It is based on CEPC x86. We
tried to use generic CEPC BSP but got the same result.

To your question I can add that it is not that simple. The
difference, to my opinion, is in the fact, that the
platform is using persistent registry and it has ot be
used on boot up. In particular, customer saves printer
settings at the following key
HKLM/Drivers/BuiltIn/WBT_PRN# where # means the sequential
installed printer Nr.
Under this key there is a value name "DevicePath" and its
value data are something like "LPT#:" where # is one digit
number for the port, which uses the connected printer.

If that value data is LPT1: for parallel printer,
everything works fine, and saved into persistent the
installed printer are retained and survies reboot well.

If that value data are LPT2: for virtual parallel port,
created by CE for USB printer, then it works fine, but
does not survive reboot - registry is saved correctly, but
USB printer needs to be unlugged and re-plugged in to
start working. That re-plugging causes CE to create
virtual parallel port LPT2:, which is already listed in
that persistent key value data (even before that virtual
parallel port is created), and then it works just like
physical parallel port printer.

Sincerely
Sergei

>-----Original Message-----
>From software point of view, Re-inserted USB device
should be same as
>plug-in before booting up. The question is why first time
it does not
>enumerate this USB printer?
>Did you use CEPC platform?
>David Liao.
>"sergeir" <anonymous@discussions.microsoft.com> wrote in
message
>news:59e101c4749e$001b7230$a601280a@phx.gbl...
>> Hello experts,
>>
>> here is the question on CE 4.1.
>>
>> The scenarion in short is this. A customer has Windows
CE
>> 4.1 based device with USB port. The image we build for
>> them contains all drivers to support that port.
>> Customer conencts a USB printer to this USB port. Then
>> after a few seconds CE creates a virtual LPT2: port for
>> this USB printer. Customer then uses a control panel and
>> adds a new printer, as a parallel printer connected to
>> LTP2: port. And then saves settings into persistent
>> registry on flash disk. All works fine so far. Good !
>>
>> Now customer turns the power off on the device. The USB
>> printer is still connected. Then next day customer turns
>> power on back on the devices and it boots up into CE.
>> However, it was found that LPT2: virtual port isn't
>> created !
>> Further, it was found that if a customer disconnects a
USB
>> printer and then reconnects it back, then, after a few
>> seconds CE does create back again the virtual LPT2: port
>> for this printer.
>>
>> My question is that : how do we ask CE to create virtual
>> LPT2: on startup, if a USB printer is detected connected
>> and up ? Is that possible at all or not - I cannot get
>> definite information from the documentation. We need to
>> know this to tell customer that, say, USB printers
aren't
>> supported after reboot or so.
>>
>> PS. Windows CE 4.1, enterprise web pad-like application,
>> has control panel. Device has built-in one parallel port
>> and one USB port.
>>
>> Sincerely
>> Sergei
>
>
>.
>

Re: start-up creating of virtual LPT2: port from USB prn by sergeir

sergeir
Thu Jul 29 06:55:04 CDT 2004

Hi David,

please see the additional information from kernel debugger
on this problem.

Maybe it will help to trace down the origin of it.

The case describes USB printer problem. A parallel printer
can be used as a comparison - for it under the same
situation there is no problem at all !

Step 1.

Windows CE based device is turned off. USB printer is
connected to device's USB port.
Printer is on, it typically always stays on. This is
normal after-hours condition at cutomer site.

Step2.

Customer comes in the morning and powers up Windows CE
based device. Notice it has the USB printer already
connected. Windows CE boots up.

Here is a part of the registry at this step :

HKLM/Drivers/Active - 28 keys, including 09 - LPT1:

Step 3.

A disapointed customer who wants to print to that USB
printer connected to
this Windows CE device has to unplug its USB connector
from Windows CE device and then
plug it back in. This procedure, when inspected in kernel
debugger, makes several
events, including

CHub(Root tier 0)::HubStatusChangeThread - port 2, change
= 0x0003, status = 0x0100
....
-CHub(Root tier 0)::AttachDevice - port = 2, fIsLowSpeed =
0, address = 1
TAPI:OldAddTapiDevice RegQueryValueEx(Tsp) returned 2
NOTIFICATION::XCeEventHasOccurred
NOTIFICATION::HandleSystemEvent 7 /ADD LPT2:

and then the CE registry part, mentioned above, now
becomes :

HKLM/Drivers/Active - 29 keys, including 09 - LPT1: and
29th - LPT2:

Here we go ! Now customer can assign LTP2: to printer port
in IE and then be able to print to usb printer !
However a reboot or shut down of windows CE device will
force customer to repeat a weird step with
unplugging and re-plugging usb printer.

This is the step which is skipped by Windows CE when it
boots up. I don't know where to look to fix that problem,
it appears to me that parallel port drivers autostart on
boot, but usb-to-virtual_parallel don't !

Does anybody know the cause of such behaviour ? Customer
is quite upset with this case.

Windows CE 4.1 platform - enteprise web pad like, x86,
device with 1 parallel and a USB port, PB 4.1.

Sincerely
Sergei