Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- From: alexquisi@xxxxxxxxxxxx
- Date: 6 Dec 2006 00:10:49 -0800
Hi DES,
if you read the thread tha I posted above, you probably found the
reason of the problem:
"...Now it's clear what the problem is...
The D+ line should be pulled up on insertion, but is not!
The D- line should NOT be pulled up at insertion for USB full speed
devices,
but it is!! Actually it's not fully pulled to 3.3V, only ~1.6V, but
that's
enough for the PXA27x to detect it as a logic HIGH. That also exaplins
why
it works on other USB Host controllers... probably the are ignoring
this low
pull-up glitch (it lasts 10ms.. so i don't think it's really a
glitch...)
Also, very strange is that even ignoring the false pull-up, the right
one
only comes 4-5 seconds after device insertion!..."
and the workaround:
"...I patched the HCD source code and now it works without any
problems.
What i did is essentially ignore the first insertion detect, wait 15ms
and
wait again for the next detection.
....".
As far as I understood the modifcation should be done in:
\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\USB\HCD\COMMON
Probably in cdevice.cpp (Of course, doing a local copy in you local
BSP's folder).
I am not 100% sure of it.
Have you already tried booting the board with the device already
plugged to it?
As I stated in my first post, in that case in my board the device is
recognized correctly.
Unfortunately I am working in other stuff with high priority for me, so
right now I can not give you more information from my side.
Please let us know if you find something new.
Regards,
Alex
DES wrote:
Hi Alex,
Without using the self-powered hub, I changed the code to insert the
following line after line 7418 in ohcd.cpp :
if (ulPortVal == 0x00010301)
ulPortVal = 0x00010101; // hardcode to LowSpeed:0
I did not set any breakpoints and let it run. I do not get any errors.
The device is recognized correctly as an RNDIS-device :
207673 PID:2ffb5a86 TID:6fd5872a 0x8fd584f4: OHCD:
Int.bNumEndpoints = 0x01
207675 PID:2ffb5a86 TID:6fd5872a 0x8fd584f4: OHCD:
Int.bInterfaceClass = 0x02
207678 PID:2ffb5a86 TID:6fd5872a 0x8fd584f4: OHCD:
Int.bInterfaceSubClass = 0x02
207681 PID:2ffb5a86 TID:6fd5872a 0x8fd584f4: OHCD:
Int.bInterfaceProtocol = 0xFF
However, I cannot configure the ethernet IP address on the wireless
interface BECAUSE the device is NOT enumerated.
The power LED on the device remains OFF.
Without using the self-powered hub, as seen from the debug log,
c:\wince500\platform\n40\drivers\usb\mdd_hcd\ohcd\ohcd.cpp, Line #:
5789
207558 PID:2ffb5a86 TID:6fd5872a 0x8fd584f4: OHCD:: Checking root hub
power for port 1, config 0, 400 mA
207561 PID:2ffb5a86 TID:6fd5872a 0x8fd584f4: HcdPdd_CheckConfigPower
returning 1
207563 PID:2ffb5a86 TID:6fd5872a 0x8fd584f4: OHCD:: Root Hub total
power draw for port 1, is now 500 mA
207565 PID:2ffb5a86 TID:6fd5872a 0x8fd584f4: +OHCD::SetConfiguration
I think the problem may lie in the device itself.
USR5421 reports its power consumption incorrectly thereby failing its
enumeration.
When I use a self-powered hub, the speed is recognized correctly as
LowSpeed:0 (without my code fix). However, I get several ASSERTs.
Still banging my head against the problem!
-DES
alexquisi@xxxxxxxxxxxx wrote:
Hi,
it is not enough to fake the status, it is also necessary to ignore the
first detection as far as I understand based on the following thread:
http://groups.google.de/group/microsoft.public.windowsce.platbuilder/browse_frm/thread/cd82af940d71bdb9/c76e619bda4438f1?lnk=st&q=usb+robotics+wince&rnum=2&hl=en#c76e619bda4438f1
Regards,
Alex
DES wrote:
Hi voidcoder, Alex and Paul :
Thanks very much for your valuable inputs.
Yes, USR5421 WAS being recognized as a low speed device (from debug log
reproduced below) :
4294867558 PID:affb6a86 TID:6fd6327e 0x8fd5ecd4:
OHCD::HandleConnectChange, device attach (port 1, status 0x10301)
4294867560 PID:affb6a86 TID:6fd6327e 0x8fd5ecd4: +OHCD::AddDevice:
Hub:0, port:1, LowSpeed:1
I stepped into the PB debugger and faked the status (ulPortVal) as
0x10101 (NOT LowSpeed).
Now, I get past the point when I used to see USB_DEVICE_NOT_RESPONDING.
Now, the debug log reports
1022639 PID:cffb6b2e TID:8fd444e6 0x8fd52400:
OHCD::HandleConnectChange, device attach (port 1, status 0x10101)
1022651 PID:cffb6b2e TID:8fd444e6 0x8fd52400: +OHCD::AddDevice: Hub:0,
port:1, LowSpeed:0
But, I encountered a different problem :
c:\wince500\platform\n40\drivers\usb\mdd_hcd\ohcd\ohcd.cpp, Line #:
5789
1023326 PID:cffb6b2e TID:8fd444e6 0x8fd52400: OHCD:: Checking root hub
power for port 1, config 0, 400 mA
1023328 PID:cffb6b2e TID:8fd444e6 0x8fd52400: HcdPdd_CheckConfigPower
returning 0
1023330 PID:cffb6b2e TID:8fd444e6 0x8fd52400: OHCD:: Config 0 requires
too much power (400 mA) for port 1 (Current: 500 mA)
1023333 PID:cffb6b2e TID:8fd444e6 0x8fd52400: Not enough power for any
configurations in device
1023335 PID:cffb6b2e TID:8fd444e6 0x8fd52400:
+OHCD::MarkDeviceForRemoval, dev 216DB0
1023337 PID:cffb6b2e TID:8fd444e6 0x8fd52400: OHCD:pDev:0x216DB0, addr:
8 being removed.
1023340 PID:cffb6b2e TID:8fd444e6 0x8fd52400: OHCD: Enqueued work item:
pDev 216DB0, fAttach:0, fNeedThread: 0
1023342 PID:cffb6b2e TID:8fd444e6 0x8fd52400:
-OHCD::MarkDeviceForRemoval
Is there a limit on the power budget / limitation to be = 400 mA ? If
so, can we increase it ? and How ?
I never see the power LED on the USR5421 device upon plugging it into
the USB port of CK722. However, when I plug it into the USB port of my
PC running Windows XP, the power LED lights up
after a few seconds.
Meanwhile, I want to buy a self-powered hub (instead of drawing power
from USB bus as I'm using right now) and try it out.
Thanks & Regards,
-DES
Paul G. Tobey [eMVP] wrote:
Yes, it does the wrong thing when first installed in the slot. "The stick
doesn't work right", is the diagnosis and reports itself as a low-speed
device (the voltage levels on initial insertion are wrong, though they
eventually get the right levels). You may be able to adjust the code for
the USB host driver for your hardware to either delay detection of the speed
of the device or cause a device reset (or something of that sort), some
delay period after initial insertion, so that the result will be correct.
Someone pointed me to a work-around scheme as described above, but, no I
never implemented it.
Paul T.
<alexquisi@xxxxxxxxxxxx> wrote in message
news:1165156069.856835.191310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi everybody,
I also blocked with this USB-WiFi adapter.
I am also facing the same well know problem (the device is detected as
a low speed device).
It is only identified correctly when the device is plugged before
power-up, but if I try to plug it when the board is running, it fails.
I think Paul (as I read in another thread) found a workaround for this.
I hope that he kindly may tell us which part in HCD should be modify. I
think that it requires a delay somewhere and ignore the first
detection. (I am not a expert in USB protocol so I still could not find
by myself where would be appropriate the modification(s) ).
Regards,
Alex
voidcoder wrote:
Do some further debugging in HCD and see if it is by chance
not detected as a low speed device. I can't remember now exactly
what was the problem, but 5421 definitely has some issues
leading to wrong device type detection on some host controllers.
You may want also to test it through a number of different
hubs, better if self powered.
.
- Follow-Ups:
- References:
- Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- From: DES
- Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- From: voidcoder
- Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- From: alexquisi
- Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- From: Paul G. Tobey [eMVP]
- Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- From: DES
- Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- From: alexquisi
- Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- From: DES
- Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- Prev by Date: Re: More details for the problem
- Next by Date: Re: Capturing debug messages using CeLog on a release terminal
- Previous by thread: Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- Next by thread: Re: How to get USB / Ethernet (NIC) working on MS Windows CE 5.0 ?
- Index(es):
Relevant Pages
|
Loading