yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] Arise:
Like I said in the previous posts, I think we need a real OTG USB, like the ones with pins 4&5 soldered. I think using some simple cables/connectors to go from microUSB to USB A Female is not going to work without a software to make the phone aware of the wannabe OTG mode.

And I don't understand what are you trying to accomplish with the USB Hub. You are saying that in order to use the USB Host functions we need a powered USB Hub? That would be a strong "no go" for a lot of people. Including me.

I really hope to have the phone, a 10 cm cable and a USB memory stick. So I can access everything without external power.

I believe a keyboard or a 2,5'HDD is not possible without extra power, but at least for a USB memory stick or a small mouse is this possible?

P.S. I'm still waiting for my USB cables... ordering from Hong Kong takes some time. :)
[Galaxy S I9000 Android Development] Bec07:
What we are aiming for is called host mode and it is possible without external power for flash memory, mice and keyboards for sure. There's the n900 project a few pages back that's quite similar to ours.
[Galaxy S I9000 Android Development] Arise:
It must be something simple just like that is possible on Nokia N8.

P.S. The nokia CA-157 cable is not good for us! The microUSB port is a microAB port, and we need a microB port! The CA-157 cable does have some squared corners!
[Galaxy S I9000 Android Development] Bec07:
It's not simple at all. N8 has certified OTG which delivers 500mA to the port and real USB speed. We don't. The best thing we can hope for is host mode and 200-300mA which will suffice for most flash drives and reasonable speed. The hardware isn't wired to deliver power to the port and it will require real programing and kernel hacking.

I followed the progress on n900 and it was seriously complicated. Especially making it self powered. E don't even know if it's possible. And there are serious risks to burn the device when charging.

N900 doesn't detect the hardware by itself, you have to open the program and specify the hardware type you have connected.

Also the n8 cable isn't good because it's expensive and we might have to solder lines together. Otherwise it's standard usb and is compatible. Ebay adapters are cheap and will do best.
[Galaxy S I9000 Android Development] Arise:
This is exactly what I'm afraid of. The Galaxy S might not give "juice" out on that port.

I studied some specs sheets:www.hirose.co.jp/cataloge_hp/e24200011.pdf

and it seems the micro B and micro AB cable are somewhat identical, the only difference is that micro AB has corners. Both plugs have a 1.8mm height and 6.85mm width.

I think it is possible to buy a micro AB cable (nokia compatible) and then use something like a dremel to mod the cable / peel off the corners to make it fit in the microB receptacle.

I know the whole ideea is to solder 4+5 but I like to have a nice looking cable. :D
[Galaxy S I9000 Android Development] Bec07:
You can use normal cable and do the soldering on a female to female adapter or use heatshrink tube on the rewired cable.

However the n900 has host without rewiring so I'm not 100% sure we need it.
[Galaxy S I9000 Android Development] AllGamer:
i'm so tempted to buy one of those Nokia "USB to microUSB" cables and attach my portable hard drives to my SGS

:D
[Galaxy S I9000 Android Development] Bec07:
The N8 cable is actually different, look a page back. You can get a much cheaper one from ebay or even a direct adapter. USB female to female adapters are available at any hardware store and you can use the cable that came with the device with them.

The issue is the device itself that doesn't have OTG and enabling Host mode is very tricky and needs kernel hacking.

Here is how such an adapter looks: http://www.youtube.com/watch?v=6ED92orZLMM&feature=related
[Galaxy S I9000 Android Development] handarmbeinfuss:
i agree. that's why i soldered pins 4 and 5 on the extra plug together. see

http://en.wikipedia.org/wiki/USB_On-The-Go#OTG_Micro_Plugs

for a description.

just a female-female usb adapter and the original data cable of the phone won't work (or you'd have to change quite a bit of stuff in the sources as Bec07 suggested. my guess would be

drivers/usb/gadget/fsa9480_i2c.c

if anyone would like to try, but there is no need to do that, as I tried to explain in my previous post)

it may be possible that the phone can supply power. i don't know. for the time being, my device doesn't even put 5V on the vcc pin upon entering OTG mode. but as of know, this is not a priority for me. first i try to get the thing to talk to any usb device at all. and a usb hub is as good as anything else. plus it has it's own power, so i don't have to worry about that.

if anyone would like to try to get power to the port, i'd suggest looking at

drivers/regulator/max8998.c

that's the driver of the voltage regulator. maybe one can make it supply power from the battery to the usb jack as opposed to the other way around during charing. i for myself would rather not tamper with that.

as a side note, ohci-hcd causes the device to reboot, while ehci-hcd loads just fine. no usb 1.1??
[Galaxy S I9000 Android Development] Bec07:
Yon don't have these on the I9000 and you don't have the resistors:

You can solder what you want if the device doesn't have OTG support...
[Galaxy S I9000 Android Development] Bec07:
Please take a look on what the n900 guys did over here:https://garage.maemo.org/frs/?group_id=1660 (you may need an account. if you need imei to get one, I'll provide my account)

We have the linux kernel and the ARM chip in common so those patches should be very insightful
[Galaxy S I9000 Android Development] Arise:
Don't know about others but I just don't feel brave and confident enough to do more than just transplant (read copy and maybe some mass string replacement) some files from a kernel that supports OTG (like odroid) to the SGS repository and then compiling those.

I know nothing about resistors, max8998 regulator and other stuff. I can just give it a spin and see if things compile, nothing more. :)
[Galaxy S I9000 Android Development] handarmbeinfuss:
n900 vs i9000

hm. i looked through the patches they have there. they apply to the musb part of the kernel. quoting from the kconfig files:

as far as i can tell (i may be wrong) this just doesn't apply to the i9000's s5pc110. even though both are ARM chips, they are quite different members of the family. the musb code supports a dual role device that is apparently present in the n900's OMAP 3430 processor. it has its own hcd and everything. none of this is present in the i9000. doesn't really matter, though. because there is the s5pv210-hcd driver for the i9000's usb controller.

i do agree that the i9000 won't conform to the usb otg specification (doesn't have a micro usb ab jack...). but i'm not too much concerned with that. the hcd is is in there, samsung already provided a hcd-driver. i got that driver to recognice my usb port as a valid port of the hcd. and it has been demonstrated in other devices to work (odroid for instance).

if you found anything in the n900 hen patches that applies to the s5pc110 or s5pv210 which i may have overlooked, please provide me with a specific location in the sources.

thanks
[Galaxy S I9000 Android Development] 19arek93:
Maybe we just must ask for help. From Ordroid forum for example. Who knows..
[Galaxy S I9000 Android Development] Arise:
I took a look at Samsung git repository. They made some changes to the USB host/usb gadget files for the .36 branch.

http://git.kernel.org/?p=linux/kern...it;h=576acc1023a122c0d18f4c406023983d2e3b2e5c

http://git.kernel.org/?p=linux/kern...it;h=7b9875add415e8a7c9515e81c96cdac98ba6f184

Also, some time ago in the .35 branch I can see this:

http://git.kernel.org/?p=linux/kern...it;h=e44ea7ecd606861873af37a61bed525251ea4e75

Are those the sources for the SMDKV210(S5PV210 Development Kit)?

http://git.tarot.com.tw/?p=android-ctc/kernel.git;a=summary
[Galaxy S I9000 Android Development] abdroid:
I wonder if something like this might be an alternative for those of who can't solder etc.

http://www.elandigitalsystems.com/adapter/mobidapter.php

Though that means you have to pull out the micro sd card and somewhat defeats the purpose.

Been looking for their (Samsung for the Galaxy Tab) camera adapter kit to see if anyone is selling or is going to be selling it. No such luck so far. :(
[Galaxy S I9000 Android Development] Arise:
I have something like this and I can connect normal SD card instead of microSD card. The problem is you have to mod your case in order to accomodate the extra reader inside.

If this is something temporary, like you want to transfer pictures from your camera to the phone, then yes, it is a viable solution.

But here we are talking about USB Host support not microSD to SD adapters. :wallbash:
[Galaxy S I9000 Android Development] cartmanmyass:
Does anyone know if there's an Android host app (file management) would support Ext USB HDD or Ext USB Flash? Thanks.
[Galaxy S I9000 Android Development] Arise:
I've tried to connect the pins 4 & 5 right on the microUSB jack, opened a connector.

Can someone confirm, I have pins 1,3,5 on the first line and 2 & 4 pins on the above line?

Also, I've tried to insert that microUSB in the phone and nothing happens. It is not detected. Should it work out of the box (the OTG detection) or I need something in the kernel?

I'm not saying that I should see a device, but I was just hoping for a line in Logcat and nothing appeared there regarding my OTG jack.
[Galaxy S I9000 Android Development] fackamato:
You need to load the correct kernel modules
[Galaxy S I9000 Android Development] TheBeano:
If it's correctly connected you should see a line in the kernel log, which is read using the dmesg command, that says "USB OTG", like this:

<4>[172668.867401] [FSA9480] FSA9480_ProcessDevice (dev1 : 0x80, dev2 : 0x0)

<4>[172668.867419] USB OTG
[Galaxy S I9000 Android Development] Arise:
I've added some extra documents regarding the specs and datasheets about S5PV210.

http://xdaforums.com/showthread.php?p=9782879

There is a lot of interesting stuff regarding the USB host mode inside.
[Galaxy S I9000 Android Development] Arise:
Ok, so I've managed to install most of the tools and got some reading at the dmesg logs.

<4>[ 8681.804081] fsa9480_interrupt
<4>[ 8681.804398] [FSA9480] FSA9480_ReadIntRegister
<6>[ 8681.837806] ldo38_control : turn ON LDO3 and LDO8 (cur_stat=0, req=1)
<4>[ 8681.837980] [otg_clock_enable] clk_enable(otg_clock) OK.
<4>[ 8681.848727] [FSA9480] FSA9480_ProcessDevice (dev1 : 0x80, dev2 : 0x0)
<4>[ 8681.849042] USB OTG

But what I'm finding strange is that I get this message just for shortening the pins.

As soon as I stick my cable in the phone (but without the pheriperals like an USB stick or a mouse, just the plain cable) the above log message appears.
[Galaxy S I9000 Android Development] TheBeano:
Yes this is just the USB port switching chip FSA9480 responding to the shorted pins in the plug, see fsa9480_i2c.c in the kernel source.
[Galaxy S I9000 Android Development] 19arek93:
just bumping
[Galaxy S I9000 Android Development] ruspa:
bump again, this should work for gtab as well. don't let all their effort die :D
[Galaxy S I9000 Android Development] lycan_codex:
Check this device....its called an apad...it runs android 2.2 and supports USB OTG

http://cgi.ebay.in/ws/eBayISAPI.dll?ViewItem&item=150536409805
[Galaxy S I9000 Android Development] Arise:
It's a Freescale CPU, it doesn't help much... we need something from Samsung at least. :)
[Galaxy S I9000 Android Development] mazodude:
why not forget the power requirements and get a powered usb hub?
[Galaxy S I9000 Android Development] Arise:
The "power requirements" are something important for most people. We can't talk about real USB host support if we are dependent on a powered hub.

But, so far all development assume we should use a powered hub anyway for starting. So the first step would be to enable OTG detection, loading the required modules, mounting the usb stick or detecting the other usb pheripheral, and finally if we succeed we can think about powering the pheriperal right from the phone.

I'm not a noob when it comes kernel developing, but not a pro either, and right now I'm working on the battery driver from Galaxy S, I want to enable:

/sys/class/power_supply/battery/batt_chg_current

So this functionality should wait a couple of days more... until I'll be able to take a look at it. Maybe someone else could show more interest into this project and start working on it also.
[Galaxy S I9000 Android Development] Alex71710:
tombom.co.uk/blog/?p=124

Maybe it will help somehow...
[Galaxy S I9000 Android Development] magurin:
DELETE this entry thanks
[Galaxy S I9000 Android Development] Ticiano:
What about taking 500Gb of music in a hard drive with you when you travel?
[Galaxy S I9000 Android Development] fackamato:
And powering it how? A battery pack?
[Galaxy S I9000 Android Development] Ticiano:
Well, just plug the wall charger and play the music. :)

I think it would be nice. I'm going to a new year's party at a friend's house in a distant beach and I think something like this would help... My phone and it's wall charger will be with me anyway... the only extra think to carry would be a little 2,5" HDD... :D
[Galaxy S I9000 Android Development] SamHaLeKe:
This could be something for the 7 Samurai (and co) aka Cyanogen, Sztupy, Supercurio, Neldar, Hardcore, Chainfire, Raspdeep (and co),

External HDD or USB Disk connected to our SGS would be realy something!
[Galaxy S I9000 Android Development] fackamato:
What is going to power the HDD? The phone doesn't have power on the USB port AFAIK.
[Galaxy S I9000 Android Development] BronzedDroid:
If it's true that the phone has USB host capabilities, then it can also power whatever it is host for.
[Galaxy S I9000 Android Development] fackamato:
Ok, so 500ma then which is the standard for PC USB host ports?

Sweet. Then we can connect 2.5" portable HDDs without issues.
[Galaxy S I9000 Android Development] guibao:
Standard PC ports usually have 500 mA of supply. Take a look at the USB hubs on your device manager.

And NO you can't connect them without issues. I guess if you go over 80 or 100gb (older disks) you gotta hookup an external psu. Maybe for 'greener', newer disks you can go a liltle higher, but we'll never be able to reach the top, like 1.5Tb disks.

I've seen Dell Laptops going BSOD when on running battery cause of external HDDs that drew too many amps (the ones with 2 usb plugs and no psu). Remember, HDs have a PCB, moving heads and spinning disks. Our batteries won't last much.

