SDIO USB Host - Off-topic

hi i was wondering if anyone out there new if there was an SDIO USB HOST card, similar to the shown on the link below (but obviously SD not CF)
http://www.ratocsystems.com/english/products/subpages/cfu1u.html
if not, does anyone know/have tried the above CF to USB Host with a standard usb webcam and got it to work? if so can you explain how i go about setting it up.
thanks
smigger666

i'd suspect that the fact that usb to host have to supply 5volt with 0.5mA
it could be an issue for something as thin as an sdcard
also not sure if the sdio interface even operate at 5v

usb host
I haven't seen an sdio to usb card, but I use my "htc universal" with it's mini usb as a usb 1.1 host. It works ok but you have to supply external power.

if you have that working you are the first and only person i know of who gotten any htc device act as usb host
sure there were rumors that it would do host
but later on ppl retracted those claims

After wiring up a cable for that, how do you set the phone to 'host mode'?
Thanks

usb host is not a mode
your pc is in host mode always
as are the 2 htc devices which do support
usb host out of the box
is a device is connected and the driver
is present the device works

Nope, USB host is a mode. It's the whole Master / Slave affair. Granted, it's automatic for most devices when another is connected... ah... that ought to answer my question I guess.

Related

XDA USB INTERFACE

hello im working on a htc wallaby usb interface. but i have stumbeld across the problem that the htc wallaby is only a slave interface and therefore cannot use usb devices as they are also slave. how can i make the xda a host device? thankyou.
Raptor,
Read MSDN USB site about USB and the need for a Host Controller in order to host USB peripherals. They recognize that wince/pocketpc should have hosting functionality but they haven't got there yet, therefore all wince devices have to be treated as peripherals for now, which means for now you can only run as slave. If you need to drive a usb peripheral from your wince device an option is to add an SDIO pcmcia USB connector and write USB drivers through it. A forum on ExpertsExchange talks about these add-ons. I can;t imagine this is the solution you're looking for though.
http://msdn.microsoft.com/library/d...html/wceddkUSB_Driver_Interface_Functions.asp

USB host for printing

Hi,
Has anyone ever connected a USB printer to the Athena USB Host port?
Do you know if the X7501 running WM6 has a low-level USB driver that automatically map the USB port to LPT1? I have a USB printer that I would like to connect to the Athena for printing, but I am wondering how to access it.
Thanks in advance! John
Note: sorry if already posted on the WM6 forum but not sure to which one it belongs
As far as I know, Windows mobile has only to USB drivers, mass storage and HID. I don't think a USB printer would work here.

HOST USB or USB HDMI Video Card ? Any way to use usb port to use usb devices ?

Usb port is it locked or there is possibility to use it like usb host ?
To manage copy pictures of a camera to phone without pc by usb adaptator.
Samsung talked about usb 2 hdmi cable and think if its real it use some usb video card supported by phone(because of physic material imcompatibily of hdmi nd usb)
May there is a way to dev a tool or hack to get it works...
Aah!! Finally somebody like minded!!
I had been scouring forums for something like this. USB OTG would be an excellent add on to this phone. If not OTG, at least host would be an excellent idea.
No idea whether the existing USB Host driver for Nexus one would work on this one.
The processor on SGS already supports USB Host (not sure about OTG though). This has been pointed out in their press release - w w w .samsung.com/global/business/semiconductor/newsView.do?news_id=1043
I am just wondering - should we request Samsung themselves via mass petition to open up this feature on SGS?
some USB devices might be compatible, like the 100/1000 Mbps USB to RJ45 plugs
those same ones works in Windows Mobile it should work as well for Android, however a driver will be required.
mouse and keyboard support should work out of the box
external USB keys for storage, or even USB mass storage devices should work out of the box as well.
usb audio... hmm... not sure what else at the moment
Hi AllGamer
Thanks for the reply. So how exactly do we get this going on SGS?
I am much more interested in having USB HDD support on SGS (hopefully without an ext power source - am I asking for too much? ).
Are you suggesting that the N1 fix should work here also? Can somebody help us with a "How To" to enable this on SGS?
Cheers!!
Coooolboyz
you can plug in any USB mass storage devices (USB hard drives) and it should work.
However, you might not get enough power from the usb port, you'll still need need power cord for your external usb hard drive.
I know on my HTC windows phones works like that, it should be the same for Android.
I'll try that when i get a chance.
you just a need a USB female to a mini USB male cable
yep!! you are right about power!!! I am trying to get a cable - hopefully in couple of weeks should have this.
but I am wondering if all this would work without proper drivers in it. Would SGS have USB HDD drivers in it already?
coooolboyz said:
yep!! you are right about power!!! I am trying to get a cable - hopefully in couple of weeks should have this.
but I am wondering if all this would work without proper drivers in it. Would SGS have USB HDD drivers in it already?
Click to expand...
Click to collapse
I can see one problem, You will only be able to use Fat32 drives unless someone compiles NTFS / HFS+ into the kernel. Ext3/4 is already done so I don't see many problems. What I recommend you do is get some sort of adaptor for Female USB > Micro USB and test it out with a flash stick or you can hack one .
Yeah - I understand the difficulties of having NTFS support outside the MS world.
I didnt know that ext3/4 were already a part of the kernel!! Is this by default available in all Android kernels?
For USB Host cable - I am guessing that this one can be used - http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=250671106072 (same as what Sven used for N1 USB Host capabilities).
But I seriously doubt plug and play would work (that would be too much of an expectation! )
Does any body have that cable here, who can check out if SGS does actually work in USB Host/OTG mode?
Sven has try with a Galaxy another Host Driver
h t t p : / / sven.killig.de/android/Galaxy/
Hm what can we do with these files?
However, any news about this?
Maybe, we could ask some Galaxy S kernel developers about this.

Optimus One support USB host mode? (update: working now!)

I'm looking for an Android phone that supports USB host mode. The Optimus One looks like a great phone but I can't seem to find anywhere whether USB host mode can be enabled for this phone. I'll have a separate power source for the USB devices, so the phone doesn't need to supply power in USB host mode, similar to Nexus One.
Has anyone tried to make USB host mode work with this phone? Thanks,
i read the p500 datasheet ..apparently the underlying chipset msm7227 supports it ..Its just been unutilised..So no i dont think we can have USB OTG here
sarfaraz1989 said:
i read the p500 datasheet ..apparently the underlying chipset msm7227 supports it ..Its just been unutilised..So no i dont think we can have USB OTG here
Click to expand...
Click to collapse
Thanks! By being unutilised do you mean it's hardware related or it's "just" a software issue? I'll probably give it a try if can be enabled with a proper driver.
USB host mode
I built a usb adapter just like here (but not the mini dongle, yet) but I see no output in dmesg.
I have tried it with my camera which should not be USB powered (olympus dslr - that would be the primary use, if we could get it working) and with a wireless mouse (it's dongle is surely USB powered). No output in dmesg whatsoever.
I will also try a keyboard, and also test it with a USB hub with separate power input. I will also try to make that mini dongle mentioned in the link, but have to find a cheap micro usb charger first.
Another thing is that I have no idea what drivers are included in the kernel, if any, for USB devices. still trying to figure out a way to do that. If anyone knows how, please tell me how.
my kernel version is 2.6.32.9 lg-electronics (at) android3g-buildserver #1 Sat Oct 9 20:54:44 KST 2010
Build number FRF91
Software version LG-P500-V10b
EDIT:
Found this site, with the same thing done to a ZTE Blade, which is similar (same chipset - MSM7227 and same problem with powering usb devices), but has eclair (different kernel version and of course different build).
Could any of the senior or more experienced members of XDA do something similar? It would be a very nice thing to have on our little phones...
Thanks, so it looks like it doesn't "just work".
I can't be of much help just yet since I don't have the phone, but I think if you see nothing in dmesg, then first you have to rebuild the kernel with USB host support, using maybe the driver in ehci-msm7201_Blade.tbz in your second link.
It could "just" work, haven't bought a proper usb otg cable yet, mine is hacked and might not be the right one,because the micro part of it is from a normal micro usb cable, and i think that the fifth pin on the micro usb must be wired through some kind of resistor to gnd or vcc of a certain value in order to activate the host mode in proper otg manner.
Also, i do not know if the port would provide (enough) power for unpowered devices (usb memory sticks).
Anyway, i am only interested in self powered devices, such as cameras (in mass storage mode).
Sent from my LG-P500 using XDA App
Some updates here! I took the plunge and got the Optimus One anyway
The good news is that the LG v10r kernel source seems to have the USB host driver for msm7x27; it is just not compiled into the official kernels. I compiled a kernel with usbcore, ehci-hcd, usb-storage and usbhid built in.
Extract boot.img and flash it with:
flash_image boot /sdcard/boot.img
If it works, then you should be able to attach a self-powered usb mass storage device or keyboard with it. I haven't actually connected the phone with any USB device yet; the phone still charges when connected to my computer, which might not be a good sign. I'll do more testing on it myself in a few days when I get the right cables. Be warned though that I take no responsibility for any potential damage
Oh, and note that usb client mode is nonexistent with the attached kernel because host and client drivers don't play nice with each other. Because of this you'll probably see some error message that some setting application crashed, but it's not a big deal.
EDIT: this one doesn't work; please see my next post
Could some one please explain, what is this "host mode" ?
I am new to android
@haoto
Done it, no luck (no output in dmesg whatsoever)... maybe some insmod should be in order?
My cable is a hacked one, with the sense pin "floating"
I used a external usb hub, and a Y cable (with a second usb for PC-style plug) to provide the power to the hub.
Could you please post a version of the kernel that is flashable via recovery (maybe more people - including me - would find it easier to do)?
I tried to connect the camera both directly and with the usb hub in between. Not even the usb hub was detected.
Maybe the sense pin in the micro plug, that in my hacked adapter is floating...
And also, do these drivers look at the sense pin on the usb cable? I haven't found a "proper" USB OTG adapter (using a pathed one, made fom am micro data cable and a usb extender), and in the cable that I have, pin 4 (the sense pin) is floating, it's not grounded.
I think that the conflict between host and client is solved in the ZTE Blade (with an official froyo update), and, if I remember correctly, the sources for the kernel are released (I think I have seen them here on XDA). And I think that it is solved by the means of the sense pin in the usb connector. Even in the Optimus the sense pin is connected, as far as I remember from the schematics in the service manual (also found here on XDA), and it could be watched/read... but then it would not work with hacked cables.
As for the charging, I'm not sure how the charging circuit works, but, if what I'm saying about the sense pin in the USB port (I'm obsessed with that pin, it seems...) being floating (not strapped to GND) in the charger cable, it might trigger the charging circuit to start charging.
And now to explain my "obssesion" with the sense pin:
I bought a Nokia CA-157 cable (USB OTG adapter) and, not being very careful, I did not notice that it is micro USB A, not B and it does not fit (same size, but it has squared ends, so it is a bit too big...). So I tried to "bend" it i order to fit, but I destroyed it. But then I read a bit more about the pins in the usb port, and measured it (very carefully, cause the pins are so small) and found that pins 4 an 5 are strapped together (zero ohms). Then I tried to measure the pins on the normal micro usb cable, and found out that they are not strapped. So I figured that, in order to have a OTG adapter working correctly (charging, usb host and usb gadget) you need to have that 4 pin strapped to pin 5 in order to get the chipset in host mode.
@DJoptimus-One:
USB host (or rather USB OTG) is the posibility to connect devices to your android just like connecting them to a PC, eg. connecting a photo camera to the phone directly (no PC) for copying photos, or connecting a PC keyboard directly to the phone, or connecting... a USB memory stick directly to your phone for file copy... etc.
@moderators:
Maybe this thread should be moved to the development section, as it has a bit of recompiling and testing, and maybe it could get more people involved in the development of this?
More updates. I'm using the LG kernel source LGP500(Thunder)_Android_Froyo_v10r.zip which is based on linux 2.6.32.9, with stock 2.2.2 system. Attached are the boot image, kernel zImage, and kernel config I used. You should be able to at least see some dmesg output this time. Sorry if it's not easy for you to flash it; I'm completely new to android phones and will learn the proper ways when I get the time. For now it looks like everyone wishing to take this further needs to hack and compile the kernel source anyway Also, I didn't compile the USB device code (Android gadget) in because it seems to crash my phone when combined with USB host driver. Maybe the LG driver engineers didn't expect us to use it this way yet.
A Micro-AB plug (our a hacked Micro-B one like yours by soldering ID and GND) is required to produce any response when a USB device is connected. According to OTG spec you should also connect a 36.5 kΩ resistor between ID and GND when using a charger. I didn't test this, but I don't think it's a problem for now.
However, there are some complications I cannot figure out.
First, the hardware doesn't produce an ID-changed IRQ (OTGSC_IDIS) when the Micro-AB plug is plugged-in, nor does OTGSC_ID ever becomes "A". I simply hacked the is_host() macro in drivers/usb/otg/msm72k_otg.c to always return true so that the driver believes it is a host. But for some unknown reason, you still need to use a Micro-AB plug.
I did manage to get the phone run in USB host mode, using a Y-cable to power the devices. But I can't get it to recognize any device. Below is a sample dmesg output when a USB keyboard is connected:
Code:
<7>[ 153.284488] usb usb1: usb resume
<7>[ 153.284513] msm_hsusb_host msm_hsusb_host.0: resume root hub
<7>[ 153.321383] hub 1-0:1.0: hub_resume
<7>[ 153.321453] msm_hsusb_host msm_hsusb_host.0: GetStatus port 1 status 84001403 POWER sig=k CSC CONNECT
<7>[ 153.321486] hub 1-0:1.0: port 1: status 0301 change 0001
<7>[ 153.431414] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
<7>[ 153.431471] hub 1-0:1.0: port 1, status 0301, change 0000, 1.5 Mb/s
<6>[ 153.551378] usb 1-1: new low speed USB device using msm_hsusb_host and address 2
<7>[ 153.553388] msm_hsusb_host msm_hsusb_host.0: detected XactErr len 0/8 retry 1
<7>[ 153.554364] msm_hsusb_host msm_hsusb_host.0: detected XactErr len 0/8 retry 2
...
<7>[ 155.943383] msm_hsusb_host msm_hsusb_host.0: detected XactErr len 0/8 retry 31
<7>[ 155.944376] msm_hsusb_host msm_hsusb_host.0: devpath 1 ep0out 3strikes
<7>[ 155.944399] usb usb1: clear tt buffer port 1, a0 ep0 t00080248
<3>[ 156.151369] usb 1-1: device not accepting address 5, error -71
<3>[ 156.151451] hub 1-0:1.0: unable to enumerate USB device on port 1
<7>[ 156.151478] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 000
Notably, connecting a high-speed device such as a USB stick produces a different, and shorter message:
Code:
<7>[ 4333.870061] usb usb1: usb resume
<7>[ 4333.870088] msm_hsusb_host msm_hsusb_host.0: resume root hub
<7>[ 4333.901361] hub 1-0:1.0: hub_resume
<7>[ 4333.901438] msm_hsusb_host msm_hsusb_host.0: GetStatus port 1 status 8c001002 POWER sig=se0 CSC
<7>[ 4334.011429] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
So, it seems that the hardware has difficulty recognizing USB "j states". I'm not really sure about this because I didn't do these experiments very carefully, and I do remember seeing "sig=j" once, but can never reproduce it anymore. (Hint: I guess it might be related to control of the pull-up resistor on the phone side. It's also possible that my cable is bad and it'll just work for you, fat chance )
As a side note, I also tried reversing the D+ and D- pins on one of the devices I tested as per:http://android.modaco.com/content-page/334222/an-experimental-cm7-kernel/page/200/#entry1667619 But (apparently) it doesn't help except making the device useless.
Hope someone can pick this up from here as I'm out of spare time at least for some weeks
Tried the latest kernel, but still does not work...
I will try to hack the cable a bit more, see if I can get any change in behavior.
I hope someone else reads this thread and and comes with some more input...
My only input so far is testing... (I do lack some knowledge about kernel building...)
Maybe looking into the ZTE Blade kernel and apps would help... (it's here)
Oops, I just noticed the build I uploaded doesn't work for me either; I changed some configuration and assumed it was harmless. They are updated now, sorry for the blunder
Will try it again (I assume it is in the older post).
Also, maybe a "software switch" (either app or simply a touch or something) could be made to switch from host to gadget mode like here? (Better after we get it working, though...)
Oh no, it's in the newer post
If you have the time, could you also try to measure the following with that kernel installed:
1) voltage between VCC and GND when nothing is connected
2) voltage between D- and GND and the voltage between D+ and GND when only a charger is connected
3) resistance between D- and GND, and resistance between D+ and GND when nothing is connected
I'm not sure I know what to do next, but this might help us clear up a couple things.
I'll try to have a look at the ZTE Blade kernel source later, thanks.
Update: it's suddenly working!!!
I successfully mounted a USB stick! So either the driver is unstable, or there indeed is something wrong with my hacked cable!
(And then I burned my USB charger! Thankfully my phone is alright. Looks like there is definitely something wrong with my cabling )
With my cable did not work, so I managed to completely destroy the micro part of my cable trying to find a way to short pins 4 and 5.
As I understand it, you have your cable with pins 4 and 5 shorted (sense - gnd).
I am still trying to find a proper adapter, but all I can find is the CA157 from nokia, which is A and does not fit...
And I could not find another standard otg cable (at least the part number, in order to find it faster) from a big manufacturer (htc, noika, samsung, whatever...).
I will get another micro and hack it once more, though, and try to measure the voltage on the pins. Maybe a noname cable is easier to mod...
As for the burnt charger... I don't think that there should be any problem... Here are some prints from the service manual.
Did you use the charger for powering the USB bus? Or did you just plug in the power?
I don't have issues with the charger connected just for charging the phone (I'm using a nokia micro USB charger, and it's working perfectly... even with the modded kernel)
I actually got a micro-B to mini-B adapter with all 5 lines connected, so I can cut the cable at any place to solder the ID and GND lines. Please do let me know when you get it working (or not... mine seems to work from time to time now)
The charger burned when I was using it to power the USB devices. I guess it's most likely caused by a short in my hacked OTG cable , it was a cheap USB charger which probably doesn't have any over-current protection.
sorry for this noobie question but did u meant we could attach usb devices directly to phone?
scorpionking674 said:
sorry for this noobie question but did u meant we could attach usb devices directly to phone?
Click to expand...
Click to collapse
Ya.
Sent from LG P500.
This seems very interesting! Can you guys write a short tutorial on the steps needed to get OTG working?
It is not fully working yet (at least not in a very friendly way).
Anyway, I'm still trying to hack a cable with the sense pin grounded, in order to do some testing at least...
Steps to be taken:
WARNING!
Rooting the phone and installing a new kernel and some other stuff presented here voids warranty, and MAY brick your phone!
Also, this requires connecting to your phone a cable that is HACKED and not supported by the manufacturer; it MAY (and is not very unlikely) FRY YOUR PHONE
We do not take ANY responsibility if you brick/fry your phone; this is only what we are doing or trying to do.
Also, the mod is not yet complete, as in the last version only the usb HOST is included (connect devices to Optimus), not the USB device is included (connecting the optimus to the PC does not work any more, not as sync nor mass storage, and there is no mode switching yet). Charging does work.
Also, after boot you get a message that some settings app does not work (we ignore that).
So, if you are willing to risk bricking or frying your phone at your own responsibilty, here is what we are trying to do...
0. Do a full backup. This is the firs step, no matter what you do to the phone (well, at least after rooting and installing custom recovery...), in order to have a WORKING restore point. (it will help if something that you have been warned might happen actually happens - except a fried phone)
1. a. Get a micro USB B male to USB A female OTG cable (that has pins 4 ans 5 straped together)
1. b. Alternatively, you can hack a cable like that, if you find the parts (one micro usb b male to mini usb male/female cable with all 5 wires inside and a normal usb a male to usb a female, and hack the cable)
2. root your phone (!! at your own risk !! only YOU are responsible for what you do to your phone)
3. install the latest kernel version posted here. Same warning as above.
4. make some hack on the cable (eg. get a y usb cable from an external hdd or something) in order to get +5V to the USB bus (at this time the phone does not supply +5V to the devices connected, maybe some state on the usb driver chip must be changed, or maybe the phone does not support providing power via the USB port). Connecting this cable to your phone may fry your phone, so double check, triple check and remember that YOU DO THIS AT YOUR OWN RISK...
5. connect a usb stick and... (from this point I could not test, as I do not have yet a cable with the sense pin grounded) make it work... (probably like in the steps below; NOTHING IS AUTOMATED YET, I GUESS)
6. open a terminal, type "su" (get root access), type "dmesg" (lots of lines will appear) and then identify the block device that the stick is (probably something like "sda").
7. make a folder somewhere where will mount the USB stick
8. mount the usb stick and see if it works properly.
From step 5 onward I did not test anything, so please correct me if I said something wrong.

[Q] USB Host Mode - Stock c6602

Sony advertises the c6602 as being able to do USB Host Mode. I ran USB Host Check, and Android.hardware.USB.host.xml was found, but, handheld_core_hardware.xml was not. I'm assuming this is why when I attempt to connect a USB device (nooelec USB sdr) i'm having issues working with the device even though I have the RTL2832U driver installed/configured.
I have not rooted. I'm assuming that the other xml/any other needed libraries needed to be able to power the device have to be installed in order to run this device without connecting it to a USB hub that is already powered, or? I tried to take a USB hub, plug the cable into an IPhone wall adapter so it'd have power, but, I had the same results.
Thoughts? I should still be able to use the device if I have an external power source, no?

Categories

Resources