FORUMS
Remove All Ads from XDA

[KERNEL][ICS-CM9] USB Host mode (OTG) driver for Captivate [BUILD 5]

1,061 posts
Thanks Meter: 877
 
Post Reply Email Thread
USB Host mode driver for Samsung Captivate

Also available on the Samsung Galaxy S and Nexus S

(main post and more info at the SGS dev site)


Disclaimer: This kernel will enable some very early, and rough usb OTG support for your phone. Currently the phone DOES NOT give out power, so you NEED an external power source to be able to use this kernel. This is true for ALL USB devices, even with those that have their own power source, and doesn't requre external bus powering. Solving this limitation is a TODO, but we cannot guarantee anything. There are some other phones that have usb host support the same way this kernel has (eg. they need external power), like the Nexus One, and there is also a community using this, so if you're saying that usb host support has no sense if you need an external power source then you are definitely mistaken.

This kernel is built upon teamhacksung's ICS Build 14 kernel, and will only work with that particular ROM (and possibly later versions of it). It is possible to port this to older ROMs (like CM7, or stock Gingerbread). Ask your favourite kernel developer to do this for you.

Credits goes to:
  • The misterious guy at Samsung(?) called chul2 for the original s3c host drivers
  • Kevin Hester (kevinh, probably also nicknamed geeksville, punkgeek and humcycles) for fixing the s3c host driver for the Samsung Galaxy Tab
  • Ever kernel developer at teamhacksung for bringing ICS goodness to Galaxy S

This is a very early, and very rough usb host support. Expect crashes, freezes and things that are not working! You will also need external power (probably through a Y-cable or a powered usb hub, see the device connection guide below). Also make sure you are only using USB 2.0 (high-speed) devices. The driver does has some quirks with USB 1.x low-speed and full-speed devices, like mice, keyboards and similar things. Read the FAQ for more information about them. And of course it doesn't work with USB 3.0 (super-speed) devices.

Device connection guide:


FAQ: see post 2 at SGS
ChangeLog: see post 3 at SGS
Developer notes: see post 4 at SGS
Download links: see post 6 at SGS

Usb Host Controller: see it's own topic
Attached Thumbnails
Click image for larger version

Name:	usbhost_2.jpg
Views:	53688
Size:	44.8 KB
ID:	866485  
The Following 15 Users Say Thank You to sztupy For This Useful Post: [ View ] Gift sztupy Ad-Free
 
 
19th January 2012, 08:27 PM |#2  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 877
 
Donate to Me
More
New member dim319 tested it, and said it's working:

Attached Thumbnails
Click image for larger version

Name:	captivateotg.jpg
Views:	12928
Size:	91.6 KB
ID:	863554  
The Following 2 Users Say Thank You to sztupy For This Useful Post: [ View ] Gift sztupy Ad-Free
19th January 2012, 11:09 PM |#3  
jerkysh's Avatar
Senior Member
Flag Chisinau
Thanks Meter: 180
 
More
awesome ,dude
i saw this coming , really nice feature!
19th January 2012, 11:44 PM |#4  
Senior Member
Thanks Meter: 36
 
More
Nice work!
21st January 2012, 08:49 AM |#5  
Member
Thanks Meter: 0
 
More
Where is the download link? Can't find it looked everywhere.

Sent from my SGH-I897 using XDA App
21st January 2012, 02:00 PM |#6  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 877
 
Donate to Me
More
Quote:
Originally Posted by FireFriend

Where is the download link? Can't find it looked everywhere.

Sent from my SGH-I897 using XDA App

Fixed the links
21st January 2012, 09:01 PM |#7  
Member
Thanks Meter: 0
 
More
Awesome thanks you I'll let you know if it works.

Cheers Mate.

Sent from my SGH-I897 using XDA App
22nd January 2012, 07:21 AM |#9  
RockRatt's Avatar
Senior Member
Thanks Meter: 3,728
 
More
Quote:
Originally Posted by sztupy

Build 4 released

Has USB 1.x support for mice, keyboards, gamepads and such.

DL: http://forum.xda-developers.com/show...69&postcount=6

Really cool to see how this works. Have you looked at how it is built into cm7 for the sgs2 by chance. On the sgs2 you do not need an external power source/hub to run a USB thumb drive. Curious if it could be set up the same for the cappy? Neat work your doing here. I had briefly spoken to Atinm a while back once we got it for the sgs2 and he basically said they had never looked into it for the cappy. Look forward to see how this progresses. Thanks

Sent from My KickAss CM7 Captivate
28th January 2012, 09:09 AM |#10  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 877
 
Donate to Me
More
Build 5 released

ChangeLog
  • Added ability to turn charging on/off while the USB is connected
  • Added ability to change the Host mode driver. Currently three drivers are present: S3C High-speed (the default), S3C Low-speed/Full-speed (this disables USB 2 mode. Use this if you want to have USB 1 compatibility), and DWC (a separate driver for the same OTG specification, that will probably get into upstream)
  • Fixed some small issues regarding cleanup after cable is disconnected

The DWC driver does NOT yet work, it will probably crash your phone if you try to use it. I however hope that I will be able to fix it. The other two drivers work well of course. Note that you have to turn off host mode if you want to change the driver (then turn it back on).

Also note that to change the charging mode you have to unplug every cable from the phone before changing the charging mode. In ICS it seems that the small battery icon on the top and the lock screen will still say the phone is charging, but the battery menu in the settings will properly tell you they are mistaken and the battery does not charge indeed.

Usb Host Controller has also changed to version 0.2.
I made a separate thread for it: http://forum.xda-developers.com/show....php?t=1468531

Changes include stability fixes, a new icon, support for the new features mentioned above (changing drivers, disabling charger, etc.) and two nice commands:
  • Reset USB device
  • Re-read partition table

The latter command should probably solve a few issues where the flash drive was recognized, but there were no partitions to mount. It also solves the issues of connecting other Android devices. (Simply re-read the partition table after you have enabled usb mass storage mode on the other android, and you will be able to get files from the other phone too)
The Following 3 Users Say Thank You to sztupy For This Useful Post: [ View ] Gift sztupy Ad-Free
21st February 2012, 06:24 AM |#11  
Junior Member
Thanks Meter: 0
 
More
Excellent! thank you!
Post Reply Subscribe to Thread

Tags
captivate, host, ics, usb

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes