yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] palimpa:
Many Android 4.2.1 ROMs already have a kernel with USB host support so that there is no need for additional patches. To check, if your kernel has USB host support, you could install the app USB Host Controller, then go to Info and check if the S3C USB Host driver is found (please see screenshot). If your kernel does not have USB host support, you could flash a kernel with USB host support for your ROM.
[Galaxy S I9000 Android Development] jupiter5700:
Hi al! I try to connect usb devices to my i9000 but not success. HellyBean 4.2.2. Look at screenshot, please. What is mean "Root hub is not present" message? What can i do?
[Galaxy S I9000 Android Development] nommy:
You are in client mode. Go to settings page and change operation mode and default operation mode to OTG mode.

USB-Host mode is definitely working on SGS with HellyBean 4.2.2.
[Galaxy S I9000 Android Development] jupiter5700:
Okay, i tryed autohost mode and message turn to "Root hub is present." I see my mouse ID in USB window, but mouse is not active... No arrow visible.
[Galaxy S I9000 Android Development] nommy:
Sounds good, so far. Your USB-host is working. I'm sorry, that I can't help with your mouse. I never connected a mouse to my SGS. Maybe a missing driver. USB HDDs and USB sticks are working fine. Even my Canon dslr is working great with Chainfire's dslr-controller app.
[Galaxy S I9000 Android Development] palimpa:
The USB of SGS i9000 does not output voltage 5V. If you use a optical mouse, you need a external power supply and a USB Y-cable so that the mouse gets voltage 5V. Then it will work. In some cases it helps to reboot the SGS after everything is connected to see the arrow.
[Galaxy S I9000 Android Development] jupiter5700:
All yesterday evening i tryed to connect USB devices to my i9000. I tryed two mouses, gamepad and external hgg 500Gb capacity. Ofcourse I have an external 5v powwer supplay for my OTG cable. Succes is not full. All of this devices are correctly definded in USB tab of USB host controller application. But every of them not working properly. No mouse pointer. No reaction on gamepag keys pressed. No hdd mount. I try also latest semaphore kernel, latest mackey rom and mackey kernel, but no succes. I'm disappointed. May be in current 4.2.2 roms is not usb devices support, is'nt it?
[Galaxy S I9000 Android Development] palimpa:
I have not tried current 4.2.2 roms but a lot of 4.2.2 roms. Mackay 4.2.2 roms 2 or 3 months ago and some other 4.2.2 roms and I never had a problem using my USB optical mouse. Have you checked, if the Y-cable and power supply is really ok? I cannot imagine other reasons that it does not work with 4.2.2 roms. Have you tried, only to connect 1 device at the same time? Maybe your power supply does not have enough power for several devices at the same time. Do you use a (active) USB Hub or a Y-cable and power supply? I only have used a Y-cable and power supply for 1 device and it has worked with all 4.2.2 roms I tried (often mackay roms with standard kernel).
[Galaxy S I9000 Android Development] jupiter5700:
Thank you for reply. I use handmaded cable by me. Power supply is good. 5V, 2A max power. Mouse bottom is shining by red led, phone is charging, mouse ID appear in USB hub controller, but no mouse pointer visible and no reaction on mouse click. I will try again this evening.

May be power line need to be cut from phone? I will try it too.

Please do not use overquotind.
[Galaxy S I9000 Android Development] Bejda:
And about kernel modules? (Maybe I didn't see one of you talking about this though..)

Mouse support has to be loaded from semaphore manager for instance,could be:

insmod /system/lib/modules/mousedev.ko

..for others...
[Galaxy S I9000 Android Development] jupiter5700:
Yes, mousedev.ko is present in lib directory. I.e. i must use command "insmod" in terminal to activate mouse driver?
[Galaxy S I9000 Android Development] Bejda:
Yeah,that's how it seems to be on Mackay at least (got to be loaded,type su and <enter> first).

And "lsmod" command (only this,no need for su here) will gives you list of presently actives modules.

I think it won't survive a reboot but it will if using semaphore and loaded from within semaphore manager.

On Mackay/another kernel you could make an init.d script named,let's say,10mouse with the "insmod" command wrote on it and push it to system/etc/init.d folder for it persists(better say get reloaded) at each boot.
[Galaxy S I9000 Android Development] jupiter5700:
Thank you very much, Bejda! Now all my devices are working with my i9000 perfectly! It's amazing!

First of all i'm flashed Semaphore kernel on MacKey rom. Go in to semaphore manager and turn mouse on. But still no reaction. No mouse pointer. I go to android terminal and type SU, then lsmod, see that mouse.ko is active. Then i has stopped trying mouse connect and try to connect USB SD-MMC cardreader. Reset SGS, and it mounted at the end! All data from cardreader are available.

Then i tryed to connect gamepad. Still no reaction, only ID in USP tab of USB host controller app. I went to system/lib/modules directory and examined all modules. I saw two interesting modules namely joydev.ko and usbhid.ko. Then i activated joydev.ko by insmod command in terminal still no reaction. But when i activated usbhid.ko, then gamepad works correctly!:good: After that i connected my optical mouse to i9000 and saw mouse pointer at all! And mouse works perfectly!:)

Finally i connect my 500Gb external HDD, but no succes in mounting by USB host controller app most probably due to NTFS format. Then i deep search info about NTFS on android and download some utilities. One of them - ParagonNTFS is correctly mount HDD to i9000! It free on android market! LINK HERE

Mounting NTFS volume by USB OTG on SGS i9000 is real !:fingers-crossed:

This video is demonstrated how it work.

[YOUTUBE]DkZYIHUWmhE[/YOUTUBE]
[Galaxy S I9000 Android Development] shubhkirtisharma:
Pen Drive Support or Not

Does it support Pen drives???
[Galaxy S I9000 Android Development] jupiter5700:
Yes, it does. External power supply required.
[Galaxy S I9000 Android Development] carpler:
Hi!

I'm were because I try to make the USB OTG feature work on my Galaxy S with CaynogenMod 10.2 and Semaphore kernel 3.3.0.

I try to connect to the phone a USB DAC (the Fiio E18) that doesn't requires power from the phone (it works with an internal battery).

The Semaphore claims to include the drivers for this feature, I've also activated with the Semaphore manager, but nothing happen.

I try to use the USB Host Controller app, but when I start the app it hangs on "Please wait..." and nothing happens.

So someone can help? There is something I can do to make my GS able to recognized my USB DAC and work with it?
[Galaxy S I9000 Android Development] carpler:
An update.

I was able to make Usb Host Controller to work. The app start, I can set USB host mode, but nothing change.

I'm missing some module that supports an USB audio device?

I've no idea...

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
[Galaxy S I9000 Android Development] iluha_ua:
Also thought about using my e-mu 0404 usb as audio interface.

I think that corresponding audio driver needed from linux and even when you have one - you need to change default audio device.
[Galaxy S I9000 Android Development] Warren_Orange:
Hi.

I am trying to get this to work on a Nexus S but need some help.

I have a Y-Cable lying around but I am not sure if its the right one. I am currently using CM11 with Devil Kernel. I take it this kernel won't work?

What I am having trouble getting my head around is the USB powered hub. If I just wanted to connect a pen drive to my Nexus S so I connected one full size USB to the OTG cable and another full size USB to a battery pack and the mini USB (via a converter) to the pen drive - would this work?

Cheers.
[Galaxy S I9000 Android Development] CatalystWon:
Just for clarification with Semaphore kernel & CM 10.2.1, when connecting via OTG cable to a USB flash drive or printer, a

Powered

USB HUB is

ALWAYS

required?

Thanks!
[Galaxy S I9000 Android Development] jupiter5700:
Yes. Power cable is required to USB flash drive. But with some devices is possible work without power cable. Photo cameras for example.
[Galaxy S I9000 Android Development] CatalystWon:
Thanks.

Is a powered USB Hub required for connecting OTG cable to HP Laserjet printer?
[Galaxy S I9000 Android Development] jupiter5700:
It is depend from your printer, may be printer checking connection by power signal, but may be not.

First of all - where are you get android driver for your HP Laser Jet printer?
[Galaxy S I9000 Android Development] CatalystWon:
It is an older HP LaserJet 5100. I would assume it has power in the USB cable. USB Host Controller (v.0.44) recognizes the OTG cable but does not recognize any attached devices.

Has anyone been able to recognize any USB devices from i9000 via OTG cable without powered USB Hub? I am asking because my cable is new and I want to make sure it is not defective.

Thanks.
[Galaxy S I9000 Android Development] vborovic:
Could anyone help me out with this, I could really use OTG support on my i9000, it is currently running CM 10.2 ... the only source for the files is the github's repository, but I don't know what to do with it all
[Galaxy S I9000 Android Development] jupiter5700:
For what are you need OTG on i9000?
[Galaxy S I9000 Android Development] vborovic:
I'd like to connect a USB stick on it, and hopefully an external digitizer screen (I believe it is USB 1.0, but I'd like to try it out anyhow) ... I have a powered microUSB HUB already which should be in working condition (tested on other, newer Android devices)
[Galaxy S I9000 Android Development] jupiter5700:
USB stick is a real to work. You are need to install DomnesuKernel on your rom, download and install this apps LINK, then follow this video

[YOUTUBE]BfGCql6d87A[/YOUTUBE]
[Galaxy S I9000 Android Development] vborovic:
Thanks, will try it later on and let you know the result
[Galaxy S I9000 Android Development] vborovic:
The kernel has been installed, everything seems ok (by the app status, like in the above video: OTG mode etc.), but the Galaxy doesn't see the external HDD (provided it with the external power, HDD spinning of course) ... what now? Try another compatible kernel (supposedly there are a few more available)?
[Galaxy S I9000 Android Development] jupiter5700:
DomnesuKernel is 100% compatible with OTG. I checked it by myself. External HDD often required +5V on USB connector even if HDD has external power, check it. What the file system HDD have?
[Galaxy S I9000 Android Development] vborovic:
I've tried with two HDDs, one is FAT32 the other is NTFS ... both are working properly when connected to a PC
[Galaxy S I9000 Android Development] jupiter5700:
Are one of your's hdds is visible in USB tab of USBHostController app? Like on 3min 27sec of the video?
[Galaxy S I9000 Android Development] vborovic:
Sadly, no, they aren't ... I've tried with the OTG cable, which gets properly detected ... I've also tried using Acasis's micro USB hub, it is detected as a regular cable
[Galaxy S I9000 Android Development] jupiter5700:
Reason is lack of +5V voltage on USB connector of HDD. Fix it. You need take Y usb cable like on the video to power supply and all be working without usb-hub.
[Galaxy S I9000 Android Development] vborovic:
I have a HDD enclosure that has a twin usb cable, one is data/power, the other is only power ... this is also a type of Y connector
[Galaxy S I9000 Android Development] jupiter5700:
Okay. Connect only power connector to USB charger or to working computer, data/power to i9000

through USB-OTG cable and third connector plug to HDD. All will be work properly.
[Galaxy S I9000 Android Development] karlak123:
Hey, this look amazing !

But all the links are dead, can someone please upload again the custom kernel v5 for the galaxy S (I9000) ?

Thanks
[Galaxy S I9000 Android Development] jupiter5700:
For what are you need this old kernel? Many more modern kernels support USB-OTG like MackayKernel, DomnesuKernel or Semaphore...
[Galaxy S I9000 Android Development] siky_dude:
Is there a chance that this will work without having an external power source?

Maybe. In theory the S3C controller has the appropriate functionality, but in practice it might not work (for example there might be missing connections inside the PCB, etc.)
[Galaxy S I9000 Android Development] jamesd256:
OK, I'm confused now - in your original series of posts you said that you need an OTG cable, but isn't that what an OTG cable is when you ground pin 4? Could you or someone perhaps explain briefly what a 'simple' inverted cable means?

Or could someone point to a definitive reference for how we can butcher a cable. I am definitely going down the carve->solder->glue gun route, because I'm cheap.

I can't wait to try this with my wireless USB set!
[Galaxy S I9000 Android Development] iJimaniac:
Hey, I have a Samsung galaxy player 4.0; essentially the GT-I9000 without the phone part! How hard would it be for someone (me) with no developing experience to port this to the player? Could someone give me instructions on how to get started?
[Galaxy S I9000 Android Development] sztupy:
It means you simply chop of one end of a male USB-A - male micro-USB connector and solder a female USB-A connector on the chopped end. You get a female USB-A - male micro-USB connector just like any OTG cables, but _without_ the pins 4-5 shorted. This way it's not a "real" OTG cable, as it lacks this shorting, but that's only used for auto-detection anyway. My kernel code has features for this types of cheap, homemade cables, but they won't work on devices with "real" OTG support, as they depend on the autodetect functionality.
[Galaxy S I9000 Android Development] jamesd256:
I have been waiting for a way to record high quality stereo sound into a smartphone for years - could this be it?

Let's say you could enumerate a USB 2.0 audio interface via this kernel that had linux drivers available. Would it then be possible to access this device via the NDK or SDK?

---------- Post added at 11:57 PM ---------- Previous post was at 11:50 PM ----------

Thanks for the explanation. I was hoping that's what you meant. Awesome that you could do that in your code. You don't really need to butcher anything then - if you're going into a powered hub that takes a USB-A male like the guy in this post:

http://xdaforums.com/showpost.php?p=21506958&postcount=21

Edit:

Shouldn't it be made clearer in the FAQ that a client cable is possible? I also note you state an OTG cable is required in your youtube video. Seems a shame, as it makes it more accessable that you can use a non OTG cable.
[Galaxy S I9000 Android Development] sztupy:
I definitely want to make a Nexus S port, but for that I need help from people, and probably also from some kernel/ROM developers mainly doing CM9/ICS work. (I don't yet want to port the stuff back to CM7/stock Gingerbread).

The captivate build was easy to make (although I still don't know whether it works or not), mainly because it shares code with teamhacksung's SGS CM9 build for which this kernel first appeared.

Whether self-powering will work or not is a grey zone. One thing is sure: it doesn't work yet. It can also happen that it works on some brands and not on others (for example it will work on a NS but not on an SGS, etc.)

My current priority is to get USB 1.x devices working, so keyboards, mice, game controllers, midi controllers, etc. should work too. After that comes stability, which the first release really lacks. And external power is the last in line (as it might be the hardest to solve... but I actually hope I'm mistaken here)
[Galaxy S I9000 Android Development] sztupy:
If not from the SDK or NDK, you could still write native linux code to access the external sound card, and run your application as root (like the mounting of external storage devices is done in UHC at the moment). I don't know if there are any usb sound card drivers for ARM in the linux kernel though.
[Galaxy S I9000 Android Development] AdamOutler:
have you got a uart setup? 619k between usb 4-5 d+and d- function as tx and rx... you can debug from within the SBL> prompt and turn on the power manually.
[Galaxy S I9000 Android Development] sztupy:
Haven't used a serial console on the phone. What's the easiest way to get / create a cable where pins 4-5 have a 619k resistance?

I saw this one here: http://attachments.xda-developers.com/attachment.php?attachmentid=443036&d=1289991784 which seems to be nice, though the best I thing I could find in the local store is a miniusb-microusb converter, where I could solder some wires to the miniusb part (as it's a bit easier to handle than a microusb). Not sure whether it has all 5 pins connected though.

Could you also direct me to a link where I could find more about SBL commands that can be used in a serial console? Thanks!
[Galaxy S I9000 Android Development] smicbee:
omg... this is so cool.

can someone port it for:

SemaphoreJVX2.0.0 - Kernel??

=)
[Galaxy S I9000 Android Development] ngenhit:
Use JVU . :-\ . Stratosk already posted 2.6.0beta .
[Galaxy S I9000 Android Development] sztupy:
Here is the link: http://xdaforums.com/showpost.php?p=21552489&postcount=6742
[Galaxy S I9000 Android Development] gandrik:
Thank you for make it USB OTG driver for us.
[Galaxy S I9000 Android Development] coooolboyz:
Hmmm the board's manual raises the hope by a lot regarding the phone's ability to power connected peripherals! I'm sorry - but I've to say this again, but it will be just plain amazing to get this working without external power!! :D

And let me say this what I've screamed in my head a hundred times - sztupy, this work which you have done so far is abso-f***ing-lutely spell bounding!!

I guess your priorities are as the following now:-

1. Get USB 1.x get working

2. Get NTFS working

...

...

...

n. Get self powered OTG working

Hopefully this will go in to CM9 tree - from where this will remain to be a part of all CM9 based kernels!!!

Once again - astounding work!! Take a million bows from me!
[Galaxy S I9000 Android Development] tiuk:
I've flashed the kernel on my captivate but don't have an otg cable to test with, hoping to try it tonight or tomorrow.

Sent from Captivate, teamhacksung ICS.
[Galaxy S I9000 Android Development] Unrealwolf:
Great work, sztupy! Hope that you'll find a way to squeeze some power from SGS.

My setup (the same OTG cable that i bought for HP Touchpad (SGS2 one, i suppose), $12 chinese external 2400 mah battery charger, triple male USB-Y cable, female-to-female USB thing) works, 16gb flash card is visible, mountable, readable. Cyrillic file and folder names are all ???????????, but that's OK.
[Galaxy S I9000 Android Development] sztupy:
Well, it did boot at least. That's good to hear.
[Galaxy S I9000 Android Development] bhu1:
This is cool....revolution....samsung really should start utilizing the hardware.
[Galaxy S I9000 Android Development] Tatsuya79:
You can't really do that when you're releasing 50 phone variation a day. :D
[Galaxy S I9000 Android Development] marcedli:
samsung really should employ a developer like sztupy or himself

;)

icecreamed - tapatalked
[Galaxy S I9000 Android Development] sztupy:
Ah, managed to find a vendor who sells micro-usb B male connectors. Also asked a friend to create a stable PCB for it. Should arrive monday.
[Galaxy S I9000 Android Development] Chainfire:
Just FYI, I couldn't get the modified JVU kernel to work in OTG mode. Will now proceed and test with CM9/sztupy kernel.
[Galaxy S I9000 Android Development] sztupy:
What was missing? dmesg and the output of the "/sys/platform/devices/s3c-usbgadget/opmode" file should spill out a lot of things.
[Galaxy S I9000 Android Development] Chainfire:
Flashing to your version now, so can't tell you. What I can tell you is that your app reported that the driver was present and loaded, but didn't seem to detect my OTG cable (not 100% sure on that). Also, /dev/bus/usb wasn't present.
[Galaxy S I9000 Android Development] Chainfire:
Ok, so I flashed the recommended CM9 version and your kernel.

- dmesg.pre.txt

- Connect some cameras and some USB sticks to my powered USB hub

- Connect the USB hub to the OTG cable

- UHC: Set "operation mode" to OTG

- Connect the OTG cable to the device

- dmesg.post.txt

- devbususb.txt

- usbgadget.opmode.txt

- UHC: info --> refresh --> Root hub found!

- UHC: usb --> refresh --> no devices listed at all (not even the hub)

- ... after a few minutes auto reboot ... ?
[Galaxy S I9000 Android Development] Chainfire:
Ok, using a different powered USB hub seems to work. I'm not surprised not all hubs work, but this is surprising because the hub I used from the start I have previously used with other phones and worked fine.

DSLR Controller isn't working at the moment, trying to figure out why.

-----

EDIT: Ok, DSLR Controller is working after some modifications.

Android USB host API's (java) do not seem to work with the USB host patch. My native code workaround does work ... which is actually based on that code. This should be fixed somehow.
[Galaxy S I9000 Android Development] sztupy:
You sure it is an USB 2.0 hub? All USB 1.x FS/LS devices (hub, hid device, midi converter, serial converter) _will_ break the phone, and will restart it eventually. I don't know why but I start to think that it's unfortunately a hardware issue, and cannot be resolved. (The host controller doesn't have a companion controller, the root hub doesn't have a transaction translator, and the host controller it doesn't even respond to split transactions. Only one is needed from the previous 3 to get FS/LS devices to work, but it seems none of them does...)

All USB 2.0 HS devices should work fine though.

Ueventd doesn't work that's for sure, I haven't ported that code from the SGS2 implementation yet. It's still on my list. (Usb Host Controller reads the appropriate major/minor number from sysfs and create the appropriate block device in /dev by hand for mass storage devices, so it doesn't need ueventd support)

There is also no usbfs support built in the kernel as that is considered deprecated since linux 3.0.
[Galaxy S I9000 Android Development] sztupy:
It's probably because of no usbfs suport and no ueventd code. I haven't looked at the official usb implementation (eg. what kernel stuff they use), but with /sysfs and mknod everything can be made working. I will port the SGS2 ueventd support eventually, that should probably fix the issues.
[Galaxy S I9000 Android Development] Chainfire:
Well tbh I'm not sure. I do know that I've used that specific hub at 2.0 speeds ...
[Galaxy S I9000 Android Development] sztupy:
I do have an USB hub that connects at full-speed to the computer but switches to high-speed after a HS device is connected to the hub. Now this type of hub will definitely not work.
[Galaxy S I9000 Android Development] AdamOutler:
different USB specs pull high or low on the d+ and D- lines. Its likely a power issue. Its also likely to be resolved via fsa registers
[Galaxy S I9000 Android Development] sztupy:
I doubt this: All HS usb devices should first connect as FS devices, and it works. Detecting whether the device is FS or LS also work (so it definitely knows whether the D+ or D- pin is down). Besides if you connect the FS/LS device to a hub, the hub's TT will convert it to USB 2 signal (using split transactions). And it also works on the SGT, where there is also no power supply to downstream ports.
[Galaxy S I9000 Android Development] jamesd256:
Aha, look who's here :)

I guess this means we'll be finding out soon if DSLR remote works...unless you already found out.

Once it's confirmed working, I will be another customer for sure.
[Galaxy S I9000 Android Development] sztupy:
Got this recently:
[Galaxy S I9000 Android Development] Chainfire:
That is misleading - it does NOT work with ICS on the SGS.

(It probably does work on the JVU version, though, have not re-tested since I've switched hubs, I'm still trying to fix the ICS issue)
[Galaxy S I9000 Android Development] jamesd256:
Thanks man. When payday comes, I'm gonna buy you a beer or two. We'll you'll probably spend it on a cable for the serial console :)