Also, would one carry an external 2.5" hdd that is bigger than the SGS?

For what? Movies?

Maybe this is a good idea for regular usb flash drives.
[Galaxy S I9000 Android Development] Arise:
What we need are those modules (or something equivalent):

insmod drivers/usb/core/usbcore.ko

insmod drivers/usb/host/ehci-hcd.ko

insmod drivers/usb/storage/usb-storage.ko

mount -t vfat /dev/block/sda1 /mnt/sdcard/usb-storage

Building the modules is not hard, but geting some modules that works is not that easy. :)
[Galaxy S I9000 Android Development] magurin:
Delete post
[Galaxy S I9000 Android Development] coooolboyz:
Wow!! I didn't know this picked up so much heat. I was totally out of XDA for some time now. Anyway - my $.02:-

I got a USB OTG cable - (4th and 5th pins shorted) and when I connect this - there are syslog entries that refers to USB_OTG. So the board is recognizing this. For more proof you can also check this (check the first line in the table).

Thus USB OTG is supported at the hardware level and the interrupts are also being caught by SGS. But whatever is supposed to happen next - that is not being handled currently.

You can get these cables for $8 from eBay. Its the same that was used for Nexus USB Host (Note - USB Host != USB OTG, coz USB Host needs external power supply).

Normal cables - by changing male/female or by any other hacks do not work - you need the 4th and 5th pins to be shorted.

I hope this helps.
[Galaxy S I9000 Android Development] ragin:
I was using an external HDD Jacket that had a Y shaped cable. If something could be made for SGS, it could draw power for the HDD from a PC & have a data connection to the SGS. Maybe even supply power to SGS as well. Just a thought.
[Galaxy S I9000 Android Development] Mumps:
Maybe try to sort out if it's possible to *see* data from powered USB drives (it is, the 3.5" ones) before going into further developing to find out if the power can be drawn from the microUSB port in the SGS?

Just my thoughts here, yes it would be sweet to use 2.5" without a power line but with the prices of those you can buy twice the space in 3.5" and nowadays it's hard not to have line close :p
[Galaxy S I9000 Android Development] ragin:
I purchased the whole JIG for $6 INR.
[Galaxy S I9000 Android Development] hamedpc007:
i really interested in enabling USB OTG / HOST . please go on! I'm not experienced in linux kernel so cant help but I say you : good luck
[Galaxy S I9000 Android Development] Rahulrulez:
Useless, instead develope something in usb flash drives.. more useful :-D ;-)
[Galaxy S I9000 Android Development] vinceyeung:
really interested in this topic!! i want USB-OTG and RMVB hardware-decode player to be supported by SGS!!
[Galaxy S I9000 Android Development] SamHaLeKe:
That would be usefull to!
[Galaxy S I9000 Android Development] 19arek93:
Go on superheroes! ;)
[Galaxy S I9000 Android Development] ragin:
This thread started on 24th June 2010, at 04:40 AM my time.
[Galaxy S I9000 Android Development] rezam:
Isn't there any good news about this project ?
[Galaxy S I9000 Android Development] magurin:
Sven has try with a Galaxy another Host Driver :)

h t t p : / / sven.killig.de/android/Galaxy/
[Galaxy S I9000 Android Development] vinceyeung:
I support this as well...so i can use my microUSB male to USB female cable
[Galaxy S I9000 Android Development] 19arek93:
Nexus S have got working USB Host?
[Galaxy S I9000 Android Development] BartT-GSM:
Not yet :( http://xdaforums.com/showthread.php?t=885837
[Galaxy S I9000 Android Development] 19arek93:
dead point.. few months and nothing
[Galaxy S I9000 Android Development] AllGamer:
we are lacking DEVs in the Nexus S for this kind of ports.

it is working already on Nexus One and few other devices, we just need a linux guru to port it over to Nexus S
[Galaxy S I9000 Android Development] SamHaLeKe:
Any one you know to contact? Supercurio, CyanogenMod? When allready working on other devices it should be...
[Galaxy S I9000 Android Development] Arise:
The changes are not that hard, I think any modder with some experience could try it.

I kinda feel sorry I can't try this myself, but I get somehow disapointed when I see the changes I have to implement, the frequent change in the source code and new releases.

The best bet would be to start working on some JPX sources... maybe voodoo.
[Galaxy S I9000 Android Development] 2k4ever:
hopefully someone tries it

i would love the possibility to copy data to / from the phone by using a usb stick
[Galaxy S I9000 Android Development] layercake87:
whoever get this working will be donated by me :)
[Galaxy S I9000 Android Development] glukosio:
I think is not very possible, becouse the harddrive wants 5v of energy for working, but our phone has only 3v...

