OESF Portables Forum

Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => C1000/3x00 Hardware => Topic started by: uth on March 25, 2006, 05:10:40 pm

Title: How To Identify Usb Host Cable?
Post by: uth on March 25, 2006, 05:10:40 pm
I have a C1000.  I've read that the difference between the USB host cable and regular USB cable is the connector on the end causes the Z to behave differently depending on which one is inserted.

I've also read that you can get the USB-host adaptor in a kit you can buy at Walgreens.

I bought a Universal USB adaptor kit before I bought by C1000.  I've noticed that it has a couple of different types of mini-USB connector.   I was wondering how you can tell if any of them are the host (USB OTG) type connector? (Is there a closeup image anywere?)   Are there any other giveaways?  Or if you plug it into the Z, is there any command you can use to check?
Title: How To Identify Usb Host Cable?
Post by: Jon_J on March 25, 2006, 05:50:22 pm
Yep the kit from walgreens includes the host adapter.
It's a 6-in-1 kit, made by G.E. (General Electric)
It's behind the camera counter and is in a red bubble package which hangs from a peg.
I've enclosed a pic of the "GoldEX" brand of USB 'B' & 'A' fittings, (not the walgreens ones, these are basically the same).
The 'A' (on the right) is the host fitting.
The 'B' (on the left) is a fitting like a sync cable that most Palms use.
The 'A' fitting is used to connect external drives, mice, keyboards, ect. (Host)
The 'B' fitting is used to connect your zaurus to a PC and browse the drive/cards on the Zaurus from your PC.
Title: How To Identify Usb Host Cable?
Post by: uth on March 25, 2006, 06:15:23 pm
Quote
Yep the kit from walgreens includes the host adapter.
It's a 6-in-1 kit, made by G.E. (General Electric)
It's behind the camera counter and is in a red bubble package which hangs from a peg.
I've enclosed a pic of the "GoldEX" brand of USB 'B' & 'A' fittings, (not the walgreens ones, these are basically the same).
The 'A' (on the right) is the host fitting.
The 'B' (on the left) is a fitting like a sync cable that most Palms use.
The 'A' fitting is used to connect external drives, mice, keyboards, ect. (Host)
The 'B' fitting is used to connect your zaurus to a PC and browse the drive/cards on the Zaurus from your PC.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120236\"][{POST_SNAPBACK}][/a][/div]

I do have a connector that looks like the 'A' plug.   When I plug it into the Z, and run 'dmesg', I see messages that it detected a USB hub, with two ports.   Is that the kind of message that the USB host cable generates?
Title: How To Identify Usb Host Cable?
Post by: Jon_J on March 25, 2006, 06:57:33 pm
I've never used dmesg with just the host cable.
Try hooking up an external drive to it.
I have an external drive enclosure, (which has it's own power).
It shows this in the files tab in Cacko 1.23
Title: How To Identify Usb Host Cable?
Post by: BarryW on March 26, 2006, 02:58:48 am
The cable itself won't get you anything with a dmesg.  It's just a cable.  Now if you have anything attached to the other end, you'll get something.  Might not be a supported device but the usb spec says it has to identify itself.
Title: How To Identify Usb Host Cable?
Post by: uth on March 26, 2006, 11:03:56 am
Quote
The cable itself won't get you anything with a dmesg.  It's just a cable.  Now if you have anything attached to the other end, you'll get something.  Might not be a supported device but the usb spec says it has to identify itself.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120273\"][{POST_SNAPBACK}][/a][/div]

Well, this is what shows up in dmesg when I plug in the mystery adaptor:

hotplug_schedule_bh: schedule bh
usbh: hotplug_bh:
usbh: udc_connected: ACTIVE_LOW: 1<7>usbh: monitor_connected: 1
usbh: monitor_restore: RESTORE_LOADED
usbh: monitor_hotplug: agent: usbh interface: monitor action: restore-loaded
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-ohci.c: USB OHCI at membase 0xfe000000, IRQ 3
usb.c: new USB bus registered, assigned bus number 1
usb.c: kmalloc IF c3f3aa60, numif 1
usb.c: new device strings: Mfr=0, Product=2, SerialNumber=1
usb.c: USB device number 1 default language ID 0x0
Product: USB OHCI Root Hub
SerialNumber: fe000000
hub.c: USB hub found
hub.c: 2 ports detected
hub.c: standalone hub
hub.c: ganged power switching
hub.c: individual port over-current protection
hub.c: Port indicators are not supported
hub.c: power on to power good time: 8ms
hub.c: hub controller current requirement: 0mA
hub.c: port removable status: RR
hub.c: local power source is good
hub.c: no over-current condition exists
hub.c: enabling power on all ports
usb.c: hub driver claimed interface c3f3aa60
usb.c: kusbd: /sbin/hotplug add 1
usbhmonitor: warning - hotplug script timed out
hotplug_bh:
monitor_connected: 1
monitor_restore: RESTORE_LOADED
monitor_hotplug: agent: usbd interface: monitor action: restore-loaded
usbdcore: usbdcore 0.1 035 2002-06-12 20:00 (dbg="")
net_fd 0.1 035 2002-06-12 20:00 (dbg="",alwaysup=0,OUT=64,IN=64)
vendorID: 4dd productID: 9031
pxa27x_bi 0.1-alpha 035 2002-06-12 20:00 (dbg="")
bi_modinit: call udc_startup_events
bi_device_event: call udc_enable
bi_device_event: call udc_all_interrupts
udc_connect: host cable connected.


And then if I plug a device into the other end (In this case, a D-LInk ethernet adaptor):

hub.c: port 2 connection change
hub.c: port 2, portstatus 101, change 1, 12 Mb/s
hub.c: port 2, portstatus 101, change 0, 12 Mb/s
hub.c: port 2, portstatus 101, change 0, 12 Mb/s
hub.c: port 2, portstatus 101, change 0, 12 Mb/s
hub.c: port 2, portstatus 101, change 0, 12 Mb/s
hub.c: port 2, portstatus 103, change 10, 12 Mb/s
hub.c: USB new device connect on bus1, assigned device number 2
usb.c: kmalloc IF c3f81480, numif 1
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=3
usb.c: USB device number 2 default language ID 0x409
Manufacturer: D-LINK CORPORAION
Product: DUB-E100
SerialNumber: 01
usb.c: unhandled interfaces on device


So it appears to be working as a USB host cable.   Does the real USB host cable not generate any messages at all?
Title: How To Identify Usb Host Cable?
Post by: BarryW on March 26, 2006, 03:37:05 pm
Quote
So it appears to be working as a USB host cable.   Does the real USB host cable not generate any messages at all?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120315\"][{POST_SNAPBACK}][/a][/div]


It shouldn't.  Like I said it's just a cable.  There shouldn't be any electronics in it.
Title: How To Identify Usb Host Cable?
Post by: TRIsoft on March 27, 2006, 03:18:40 am
Hi all,

the best of the USB-OTG specification is the color-coding.
Looking at the color of the jack/plug you can see what type it is:

Jack:
Black = Client (like a camera)
Gray = Client/Host capable (Zaurus)
White = Host only (like SL-6000)

Plug:
Black = Client cable
White = Host cable

///TRIsoft

Marc Stephan
Title: How To Identify Usb Host Cable?
Post by: BarryW on March 27, 2006, 02:03:36 pm
Quote
Hi all,

the best of the USB-OTG specification is the color-coding.
Looking at the color of the jack/plug you can see what type it is:

Jack:
Black = Client (like a camera)
Gray = Client/Host capable (Zaurus)
White = Host only (like SL-6000)

Plug:
Black = Client cable
White = Host cable

///TRIsoft

Marc Stephan
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120405\"][{POST_SNAPBACK}][/a][/div]

I've never seen a color other than grey in the stores.  Though to be honest, I've never seen a usb otg device.  The last cable I had was one of the gold-x cables that I hacked to be about 4 inches long that I kept in my Z's pouch.
Title: How To Identify Usb Host Cable?
Post by: Meanie on March 27, 2006, 08:21:14 pm
Quote
Quote
Hi all,

the best of the USB-OTG specification is the color-coding.
Looking at the color of the jack/plug you can see what type it is:

Jack:
Black = Client (like a camera)
Gray = Client/Host capable (Zaurus)
White = Host only (like SL-6000)

Plug:
Black = Client cable
White = Host cable

///TRIsoft

Marc Stephan
[div align=\"right\"][{POST_SNAPBACK}][/a][/div] (http://index.php?act=findpost&pid=120405\")

I've never seen a color other than grey in the stores.  Though to be honest, I've never seen a usb otg device.  The last cable I had was one of the gold-x cables that I hacked to be about 4 inches long that I kept in my Z's pouch.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120512\"][{POST_SNAPBACK}][/a][/div]

yep, they are all white except the gold x one

[a href=\"http://users.on.net/~hluc/myZaurus/myUSBHub.jpg]http://users.on.net/~hluc/myZaurus/myUSBHub.jpg[/url]
Title: How To Identify Usb Host Cable?
Post by: uth on March 27, 2006, 10:00:43 pm
Well, this particular adaptor that appears to function as a USB host cable is grey, same color as all the other adaptors in the kits.

The good news is the USB host cable that was supposed to come with my Zaurus (but was backordered) finally arrived.  So the question is moot now.   It does generate similar dmesg output to the mystery adaptor (yes, it's detected as a hub with two ports!)

Anyway, it looks like these USB OTG adaptors are more common than you might think, even if they are colored wrong and unlabeled as such.   Mine came in a cheap universal USB cable kit I got at big lots.  It's not the same kit Walgreens sells.
Title: How To Identify Usb Host Cable?
Post by: TRIsoft on March 28, 2006, 03:05:28 am
Hi all,

looks like some misunderstanding.
What i mean (and what's in the specs) is the color of the
plastic at the inside of the jack/plug where the contacts
are located.

Check a Zaurus (grey inside, because host+client), look
at the Zaurus PC cable (black inside, because client cable),
look a host cable (white inside).

That's it.

///TRIsoft

Marc Stephan
Title: How To Identify Usb Host Cable?
Post by: Jon_J on March 28, 2006, 03:44:12 am
I have the Walgreens kit, and what Marc said applies to my kit.
The host fitting has white plastic inside where the contacts are.
The other one, (I call it a sync fitting), is has black plastic inside where the contacts are.
My Palm sync cable, is also black on the inside.
I recived 2 "Host" cables from StreamlineCPUs when I ordered my SL-C3100, and the inside plastic is also white.
The shape also gives them identification, if you look at it under a good light.
Also, it's hard to remember, just by the shape of the plug.
(That pic I attached above is the only pic I had. I don't have a "good" digital camera)
Jon
Title: How To Identify Usb Host Cable?
Post by: chyang on April 01, 2006, 07:40:59 am
Quote
Hi all,

looks like some misunderstanding.
What i mean (and what's in the specs) is the color of the
plastic at the inside of the jack/plug where the contacts
are located.

Check a Zaurus (grey inside, because host+client), look
at the Zaurus PC cable (black inside, because client cable),
look a host cable (white inside).

That's it.

///TRIsoft

Marc Stephan
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120632\"][{POST_SNAPBACK}][/a][/div]

Cool!  
How do you know this? Specification covers?
Thanks.
Title: How To Identify Usb Host Cable?
Post by: TRIsoft on April 01, 2006, 11:50:34 am
Hi Chyang,
Quote
How do you know this? Specification covers?
the color coding is indeed part of the specification.
Go to http://www.usb.org/developers/onthego/ (http://www.usb.org/developers/onthego/).
This is the source for all USB-OTG related things.
In the download section (scroll down) get the file
"OTG Supplement (zip, 2.27 MB) - Revision 1.0a, 07-09-2003"
You'll find it on page 18, paragraph 4.3 "Color Coding"  

///TRIsoft

Marc Stephan
Title: How To Identify Usb Host Cable?
Post by: Viking on April 13, 2006, 11:02:58 am
some technical note:
the mini usb connector uses 5 contacs
(
 the normal "bigger" connector uses 4 contacts
2 for power/ground
2 for signals
)

the mini usb connetor uses
2 for power
2 for signals
and one magic conntact
this conntact is not used on dump cable-changers
but on hostcabels its wired ( maybe with resistor) to ground ( i am not shure if its ground
 or power, but it is linked  with some outside connector )
so its possible for the usbdriver to check if there is an hostcable by asking the state of this magic pin.
if it is an hostcable the driver turns power on and start useing it as host.
if this magic pin has no connection then the driver uses client mode.

so its possible to use any adaptor-cable  by overrideing the driver function asking the state of the pin. ATTENTION !! this DESTROY your zaurus if you connect to an PC and switch in hostmode ....... ( i think .. i nerver tried it ... so my zaurus lives )

but you can also use some measure device and small needel s to check
if your adaptercable has wired ( mybe with resistor ) pins between 1-2 or 4-5
( depends how you are counting )

if it is wired you got an hostcable
if not its and dump changer ...

ih hope this helps
Title: How To Identify Usb Host Cable?
Post by: Meanie on April 13, 2006, 09:03:25 pm
Quote
some technical note:
the mini usb connector uses 5 contacs
(
 the normal "bigger" connector uses 4 contacts
2 for power/ground
2 for signals
)

the mini usb connetor uses
2 for power
2 for signals
and one magic conntact
this conntact is not used on dump cable-changers
but on hostcabels its wired ( maybe with resistor) to ground ( i am not shure if its ground
 or power, but it is linked  with some outside connector )
so its possible for the usbdriver to check if there is an hostcable by asking the state of this magic pin.
if it is an hostcable the driver turns power on and start useing it as host.
if this magic pin has no connection then the driver uses client mode.

so its possible to use any adaptor-cable  by overrideing the driver function asking the state of the pin. ATTENTION !! this DESTROY your zaurus if you connect to an PC and switch in hostmode ....... ( i think .. i nerver tried it ... so my zaurus lives )

but you can also use some measure device and small needel s to check
if your adaptercable has wired ( mybe with resistor ) pins between 1-2 or 4-5
( depends how you are counting )

if it is wired you got an hostcable
if not its and dump changer ...

ih hope this helps
[div align=\"right\"][a href=\"index.php?act=findpost&pid=123028\"][{POST_SNAPBACK}][/a][/div]

I would be very careful with doing this. In host mode, the Z is expected to provide power while in client mode, the host pc will provide power to the Z which it is not supposed to accept, because if it does, it fries  If you really can't find a host cable, then you are better off hacking a normal cable and connecting the magic pin. There is plenty of guides online with picture illustrations showing how this can be done. I would advise not to change the behaviour in the driver/software code since accidents may happen and you can accidentally switch mode or worst, misconfigured hotplug mechanism does it for you and suddenly, your Z is smoking.
Title: How To Identify Usb Host Cable?
Post by: Viking on April 14, 2006, 11:35:41 am
Quote
I would be very careful with doing this. In host mode, the Z is expected to provide power while in client mode, the host pc will provide power to the Z which it is not supposed to accept, because if it does, it fries  If you really can't find a host cable, then you are better off hacking a normal cable and connecting the magic pin. There is plenty of guides online with picture illustrations showing how this can be done. I would advise not to change the behaviour in the driver/software code since accidents may happen and you can accidentally switch mode or worst, misconfigured hotplug mechanism does it for you and suddenly, your Z is smoking.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=123125\"][{POST_SNAPBACK}][/a][/div]

I said this with ATTENTION !!!!!

and mentioned that this will kill the zaurus.
( connectiong to an 6 Volts powered hup is also a bad thing )

but for detecting if an plugcable  is host or for  client use, its very easy to measure it
with an multimeter ....
Title: How To Identify Usb Host Cable?
Post by: beresmed on July 03, 2006, 03:30:19 pm
I have Zaurus C1000 and i need USB host cable. I can buy this USB cable pack from Sweex, but i don't know it contains USB host cable?

Is USB host cable = cable with USB mini 5 pin connector?

http://www.sweex.com/product.asp?pId=479 (http://www.sweex.com/product.asp?pId=479)
http://www.sweex.com/product.asp?pid=479&s=0 (http://www.sweex.com/product.asp?pid=479&s=0)

Regards,
Toni
Title: How To Identify Usb Host Cable?
Post by: Meanie on July 03, 2006, 05:16:26 pm
Quote
I have Zaurus C1000 and i need USB host cable. I can buy this USB cable pack from Sweex, but i don't know it contains USB host cable?

Is USB host cable = cable with USB mini 5 pin connector?

http://www.sweex.com/product.asp?pId=479 (http://www.sweex.com/product.asp?pId=479)
http://www.sweex.com/product.asp?pid=479&s=0 (http://www.sweex.com/product.asp?pid=479&s=0)

Regards,
Toni
[div align=\"right\"][a href=\"index.php?act=findpost&pid=133789\"][{POST_SNAPBACK}][/a][/div]

it's probably a mini b which is also 5 pin
chances are if it does not mention mini a, then it is not a mini a
besides, mini a should have a white enclosing but not everyone is following this standard
Title: How To Identify Usb Host Cable?
Post by: Tom61 on July 03, 2006, 05:17:03 pm
Quote
I have Zaurus C1000 and i need USB host cable. I can buy this USB cable pack from Sweex, but i don't know it contains USB host cable?

Is USB host cable = cable with USB mini 5 pin connector?

http://www.sweex.com/product.asp?pId=479 (http://www.sweex.com/product.asp?pId=479)
http://www.sweex.com/product.asp?pid=479&s=0 (http://www.sweex.com/product.asp?pid=479&s=0)

Regards,
Toni
[div align=\"right\"][a href=\"index.php?act=findpost&pid=133789\"][{POST_SNAPBACK}][/a][/div]

The USB host adapter is mini 4 pin type A male to 4 pin type A female. I'm not sure if this includes the right adapter, as the image is far too small to make out the adapter. It likely does, but I cannot be positive.
Title: How To Identify Usb Host Cable?
Post by: portalgod on May 10, 2007, 02:13:14 pm
Quote
Quote
I have Zaurus C1000 and i need USB host cable. I can buy this USB cable pack from Sweex, but i don't know it contains USB host cable?

Is USB host cable = cable with USB mini 5 pin connector?

http://www.sweex.com/product.asp?pId=479 (http://www.sweex.com/product.asp?pId=479)
http://www.sweex.com/product.asp?pid=479&s=0 (http://www.sweex.com/product.asp?pid=479&s=0)

Regards,
Toni
[div align=\"right\"][a href=\"index.php?act=findpost&pid=133789\"][{POST_SNAPBACK}][/a][/div]

The USB host adapter is mini 4 pin type A male to 4 pin type A female. I'm not sure if this includes the right adapter, as the image is far too small to make out the adapter. It likely does, but I cannot be positive.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=133796\"][{POST_SNAPBACK}][/a][/div]


Just as a confirmation, i bought the 6:1 kit from Walgreens and the connectors work like a charm.  Unfortunately now I've got a 6 foot USB Host cable, where I need to plug in my 6ft cable USB GPS.   I walk around with a Z in one hand and 12 feet of wire in the other
Title: How To Identify Usb Host Cable?
Post by: louigi600 on July 20, 2007, 08:26:07 am
If anyone is stuck and likes to take the risk of making a homebrew one I've documented how to make a normal mini-b plug into a mini-a plug.
I've posted somewhere on OESF about it and it's documented on my home page.

Since the documentation I've also made one very much shorted (so short that the metal shealding od the connectors are soldered together). It's very neat but be carfull because such a short one fas no flexibility ... a usb dongle will stick out a lot from the back of the Z and if you knock it anywhere you may damage the Z.