OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> C860 as usb host by software?
omega
post Jun 10 2004, 03:34 AM
Post #1





Group: Members
Posts: 626
Joined: 13-April 04
From: Ireland
Member No.: 2,825



Hi,

I have been wondering about this for a while now. Since USB is bidirectional, is there a way to emulate a usb host in software using the client port on the c860?

I understand that there would be no power supply available on the client port, but this could be implemented in a cable. Apart from this though, what other hardware features are missing from a client side implementation of USB? Is there normally a hardware generated clock signal provided by the host?

The reason i'm thinking of this is that normally it is not conceivable to use a client usb device as a host - but in this case the client is intelligent and not a passive device like a camera, etc...
Go to the top of the page
 
+Quote Post
omega
post Jul 2 2004, 06:45 AM
Post #2





Group: Members
Posts: 626
Joined: 13-April 04
From: Ireland
Member No.: 2,825



*** BUMP ***

So any ideas? I was looking around but didn't see anything so far...
Go to the top of the page
 
+Quote Post
scoutme
post Jul 2 2004, 01:16 PM
Post #3





Group: Members
Posts: 579
Joined: 19-April 04
Member No.: 2,912



gonna find something on the net..

I'll let you know
Go to the top of the page
 
+Quote Post
lardman
post Sep 7 2004, 12:01 PM
Post #4





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



I hate to bring this up again... ;-)

I was looking at how usb dongles (the kind of thing you have to use to work some software) work today (fairly random) and came around to this topic again.

Can someone explain once and for all why it's not possible to implement a USB host with the hardware built into the Z (that is my understanding of what people think, but there's always a little chink in the argument exposed by my lack of understanding)?

My understanding is that most of the USB host can actually be implemented in software; therefore is there enough hardware to make this possible (I realise this would require a fair bit of development and number-crunching power in the software, but I'm just trying to get my head around it)?

Of course most of this functionality is normally built into the hardware, but is there even the fainest glimmer of a possibility of being able to run/emulate it in code?

Cheers,


Si
Go to the top of the page
 
+Quote Post
lardman
post Sep 8 2004, 06:08 AM
Post #5





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



What is the bit of hardware which is the USB client (e.g. is there a USB client chip)? Or is this handled directly by the CPU (I read somewhere that PXA chips have some USB functionality built-in)?


Si
Go to the top of the page
 
+Quote Post
tz
post Sep 8 2004, 12:45 PM
Post #6





Group: Members
Posts: 102
Joined: 2-February 04
Member No.: 1,584



I won't go into deep theoretical possibilities (changing the USB ports to digitial I/O, adding RTLinux (real-time extensions) and bit-banging the USB host signals).

The USB controller is in the ARM chip. AFAIK it does NOT have a host mode, and is USB 1.1 which does NOT have a bidirectional mode. One of the (IMO) errors of USB is that it wasn't peer-to-peer, it *required* a host, and could only communicate host initiated transactions to a peripheral.

The timing and protocol are different depending on Host/Target. Some chips (like the one in the Ratoc CF card) can be configured to be either host or target. Most can't, including the onboard USB controller on the Z.

I don't know if "bit banging" is possible (I use my sound port as a UART for GPS), but the USB "controller" is only designed to handle the target half of the USB protocol. So it can't initiate, only respond. The new USB 2.0 chips that can do peer-to-peer have the extra modes and registers to make this work.

So you can't put the onchip USB controller into a state where it would send the correct protocol to communicate to another USB target device.

By "bit banging", I mean implementing a software USB host that sets or clears bits in an output port register within the USB timing specs.

Another problem is power - the host or hub provides it. You would have to hack in a 5 volt power to both target devices from somewhere.

Theoretically, someone could come up with a USB "null modem" that would be a pair of hosts with some intelligence that would simply echo USB Serial (and maybe network) across the two host ports.
Go to the top of the page
 
+Quote Post
iamasmith
post Sep 8 2004, 01:20 PM
Post #7





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



Woah,

Don't like the sound of trying to implement the bitbanging stuff for USB.

I had some experience of writing this sort of assembler stuff in my early career. Without clocking hardware to rely on to measure intervals you are into tight assembler, counting cycles to produce timing loops, complete loss of portability etc.
Not a good combination for a Linux driver.

I know the SL-6000 has Host USB HW, so it may feature in a future model.... anyone know if the PXA270 has USB 2 features ??? - There's rumours that's a likely processor for the SL-C9x0 series...

- Andy
Go to the top of the page
 
+Quote Post
lardman
post Sep 8 2004, 02:02 PM
Post #8





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



QUOTE
The USB controller is in the ARM chip.


Okay, are there any specs for the hardware/api/asm instructions that anyone knows of? And is this the PXA or the SA, or both?

QUOTE
Another problem is power - the host or hub provides it. You would have to hack in a 5 volt power to both target devices from somewhere.


The power's not a major issue - it's always possible to supply that externally, and with a battery powered device this is always going to be a possible issue anyway. I was really interested in what you call "bit-banging" and whether this would be possible.

I've been doing some digging of my own, but still need to learn more; but from what you say it's the timing (or rather being able to provide the timing signals or signals at the correct times, etc.) which will cause the issues?

I agree with iamasmith that if it comes down to having to clock the hardware speed and adjust the assembly accoringly to ensure that the timing is correct it's really a non-starter, but I live in hope that this might not be necessary ;-)

My real issue is that I don't know what the hardware differences are between the host and client chips and their functionality; the same goes for the software (I need to dig out the kernel source and take a look).

QUOTE
The new USB 2.0 chips that can do peer-to-peer have the extra modes and registers to make this work.


Yes, I realise this, but it was my understanding that only basic hardware is actually needed and that the rest can be performed in software (should one so desire - and I'm certainly interested ;-))

QUOTE
Theoretically, someone could come up with a USB "null modem" that would be a pair of hosts with some intelligence that would simply echo USB Serial (and maybe network) across the two host ports.


Or would it be easier to implement the On-the-go part of the USB spec (which can still runa t slow speed iirc), as this should be more similar to the current client setup than a complete host.


Si

P.S.

QUOTE
I won't go into deep theoretical possibilities (changing the USB ports to digitial I/O, adding RTLinux (real-time extensions) and bit-banging the USB host signals).


I'd be interested, as, I'm sure, would others. I'm always happy to learn :-)
Go to the top of the page
 
+Quote Post
omega
post Sep 9 2004, 12:15 AM
Post #9





Group: Members
Posts: 626
Joined: 13-April 04
From: Ireland
Member No.: 2,825



I would also be interested... I'm bit banging a few io ports on my microcontroller project at the moment... not easy but doable...

We could of course get a serial to usb host chip and try and drive it from the serial port on the zaurus... ah yes i can just see the speed now. half an hour to download a song from the harddrive! probably enough to read an ebook by though! lol
Go to the top of the page
 
+Quote Post
lardman
post Sep 9 2004, 02:44 AM
Post #10





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



QUOTE
We could of course get a serial to usb host chip and try and drive it from the serial port on the zaurus... ah yes i can just see the speed now. half an hour to download a song from the harddrive! probably enough to read an ebook by though! lol


I thought about this and dismissed it as I thought exposing the USB host to the kernel would be a pain; however it might not be that bad - anyone have any ideas?

How happy would the kernel be? My reasoning is that the serial port and 'usb host' exist at the same level of abstraction in the kernel, therefore it (the kernel) might not be happy using one to implement the other; perhaps the kernel would have to completely ignore the serial port so it could be used as the 'usb host' only?

Just some random thoughts... ;-)


Si
Go to the top of the page
 
+Quote Post
omega
post Sep 9 2004, 02:51 AM
Post #11





Group: Members
Posts: 626
Joined: 13-April 04
From: Ireland
Member No.: 2,825



hold on, hold on! serial port is just too slow don't you think? I was just joking.....
Go to the top of the page
 
+Quote Post
lardman
post Sep 9 2004, 03:22 AM
Post #12





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



QUOTE
hold on, hold on! serial port is just too slow don't you think?


It may not be very useable, but surely it's about what's possible?

In any case does it matter how fast the port appears to be? Will the USB client device refuse to communicate if the 'host' is running too slowly? If so, then I agree that it's a waste of time, otherwise it's still an interesting thought.


Si
Go to the top of the page
 
+Quote Post
Foxdie
post Sep 10 2004, 01:34 AM
Post #13





Group: Admin
Posts: 465
Joined: 8-November 03
From: Birmingham, United Kingdom
Member No.: 875



How about a "middle man" box? A combined USB Host / Client to allow 2 USB clients to talk? I think if this existed it would require a driver installed on the Zaurus but it could work.
Go to the top of the page
 
+Quote Post
iamasmith
post Sep 10 2004, 01:37 AM
Post #14





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



QUOTE(Foxdie @ Sep 10 2004, 09:34 AM)
How about a "middle man" box? A combined USB Host / Client to allow 2 USB clients to talk? I think if this existed it would require a driver installed on the Zaurus but it could work.

Would this be cheaper than the USB Master CF cards ??, The CF Card gives power too (I think).

Anyone had experience of these ?
Go to the top of the page
 
+Quote Post
lardman
post Sep 10 2004, 02:47 AM
Post #15





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



QUOTE
How about a "middle man" box? A combined USB Host / Client to allow 2 USB clients to talk? I think if this existed it would require a driver installed on the Zaurus but it could work.


Yes this is also a good idea, but it's starting to look expensive (I'd guess) and time consuming, both in terms of physical manufacture and driver writing. Might just be easier to reach into pocket and buy one of those ratoc cards (less fun though ;-).

This is going slightly off topic now, but where would one buy one of these (the cheapest place?), and are there any other similar cards out there (there was an interpocket card which has now been discontinued and another TwinParadox SolarExpress card which has been awaiting release for a long, long time).


Si
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd July 2014 - 05:47 AM