yashsingh1/xdaforums huggingface dataset:
[Desire General] bergfex:
I tried to apply sonic74's patch to the kernel for the Desire HD and everything works fine, but when i disable the USB Gadget Support I get following errors:

CC arch/arm/mach-msm/htc_battery.o
arch/arm/mach-msm/htc_battery.c:190: error: variable 'usb_status_notifier' has initializer but incomplete type
arch/arm/mach-msm/htc_battery.c:191: error: unknown field 'name' specified in initializer
arch/arm/mach-msm/htc_battery.c:191: warning: excess elements in struct initializer
arch/arm/mach-msm/htc_battery.c:191: warning: (near initialization for 'usb_status_notifier')
arch/arm/mach-msm/htc_battery.c:192: error: unknown field 'func' specified in initializer
arch/arm/mach-msm/htc_battery.c:192: warning: excess elements in struct initializer
arch/arm/mach-msm/htc_battery.c:192: warning: (near initialization for 'usb_status_notifier')
arch/arm/mach-msm/htc_battery.c: In function 'htc_battery_init':
arch/arm/mach-msm/htc_battery.c:1749: error: implicit declaration of function 'usb_register_notifier'
make[1]: *** [arch/arm/mach-msm/htc_battery.o] Error 1
make: *** [arch/arm/mach-msm] Error 2

Any ideas?
[Desire General] thehrushi:
did this stuff go any further?
[Desire General] Mastaxlokks:
Do you have the repo setup with the cross compiler stuff? Here's the complete setup:

You need the following packages first:

32bit und 64bit Systems:

git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

64bit Systems:

ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib

Repo Setup

mkdir -p ~/bin
curl [url]http://android.git.kernel.org/repo[/url] > ~/bin/repo
chmod a+x ~/bin/repo

load ROM Source

mkdir -p ~/android/system
cd ~/android/system
repo init -u git://github.com/CyanogenMod/android.git -b froyo
repo sync

Setting the ENV-variable:

export CCOMPILER=${HOME}/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

Download the Kernel Source

mkdir -p ~/android/kernel
cd ~/android/kernel
git clone git://github.com/teamdesire/cm-kernel.git
cd cm-kernel

Patching the Kernel Source ¶

patch -p1 < android-kernel_msm-bca5320_Nexus-One_usb-host.patch

build standard config:

make ARCH=arm bravo_defconfig

Menuconfig:

make ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig

Make:

make ARCH=arm CROSS_COMPILE=$CCOMPILER

Hope this helps
[Desire General] markrs:
Would love to have this on my HTC desire but it looks too complicated, if anyone hears of a rom with this on it would be much appreciated!
[Desire General] hawkeyexp:
Has anybody testet the patch with vorks kernel (2.6.37.3)? i always get compile errors like "missing bus glue" ..... can somebody help to find the problem and to fix it ?
[Desire General] Remzy:
+1

usb host for CyanogenMod 7 for vendor Bravo (HTC Desire GSM ) :confused:
[Desire General] gschaden:
There is a tool called ser2net which listens on a tcp port and connects it to a serial device. So you could use app like connectbot and connect it to localhost:4000.

h t t p://ser2net.sourceforge.net/
[Desire General] vickyboicancan:
has this project been abandoned?

or has it been moved to another thread?

really would like to know
[Desire General] Mastaxlokks:
I don't know if it's been abandoned, but I'm still successfully using my Desires with USB Host mode.

Currently I'm using Cyanogenmod 6.0.2 with kernel version 2.6.35.9. All works fine.

Do you need any help?
[Desire General] vickyboicancan:
sure could use some

i'm using Cyanogenmod 7.10-rc1

and the kernel is 2.6.37.6

need to know how i could use this or activate this

Thanks alot!
[Desire General] Mastaxlokks:
I haven tried to compile that kernel, but the old kernel patch does not work for 2.6.35.9, so I'm sure it won't work with your Kernel either.

