Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[USB Host] on the Desire HD

OP bergfex

14th March 2011, 09:00 PM   |  #1  
OP Senior Member
Flag Hagenberg
Thanks Meter: 105
 
206 posts
Join Date:Joined: Sep 2010
Donate to Me
For FROYO SENSE ROMS only

Hi

I ported Sven Killig's (sonic74 ) usb host patch to the Desire HD.

My Kernel is based on Buzz OC/UV 1.22Ghz CFS+BFQ+SmartAss+TUN+EXT4+.31 ACE 1.3.6

and following patches:
http://forum.xda-developers.com/showthread.php?t=694427
http://forum.xda-developers.com/showthread.php?t=751535

and I am using Android Revolution HD 3.1. So all glory goes to this peaple and to Andrew de Quincey.


Using this Kernel will disable all usb client functions, so this kernel is not very usefull.
So I use following comands to boot this kernel for testing and playing:
Code:
adb reboot bootloader
fastboot boot boot.img
With this methode the phone will boot with the old kernel after a reboot.

After booting my kernel you can use insmod to load the different driver modules.
You will need at least usbcore.ko and ehci-hcd.ko.
I have tested usb keyboard and usb storage (2GB FAT32). Use Sven Killig instructions to use the different modules.
http://sven.killig.de/android/N1/2.2/usb_host/


Needed Hardware:
* A micro USB B male to USB A female adapter/cable
http://www.amazon.de/gp/product/B004...pf_rd_i=301128
* A self powered Hub that provides its power to the upstream port.

For trying my kernel you will need the boot.img from the boot.rar and the modules from the modules.rar.

For integrating the patch into your own kernel you will need the usbhostpatch.txt and the .confg from the config.rar

PS: Wifi is not working but should not be hard to fix.
Attached Files
File Type: rar boot.rar - [Click for QR Code] (2.44 MB, 1697 views)
File Type: rar modules.rar - [Click for QR Code] (1.57 MB, 1522 views)
File Type: txt usbhostpatch.txt - [Click for QR Code] (21.1 KB, 2204 views)
File Type: rar config.rar - [Click for QR Code] (13.6 KB, 1114 views)
Last edited by bergfex; 9th January 2012 at 04:37 PM.
The Following 26 Users Say Thank You to bergfex For This Useful Post: [ View ]
14th March 2011, 10:08 PM   |  #2  
Senior Member
Thanks Meter: 10
 
135 posts
Join Date:Joined: Dec 2008
Cool!
I've been wanting this for a long time.
I actually ordered a USB OTG yesterday. =)

I think I'll try to add this to the CM7 kernel instead since I use CM7.
How did you integrate the patch into the kernel?

Do you think you could make a video of the procedure from beginning to finish? =)
Or maybe give instructions to me so I can make a video?
Last edited by -Android Freak-; 14th March 2011 at 10:22 PM.
14th March 2011, 10:42 PM   |  #3  
OP Senior Member
Flag Hagenberg
Thanks Meter: 105
 
206 posts
Join Date:Joined: Sep 2010
Donate to Me
If you want to add the usb host function to a CM7 kernel you should try to use following patch:
https://github.com/sonic74/kernel_ms...598c7b4164c8bd

Apply this by hand, because the kernel versions are different.


About which steps you want to have a video?
The Following User Says Thank You to bergfex For This Useful Post: [ View ]
14th March 2011, 10:53 PM   |  #4  
Senior Member
Thanks Meter: 10
 
135 posts
Join Date:Joined: Dec 2008
I thought it would be nice for people to be able to see this done from the beginning to the end. That is first the hardware bit, and then the software modification. But I think the most tricky part would be the software side.
Just an idea. Thank you!
=)
14th March 2011, 11:23 PM   |  #5  
OP Senior Member
Flag Hagenberg
Thanks Meter: 105
 
206 posts
Join Date:Joined: Sep 2010
Donate to Me
My purpose was to show that usb host mode is possible with the Desire HD, now other devs can try to make this features more useful.

For example Apache14 made a kernel for the Advent Vega Tablet, where you can choose at start up if you want to boot the host or the slave mode. It would be perfect if we could have samething like this for the DHD.

Someone could try to add this to a CM7 Rom, but this will require C programming and linux knowledge.

....
14th March 2011, 11:28 PM   |  #6  
Senior Member
Thanks Meter: 10
 
135 posts
Join Date:Joined: Dec 2008
Yes that would be awsome. I wish I could help more.
I'm still learning the fundamentals and it takes time to learn this stuff.
Great idea man! I'll stop spamming this thread now.
Last edited by -Android Freak-; 14th March 2011 at 11:33 PM.
15th March 2011, 12:05 AM   |  #7  
kendong2's Avatar
Recognized Developer
Thanks Meter: 58
 
1,587 posts
Join Date:Joined: Sep 2009
More
has anyone tried how well that works with ubuntu?
15th March 2011, 12:11 AM   |  #8  
Member
Thanks Meter: 7
 
81 posts
Join Date:Joined: Nov 2010
This question is a little stupid but what does this all mean?
What can we except if this works well?

Yours truly.
15th March 2011, 12:34 AM   |  #9  
Junior Member
Flag Frankfurt am Main
Thanks Meter: 0
 
22 posts
Join Date:Joined: Dec 2010
More
If everything works, you could plug a USB Massstorage in your DHD or you could connect a USB Gamepad or a Keyboard.. or even a USB Wifi Stick which is able to hack WEP
15th March 2011, 09:12 AM   |  #10  
Dousan's Avatar
Senior Member
Flag Copenhagen
Thanks Meter: 191
 
676 posts
Join Date:Joined: Aug 2010
More
Very nice work indeed

Good choise to boot the .img instead of flashing through fastboot (unless that's the only way at the mom.), when all other usb functions are disabled, hence no charging with your kernel

I take it's only working with 1.72 based roms?

I'm coming from a Nokia N900 where some devs actually also did this and they ran into all sorts of issues to make it work and the main thing was to enable it so other usb functions also worked at the same time. I changed device before it came to be a beta I think, but did use it (alpha) and found it very usefull. Could flash kernel(s) OTG through terminal so no need of a pc.

One question though is there a way to do it through CWM with a .zip file, I don't know if the CWM has a function to boot from a .zip? It would be nice to be able to do it without the need of a pc

The Following User Says Thank You to Dousan For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes