Hi, Thanks again. I really appreciate your prompt and insightful answers. And again, my comments are inline :) Suli On Mon, Oct 8, 2012 at 7:04 PM, Peter Stuge <peter@xxxxxxxx> wrote: > 杨苏立 Yang Su Li wrote: >> is there some hardware I can by to turn my desktop into an USB >> device or USB OTG device? Preferably this hardware should use my >> desktop's memory to back-up its storage. > > Not that I know of. > > >> > If the USB OTG host has a Micro-AB connector then yes, this cable is >> > needed to allow a USB device to connect to the OTG host. >> >> I assume another solution would be directly attach an SSD to the >> cellphone, in which case USB transmission/SATA-USB conversion is >> supposed to be the bottleneck, as I couldn't find any phone/tablets >> which support USB 3.0. Do you guys have any comments on the >> performance of such a solution? > > That is a great idea! If an SSD has good enough performance > (and in practise, all SSDs have SDRAM buffers) then go for it. Connecting an SSD to a cell phone is actually my initial idea. I wanna try memory/ramdisk because I need fine control over the I/O speed I get. As memory is a true random access device, I can get uniform access time, thus its performance is much easier to understand/reason about. In the contrast, SSD/HDD is something complicated with sophisticated caching/relocating going on. So it is hard to predict how long your next I/O request is going to take..... However, I realize there might not be such a thing which connect a DRAM/SDRAM card to USB port. So I might have to settle for SSD, and strive to find an SSD which offers the most predictable performance... > > Compare SSD reviews and choose an SSD with performance that you like > (I am happily using the Samsung 830 series) and use these two cables: > > http://www.amazon.com/Seagate-FreeAgent-GoFlex-Upgrade-Cable/dp/B003IT6PHM > http://www.amazon.com/T-Flash-Adapter-Samsung-GT-i9100-GT-N7000/dp/B005FUNYSA > > to connect the SSD as a USB storage device to the cellphone. I have > good experience with that particular Seagate USB cable. It may be a > good idea to look specifically for a USB 3.0 cable, because the USB > chipset is designed for higher performance, so it is perhaps more > likely to approach theoretical maximum performance when used with > a USB 2.0 host. I am quite concerned about the USB 2.0 speed indeed. Is there a way to turn an USB 2.0 cellphone/tablet into an USB 3.0 host by, say, adding some kind of hardware? > > >> >> and an USB host to host cable (like this: >> >> http://www.amazon.com/Plugable-USB-Easy-Transfer-Cable/dp/B005OTPVMY >> > >> > Note that this cable is a "double device" cable, where each end >> > simulates a storage device, allowing file transfer between two >> > computers. The performance of this cable is probably not amazing. >> >> If I understand it correctly, I could use the phone as a host using >> this cable? > > A phone supporting OTG can be used as host using this cable: > > http://www.amazon.com/T-Flash-Adapter-Samsung-GT-i9100-GT-N7000/dp/B005FUNYSA > > Anything that plugs into this cable on the other end is a device. > > >> And its performance will suffer because it will have to >> transform every master command into a slave command? > > The host-to-host easy transfer cable is a device on both sides, which > requires some kind of processing inside the cable to simulate a > storage device two times, and the cable is so simple and cheap that > the simulation will not likely have very high performance. It also > means that the maximum performance is determined by some factor > involving the *other* device, connected to the other USB host. > This method is not good. > > >> The goal is to simulate cellphone storage. So I think 8/10GB to >> 32/64GB would be reasonable here. If that's possible, I can settle >> for less than 5GB too. And hopefully the solution would be software >> based/light weighted, as unfortunately I don't have too much hardware >> programming experience. > > Since you need several GB backend storage as opposed to 200-400 MB it > is rather difficult to find simple hardware solutions. > > >> > In theory you can maybe use a Beagle hardware (BeagleBoard-xM, >> > BeagleBone, etc.) to create a RAM-based USB storage device. BUT! >> > I do not know if the USB hardware in the TI OMAP chip will approach >> > maximum theoretical USB throughput in this configuration. It would >> > however be a way to test your idea with low hardware cost. >> >> So if I understand it right, Beagle board is something which could >> operate as an USB device, > > Yes. Different boards can even support USB OTG; so be either host or > device. > > >> and which I could also insert large DRAM cards? > > Unfortunately not, the development boards I've seen all have a fixed > amount of DRAM. BeagleBone has 256 MB, BeagleBoard-xM has 512 MB. > There are many other similar development boards, but they all have > fixed DRAM. > Without large enough DRAM (at least several GB) Beagle board is definitely out. No way I could change its DRAM card to a larger one? > >> How hard is it to run a Linux on such a borad then? > > They usually ship with Linux and there are strong communities of > Linux users around them. They are made for Linux. But I do not know > what the performance is of the gadget hardware - in particular I > don't know if it reaches the theoretical maximum peformance of USB. > > >> If I can easily run LInux, then this solution really seem >> appealing then. Do you have any recommendation on specific Beagle >> board? > > If you want to try it I suggest choosing one of BeagleBoard-xM and > BeagleBone. The latter is lower cost, smaller, more integrated, but > is also slower and has half the DRAM. > > >> > For maximum performance I suggest to design special purpose hardware > .. >> > Significantly more work, but will have great performance. >> >> As for this solution, how much development effort would you estimate? > > Maybe 4-6 months for someone with the right background and good > "predisposition" - but without experience from the technologies > involved. (CPU, USB, DMA, memory bus, FPGA, SDRAM. It is very > much like building a complete computer from scratch.) > OK. Then this solution is out too (at least for now). > >> I could probably devote one week to setup such a thing, but if it will >> require more than two weeks' of work, then it probably doesn't worth >> it anyway. > > If you think the SSD method gives sufficient performance then I > suggest doing that. It's by far the fastest and simplest solution. > > > //Peter > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Suli Yang Department of Physics University of Wisconsin Madison 4257 Chamberlin Hall Madison WI 53703 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html