But we can open usb cable and connect first pin to computer, or small battery.
[Galaxy S I9000 Android Development] Shammyh:
http://www.amazon.com/CyberPower-Mobile-Battery-Powered-CP-H420MP/dp/B0002UQALQ

Something like this might provide the solution to the "we can't provide +5V of power to USB". Imagine carrying that around and a portable 500GB hard drive? Sounds pretty feasible to me...
[Galaxy S I9000 Android Development] glukosio:
I have usb hub at home but the hard drive doesn't work if I connect the usb flash too
[Galaxy S I9000 Android Development] brunes:
Yes whatever device you use will either have to have it's own power or have it supplied externally from a cable like this
[Galaxy S I9000 Android Development] Shammyh:
A powered USB hub like the one I posted? That one has internal AA batteries to provide power.
[Galaxy S I9000 Android Development] rezam:
Some Android tablet pc with 2.1 or 2.2 are support USB flash memory ( It called UDISK in android ). That means android os is able to be a host for USB cool disks and ...

just need some seroius works for this revolution
[Galaxy S I9000 Android Development] glukosio:
No, I have one normal, without batteries,
[Galaxy S I9000 Android Development] Buddha:
thanks for the info!

will give a try :D
[Galaxy S I9000 Android Development] PhoenixFx:
This is a great feature to have (like in Nokia N8). Forget about hard disks, this is more useful for USB flash drives and SD cards (with USB adaptors). If someone wants to use a HDD thats fine too, they can use an external power source, but I see lot of practical use for this when USB flash drives and SD cards are concerned.

for example many ppl these days carry flash drives in their key rings, so it is very convenient to have the ability to access and transfer that information anywhere instantly without needing a PC. Like if you want to copy a file or a document from a friend, transfer music files between MP3s players or even with other phones (BT can be painfully slow for large number of files), backup images to another storage when you run out of memory in your digital camera, take high quality photos from your DSLR and email them instantly, etc.. applications are endless.
[Galaxy S I9000 Android Development] brunes:
Even a flash drive needs 500ma power. You won't be using a flash drive with this without an external power adapter.
[Galaxy S I9000 Android Development] 2k4ever:
are you sure of that? i'm surely no expert, but afaik flash drives normally take less then 200ma

because i think PhoenixFx is right, thats exactly why i'd want to have this feature
[Galaxy S I9000 Android Development] sideeffects:
According to Imation in regards to their flash sticks.

"The current power draw at idle state is about 95 mA (milliamps) for a 2GB drive. The current power draw during read/write is about 145 mA."

http://www.imation.com/en-us/Support/Product-Support/Product-FAQ/USB-Flash-Drives-Support/
[Galaxy S I9000 Android Development] magurin:
Cyanogenmod tiket for Usb Host and more info. Interesting.

http://code.google.com/p/cyanogenmo...ty Version Model Owner Summary Stars Modified

Current USB-Host post Related.

USB Host mode for Desire - > http://xdaforums.com/showthread.php?t=702742

[Guide] USB Host Enabled Kernel for the G1/Dream -> http://xdaforums.com/showthread.php?t=794643

Sven Nexus One -> http://sven.killig.de/android/N1/2.2/usb_host/

Sven Samsung Galaxy Files -> http://sven.killig.de/android/Galaxy/

Sven Kernel Sources Support Qualcomm MSM7201/QSD8X50 on-chip EHCI USB controller -> https://github.com/sonic74

ZTE Blade Usb Host Enabled -> http://sven.killig.de/android/Blade/usb_host/

UsbHost on Increible -> http://xdaforums.com/showthread.php?t=751535
[Galaxy S I9000 Android Development] NightSky256:
500ma is the usb standard specifications max power output of a PC Usb port to be certified Usb compliant.

However any pc has an higher power limitation on usb ports.

USB devices, to be usb compliant should not use more than 500ma power. Some devices, like portable hard drives, drain more than 500ma, and to be USB compliant they should have a dual usb cable, or a power adapter sell with the disk, also if the most pc arround the world will spin the disk also connecting only one usb port.

Portable usb sticks usualy don't get more than 150ma.
[Galaxy S I9000 Android Development] brunes:
200ma is still more than 0.... people seem to be missing the fact that from all accounts the port is TOTALLY unpowered. Just like the Nexus One USB OTG, you will HAVE to have a powered hub or other power source. Other than that, this work is already done. Just build the kernel modules for your kernel like in the Nexus One post earlier, and it will work - it's a basic linux function.

I just don't see any use for it myself..