I found some other patch which I had to modify slightly, but now works with my kernel. You could try if it also works for your kernel. You'll find it attached.

You will then need to download the kernel source:

mkdir -p ~/android/kernel

cd ~/android/kernel

git clone git://github.com/teamdesire/cm-kernel.git

cd cm-kernel

git checkout android-msm-2.6.37-unified

The rest should work like I explained in a previous post:

http://xdaforums.com/showpost.php?p=12083199&postcount=117

Just replace the kernel checkout with the above and take the attached patch instead of the old one...

You can manually configure your Kernel, or try my config file for my 2.6.35.9 kernel which I attached. (It is named .config_host after unzipping, so it'll probably be invisible)

Hope this works for you.
[Desire General] vickyboicancan:
Thanks dude

will go home and have a shot at this

appreciate the help
[Desire General] wallie43:
Hi. Could you share your kernel 2.6.35.9 (with patch applied). I was stuck at "repo" command. Cheers.(Sorry about my english).
[Desire General] Mastaxlokks:
Sure, I could do that, but it won't work with Cyanogenmod 7, because something with the W-LAN has changed there. I already tried that...

What is your problem with the repo?
[Desire General] Mastaxlokks:
Actually, I just looked at my Description again... I don'T think you really need the repo... try continuing with the ROM source... that contains the cross compiler you need.
[Desire General] nbedford:
Having just been reading about @chainfire's DSLR Controller, I would love to get host mode working on CM7
[Desire General] gedas5:
@ nbedford

i have exactly the same question. if this app would run on HTC Desire. i hope someone would be able to reply. thanx
[Desire General] chrxss:
I'd also love this DSLR Controller to work on my Desire.

Anybody able to modify a newer kernel version?
[Desire General] JNZ:
hmm, i flashed the kernel, but now wlan is not working anymore (using MIUI 1.8.12, gingerbread 2.3.5)

any solutions?
[Desire General] spooke:
Would be great if it was made to work with Cyan 7.1 RC :)

(Didn't see this wasnt Desire Z)
[Desire General] o-marshmallow:
Can anyone port it to 2.6.35.10 kernel ?

Please I really need it
[Desire General] MusicTherapist:
Please help ! USB Host needed for MSc project /sda missing, unable to mount

Hi there,

I have read ALL posts related to this issue and attempted to contact a few people with no solution....

I have a HTC Desire Bravo, S-off, .... With multiple ROMS and Kernels , ranging from Cyanogen 6.0.2, 6.0.0, 7 + Oxygen ( most builds ) with all kernals supplied here.

I don't know how to compile a kernel its frankly very poorly explained

I have been working on this for 72 hours solid now and I am at the end of my tether ( joke )

Please help me this is what happens ....usbhost_r4 has been used as has tims kernal ( later posts in this thread ) I have also loaded the .ko modules

everything is going well until I try to mount the usb drive ( which has direct power )

the mount operations churns out an I/O error ,

on looking at the sda loc it doesn't exist on my phone instead I have a folder in /dev with mmcblk0-9 , loop1-7 and a folder called vold......

i have obviously tried to substitute the sda with the mmn... bits i do have in that /dev folder but no joy.....

this is nuts I need to get a midi device working on this phone for a project and as smart as people on this forum seem to be there is actually no concrete strand of help , ( i wish gr0gmint was here :o(

anyways please please somebody help me before a blow my brains out for sure !

kindly,

G.

Kernel
[Desire General] o-marshmallow:
Now he have the kernel 2.6.35 ! :D

How to activate usb host ?
[Desire General] martintspedersen:
+1

can some kind soul make this work for cyanogen 7

it would be a shame if this thread died like it almost are now.this could help alot of people
[Desire General] o-marshmallow:
The only thing I need is a cross compiler...

How to install one ?
[Desire General] Mastaxlokks:
Hey,

I got this working for the 2.6.37 Kernel which works with Cyanogenmod 7.

I attached the patch for the Kernel and a Kernel image.

Be careful with the Kernel image though, for my purposes I changed the WLAN Driver, so that the WLAN won't go to standby if the screen is turned off. So it will be draining more Battery than usual. If needed and I find time, I can compile a kernel without the WLAN patch.

Greetz
[Desire General] Mastaxlokks:
I've dedicated a section on my homepage to the HTC Desire host mode:

http://tim.mactory.com/htc-desire/

I've uploaded the kernel and patch there too. Also for now just a small explanation how to use it. Whenever I got time, I'm planning on adding more descriptions etc. maybe even a How-To for compiling the kernel.

-Tim
[Desire General] wallie43:
Where can i find modules (usbkbd.ko, usb-storage.ko, usbmouse.ko) for kernel 2.6.37? Does really working host mode for pendrives (with hub)?

Thanks for help.
[Desire General] Mastaxlokks:
I did not add those, b/c I don't need them... however I just compiled them for you. See Attached zip. you will have to push them to your device manually.

I did not test them, so maybe you can tell me if they work. If they do, I can integrate them into my kernel zip.

Greez
[Desire General] Mastaxlokks:
I've uploaded a version of the Kernel WITHOUT the WLAN-no-sleep patch to my website:

http://tim.mactory.com/htc-desire/

This means you get a normal kernel with added USB host modules. Only the USB connection to the computer won't work with this (due to the Host capabilities).
[Desire General] bluebird11:
Thank you for sharing it with us!

Correct me if I'm wrong, but I think the WLAN-no-sleep functionality is built in in Android:

HW menu button -> Settings -> Wireless & networks -> Wi-Fi settings -> HW menu button -> Advanced -> Wi-Fi sleep policy -> Never

Hope it works for you :)
[Desire General] Mastaxlokks:
Thanks for the hint. I've tried that and it does actually not work for me.

I am however unsung my Desires in an adhoc network. That could be the problem why the setting does not have any effect.
[Desire General] bluebird11:
Just to let you know, that I tested the modules you uploaded.

I can confirm, that usbmouse.ko & usbkbd.ko work perfectly.

Trying to load usb-storage.ko gives me a "failed (No such file or directory)" error, although the module is there.

Edit: After rebooting the error changed to "insmod: can't open ...".

I'm not sure how to test usbhid.ko (is it for joytick?).

Besten Dank, Mastaxlokks!
[Desire General] Mastaxlokks:
I think you also need the scsi_mod.ko (see attachment) to load usb-storage.ko. Does this fix your problem? I have no experience with usb massstorages that's why I did not add the module.

I thought usbhid.ko was needed for the mouse and keyboard. If they are not, you can just ignore it.... :)
[Desire General] bluebird11:
Still no luck :(

It says it can't open scsi_mod.ko.
[Desire General] Mastaxlokks:
Weird. It worked for me in the following order:

usbcore.ko

ehci-hcd.ko

scsi_mod.ko

usb-storage.ko

Where did you push the modules to? I pushed them to the SD card and it worked, but you could also try pushing them to /data/.

Can you maybe post the exact error you get?

BTW: I use Adb wireless, to connect via WLAN to the device. You can get it on the Android Market and then you can use the "adb shell" command on USB host devices. That way you don't have to use the terminal emulator to insert the modules.
[Desire General] bluebird11:
I pushed them to /system/lib/modules/$(uname -r)/kernel/drivers/usb/host/

The error is simply "insmod: can't open /system/lib/modules/$(uname -r)/kernel/drivers/usb/host/scsi_mod.ko".

I use Gscript Lite to execute the scripts for loading the modules, which I prepared on the PC.

Do you have an easy way to switch back to normal mode, so that I can access the SD card from the PC? Would you be so kind to upload the original kernel too? I am currently trying to compile it...
[Desire General] Mastaxlokks:
Did you use the "adb push" command to push the module over to your device? In that case it will not have worked, because there is no folder named "$(uname -r)" this is actually replaced by the shell on the device by the name of your kernel, which is "2.6.37-cyanogenmod+" for my kernel. It will however be replaced by your computers kernel name if your run this on your computer.

Just try pushing the module to /sdcard/. or /data/. and loading it from there.

I do have a version of the Kernel which does not have host mode enabled. It does however have the WLAN no sleep patch applied to it, so be aware of that. The normal android USB gadget mode works with it though. Find it attached.
[Desire General] twinklesam123:
Hi there, may i please ask how can i make USB host work with my Runnymede V5.0 with 2.6.35.14-gingercakes-0.8e Kernel?

Can someone please guide me, since i tried different methods in this forum...but still no luck.

Thanks very much!
[Desire General] Mastaxlokks:
Hey :)

sorry, I'm confused... is Runnymede your ROM name or the name of your Phone?

If it's a Phone, I can't help you at all. I'm using the host mode on the HTC Desire.

If it's a ROM, you will have to get the kernel source for that ROM, patch it and then recompile. I might be able to help you with that... but I'm not sure.

Greetz

Tim
[Desire General] danarama:
http://xdaforums.com/showthread.php?t=1315961
[Desire General] Mastaxlokks:
Since this is a rom, the host mode should be enable able. Can you get a hold of the Kernel source for this rom?

It might be that they use the same kernel as cyanogenmod. In this case you should be able to just install my precompiled kernel, but no guarantee with that.
[Desire General] hop_Thu_vn:
Can we do this on desire without external power? For example, plug usb flash without external power like xperia arc, samsung galaxy S II.

youtube.com/watch?v=Aw3H3EzdsrE
[Desire General] chrxss:
Has anybody had success with HTC Desire and http://dslrcontroller.com/ yet?

I'm so longing for this to work!
[Desire General] Mastaxlokks:
Did you try it yet? Host-Mode is working...

I do not have a camera to use with this program, so I can't test anything. If you have specific problems I might be able to help...
[Desire General] chrxss:
I will ask the dev first, then report back here.
[Desire General] waterskier33:
Did you try it? I am interested too but don't want to ruin my cable for nothing.
[Desire General] chrxss:
I tried to install the kernel and load the modules but the camera won't be recognized by the remote release app. I guess the cable needs external power? Does anybody know how to adds external power supply to a OTG cable?

How may I test the host mode with an USB stick? I connected the stick but can't find it in the file explorer...
[Desire General] Mastaxlokks:
A simple Method would be to get yourself a USB Y-Cable (like in this link) put the two main plugs in-between the OTG-Cable and connect the third plug to the USB Charger of your phone.

USB-Mass Storage is not working at the Moment, so you cannot really try that :D
[Desire General] chrxss:
Ok, I've ordered the cable now.

I already have a common OTG cable so hopefully this will work out.

Although I wonder if the chainfire DSLRController (or Remote Release app - which is the "light" version of the former) needs USB-MassStorage compatibility to work.
[Desire General] Mastaxlokks:
I created a guide for accessing USB mass storage devices on my webpage: http://tim.mactory.com/htc-desire

I deleted this guide here to not have inconsistencies.
[Desire General] markrs:
Gutted I don't have my OTG cable with me to try this, hopefully will be able to in a weeks time. Will this still have the issue that you won't be able to connect this to a PC to transfer files across if USB host is turned on in the kernal?
[Desire General] cocoren:
yes. i tested the case. it's ok. with eos 60d.
[Desire General] ghiki:
The "usb client" mode works without a kernel reflash?

Enviado desde mi HTC Desire usando Tapatalk
[Desire General] chrxss:
So how exactly did you do it?

I couldn't get it to work by now. Besides, Tim posted instructions for USB Storage support which I need to test now.
[Desire General] Mastaxlokks:
I'm not sure I understand you correct... To "un-host" your Desire, you will have to flash a kernel without the USB Host capabilities.
[Desire General] ghiki:
Then, if I flashed "usb-host" enabled kernel I need to flash "non usb-host" kernel to re-enable USB as client, correct?

Enviado desde mi HTC Desire usando Tapatalk
[Desire General] Mastaxlokks:
Correct. That's the state as of now.

Here you can find a Kernel patch however, that enables usb client mode via a loadable Kernel module. Unfortunately it's not for the Desire:

http://adq.livejournal.com/101420.html
[Desire General] chrxss:
Hi Tim,

I got everything working now. I installed the patched kernel with your usb storage mod. Afterwards I was able to connect everything and get it up and running.

Some caveats remain however: Once I disconnect the camera and reconnect it, the whole setup will stop working. Only after a lengthy reboot, everything will work again. Is there any workaround where I can reload a kernel module without rebooting?

Host mode on HTC Desire in action (with Canon 400D)

PS: Is the patched kernel from your blog (http://tim.mactory.com/HTC_Desire/2.6.37_host_mod.zip) with or without the WLAN-no-sleep hack? If the hack is included, could you provide a kernel without the WLAN no-sleep patch?

Cheers
[Desire General] Mastaxlokks:
Hey,

you found the problem, that I also have :) If you disconnect a device while it is still in use, the driver will not recognize it properly and host mode will somehow stop working. I guess this is a problem in the original Kernel patch by Sven. Unfortunately I do not understand enough about low-level USB to try and fix it.

My workaround so far was to close all connections to the usb device before unplugging it. This somehow does not always work, but in many cases it does :) Unloading the usb-core.ko or usb-ehci.ko is not needed, but it might be needed to unload other usb modules you loaded.

The kernel on my Webpage is without the WLAN-no-sleep patch since I figured hardly anybody needs that patch aside from me.

cheers
[Desire General] chrxss:
Thanks for clarifying.

Maybe we could ask Sven if he knows of a fix to the bug!?
[Desire General] Mastaxlokks:
Of course :) You can definitely try your luck :)
[Desire General] Mastaxlokks:
Did you try taking pictures with your camera without mounting it as a USB Mass storage? I would think, that this is not needed for communicating with the camera, but I might also be wrong about that.

---------- Post added 14th January 2012 at 12:07 AM ---------- Previous post was 13th January 2012 at 11:29 PM ----------

I did some testing just now: I have a USB-Hub connected to my Desire, that also supplies the power. If I connect a USB stick to it, mount it on the phone, and then pull the stick out of the hub, the disconnection is recognized properly, and I can reinsert the USB stick without any problems.

The question is now: Does the phone only have this disconnect/reconnect problem, if we don't use a hub in-between ( a.k.a. if we completely disconnect the USB host chip from other USB devices)?

I just did a quick test by unplugging the USB hub from the phone and afterwards the USB Hostmode died.

Seems like my theory is correct. This also corresponds to the problem, that you have to have a USB device connected before inserting the host mode modules.

Now the question is, weather the chip just needs a physical connection in order to work, or if this is some problem with the driver.

Of course it could also be, that it just works with the USB Mass storage, but other devices make problems...

Just to throw in some thoughts :D
[Desire General] XxXPachaXxX:
I ported manually the patch and configured the kernel. But during compiling process i get this error:

arch/arm/mach-msm/devices_htc.c: In function 'board_bootloader_setup':
arch/arm/mach-msm/devices_htc.c:610:17: error: 'SHIP_BUILD' undeclared (first use in this function)
arch/arm/mach-msm/devices_htc.c:610:17: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/mach-msm/devices_htc.c:613:17: error: 'ENG_BUILD' undeclared (first use in this function)
make[1]: *** [arch/arm/mach-msm/devices_htc.o] Error 1
make: *** [arch/arm/mach-msm] Error 2

Anyone can help me?
[Desire General] Mastaxlokks:
Sorry... I don't get what you mean.

You ported the patch? What did you port the patch for? What are the changes you made?

What Device are you compiling for?

A little more Detail would be helpful.
[Desire General] XxXPachaXxX:
Oh yes sorry :D

i applied the patch manually on Desire HD. On froyo kernels all is ok. But on gingerbread when i disable usb gadget support in menuconfig i've this error. I've the same error on sense or AOSP kernel and also when i enable usb gadget but not msm72k gadget controller but others (R8A66597). i've always this error. On 2.6.32 kernels we can solve this by activating gadgets, then selecting R8A66597 instead of msm72k controller and disabling all the android gadgets. But on 2.6.35 touching gadget support i get always this error.
[EVO 4G General] mbell75:
The one we all downloaded is no longer working. Says the trial period has ended :mad: Is there an update?
[EVO 4G General] MordyT:
The latest is here...

http://xdaforums.com/attachment.php?attachmentid=339917&d=1276055644
[EVO 4G General] mbell75:
Wait, this is the one I already installed on my phone June 8th..
[EVO 4G General] MordyT:
Weird, works on mine...
[EVO 4G General] mbell75:
I uninstalled it and then re-installed and it works fine now. Think it updated to a more current version too.
[EVO 4G General] EVOme:
Mine expired today. Uninstalling now.
[EVO 4G General] :
When did it tell you it expired? Just out of nowhere? I downloaded it from the idiot guide and its working so far but I cannot imagine typing without it, so I'm nervous it'll expire soon.
[EVO 4G General] strung:
Mine expired yet still works :confused: :eek: :cool: :D

Edit: NVM, I'm a dumbass
[EVO 4G General] burgertime:
Mine expired yesterday and worked until this morning. Had to uninstall, delete the old apk on the SD card, and then reboot and reinstall everything for it to start working again.
[EVO 4G General] drbadass:
Droid life is on top of this

http://www.droid-life.com/2010/06/15/download-new-swype-beta-2/

you're welcome :D
[EVO 4G General] orkillakilla:
I downloaded swype off another thread on these forums and it still works great!

-------------------------------------

Sent from my HTC Droid Eris using Swype. Gone Google!
[EVO 4G General] Pops_G:
I had to follow the same steps to get mine working. Uninstall, delete old install, reboot, install new file.
[EVO 4G General] Pops_G:
This new version is better. It will add the apostrophe ' into words like "don't" or "I'm". The last version didn't do that.
[EVO 4G General] aldo37:
I just got an email about an hour ago as being accepted into the beta. Not sure if this is a brand new version or not.
[EVO 4G General] orkillakilla:
I downloaded swype from a different thread in the droid eris section and supposedly the license there won't expire

-------------------------------------

Sent from my HTC Droid Eris using Swype. Gone Google!
[EVO 4G General] Pops_G:
What is frustrating is swype had officially stated they will not ever sell the app separately.they are sticking with the included with certain phones model.i would not think twice about buying the final version.
[EVO 4G General] mbell75:
Thats funny and too true! I seriously freaked when mine stopped working. Funny because when I saw Swype commercials, I thought it looked lame and would never work right. Now I cant live without the dumb thing :)
[EVO 4G General] sfld:
should i download the incredible version from that droid-life website?

I have a version of swype on my phone i installed yesterday but it isnt expired

Should i remove that, then install?

I already deleted my old apk i believe
[EVO 4G General] mrono:
http://xdaforums.com/attachment.php?attachmentid=339917&d=1276055644

download that one, it works.
[EVO 4G General] hopalee:
reboot the phone? and how do you do that? just turn it off and turn it back on or something else?

TIA
[EVO 4G General] nenn:
Does anyone have an apk with spanish included?

-------------------------------------

Sent via the XDA Tapatalk App