yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] clio94:
i see that even if it doesnt charge, the power that usb hub gives (i am using a trust usb hub) gives enough power to prevent battery from dis-charge

Also today i used gps for 40 minutes and i had connect my usb car charger.Battery didnt charge but also didnt dis-charge.The power from usb car charger is 1000mah and from usb hub 2000mah.

Can someone help me on how to see a usb stick; Ι am following the instructions from here http://rerede.com/hotpointer/linux-os/05274535.html and i see the device in /proc/scsi/scsi but instead of sda4,it gives me sda1

so in terminal i give

mount -t vfat /dev/block/sda1 /mnt/usb but i have message "mount: no such device"
[HD2 Android NAND Development] omek07:
Hello

What does the USB Host mode ????

Where i can find USBhub for hd2

Παιδιά μία βοήθεια πώς μπορώ να συνδέσω usb hub στο κινητό ????

Δεν μπορώ να καταλάβω... Με το καλώδιο που έχουμε συνδέουμε κάποιο usb hub πάνω ????

Σας ευχαριστώ
[HD2 Android NAND Development] KyJelly69:
There's another one that doesn't read before installing or asking questions.
[HD2 Android NAND Development] clio94:
Can you tell me please,where in my post do you see that i didnt read before post;

I am using this usb hub http://www.trust.com/products/product.aspx?artnr=15140 i connect the usb output of the hub in this cable http://www.ebay.com/itm/Micro-USB-H...ccessories&hash=item4d0188c02c#ht_3285wt_1185 and then to phone
[HD2 Android NAND Development] KyJelly69:
if you would have read the op (or 1 page back for that matter) then you would know that usb mass storage devices aren't supported, and a usb stick is a mass storage device.

You didn't need to tell us it was very obvious. Do some reading first next time.
[HD2 Android NAND Development] Rick_1995:
Hope you realize client usb mass storage can be connected but leo can't act as usb mass storage host is what the first post means. (Beside the fact it also mentions that usb stick was tested).

AND, stop fighting please.

pressed your thanks by mistake :p
[HD2 Android NAND Development] pasterzppp:
Can we pray that, we will can switch between usb host or charging? It possible to do in future? (sory for mistakes).
[HD2 Android NAND Development] Burag:
When OTG will be supported, then yes, it will work for both ways.
[HD2 Android NAND Development] pasterzppp:
Thanks God, maybe in future it will be standard in all of roms with ICS. We are waiting for this. Lots of people are waiting for this. Thanks Rick_1995.
[HD2 Android NAND Development] pirlano:
i'm not a dev and my knowledge is zero: it's possible to manually switch beetween usb client and usb host, loading and unloading kernel modules without rebooting? (using an android app for example) :)
[HD2 Android NAND Development] Rick_1995:
In theory yes,

Qualcomm's document (which i cannot post here due to restrictions), mentions that the hardware supports 4 modes:

Hardware HNP -> Hardware detects ID pin on usb cable and switches mode accordingly, needs driver support also.

Host Only Operation -> what we're using now, no matter what device is connected, usb controller behaves like a host.

Function Host Operation -> I have no idea what in the world this is.

Software HNP -> Driver can reset hardware and initialize it in the mode it wants, so an android app or a shell script (like overclocking, overvolting) can make the kernel change the usb controller's behavior by loading, unloading drivers (NOT modules).

I am thinking of implementing Software as it will be easier and require less things to change, but i will need someone to make android app. ( I tried making a few apps but failed badly :P )

Things to implement:

1) sysfs interface (for android app to interact)

2) client driver unload routine (This does not exist in the current driver and we will have to initialize controller to the same state it was before the driver was loaded)

3) board file changes (to accomodate both host and client stuff)

4) Android app (not required, only if user prefers to stay away from terminal)
[HD2 Android NAND Development] bojanbl:
I wiped everything installed Paranoid Android and Tytung's 2.4 kernel with proper initrd.gz (I believe that I chose wrong kernel, mixed with ICS Tosti kernel) so now I have and WiFi working and USB host working on Paranoid Android :cool:

Would it be possible (Have no time to test it) to just flash previous kernel, tytung 2.4 to have charging? Actualy my idea is just to switch kernels? Maybe an app can be made so that you can chose USB host or charging mode (normal mode) and after that phone reboots and we have option that we choosed?
[HD2 Android NAND Development] Rick_1995:
Yes, you can do that for now. Just use rom manager on clk to flash normal kernel when need charging or just power off device and let clk/recovery charge phone.

As for other functions of usb (other than tether) aren't so critical because android has many ftp servers available now, so you will only need to do that for charging the phone.
[HD2 Android NAND Development] bojanbl:
Thanks! I have another question, can I use (and how?) USB VGA adapter (or something like this) to get fully working desktop station? :D
[HD2 Android NAND Development] tmotard:
ok, your right about reading the first post. sorry.

but disagree about the "logic"... for example, you can't use wifi when you are using wifi tethering... but you can use wifi when you don't tether..

then i know the difference between usb host and usb client but i didn't realise that when you are in usb host mode that's definitive.

i read the posts before, and that seem's possible .. then logical :)
[HD2 Android NAND Development] pirlano:
I think no since HD2 doesn't support MHL (for what i know), but instead you should be able to use an USB monitor (in linux for sure, android don't know) :)

EDIT: android it's possible too. sven does it for Nexus One: http://sven.killig.de/android/N1/2.2/usb_host/
[HD2 Android NAND Development] liiochen:
sorry .. the TV-out is not support in this time.
[HD2 Android NAND Development] liiochen:
Sorry, I have a file system development tasks I will complete this task and then to improve the host function.

in China, many machines use QSD8250 processor. The strange thing is, many of which support OTG function.

And I intend to reference http://www.spinics.net/lists/linux-usb/msg35600.html

But I do not have enough free time.

So I have to patch has been uploaded to my blog

maybe someone can interrupt sharing methods to do the switching of the HOST and Gadget.

Seemingly only need to modify ehci_irq and msm72k_udc interrupt handler

There may be some USB Control Protocol

In any case, I will try to
[HD2 Android NAND Development] wserfer:
Rick and liiochen! I love you!!! Works in 2.3.7 very good
[HD2 Android NAND Development] maverick.bg:
I can do that. If you guide me what to do I can write simple apk to flash kernels and swich modules directory. Afcorse device must be rooted. Aplication also can mount storage devices.

I tested this kernel with usb flash (FAT32) and with usb hard disk (NTFS). With flash drive there is no problems but with hd I cant mount because of lack of NTFS support.
[HD2 Android NAND Development] ogonzuhnina:
I think Rick_1995 meant switching the diver function rather than reflashing kernels.

Once the driver is supplied with both device and host modes, than it will just be switching the driver mode via software, and all of the modules may remain unchanged thuss originating from the same kernel build.

Cheers
[HD2 Android NAND Development] liiochen:
This is NTFS module .

use:

# insmod /YOUR PATH/ntfs.ko

I compiled the kernel, added some new modules

LD [M] drivers/usb/serial/cp210x.ko

LD [M] drivers/usb/serial/ftdi_sio.ko

LD [M] drivers/usb/serial/mct_u232.ko

LD [M] drivers/usb/serial/pl2303.ko

LD [M] fs/fat/msdos.ko

Please wait for me to test it. btw: the ntfs.ko I have not tested
[HD2 Android NAND Development] Rick_1995:
The older ntfs driver in linux was VERY unstable, it is recommended you use fuse (ntfs-3g) instead of the kernel's ntfs driver.
[HD2 Android NAND Development] liiochen:
OKay, In fact, my job is to Windows NTFS file system development:D

Maybe , port the native NTFS from leaked Microsoft NT4 sourcecode.:p

HaHa..However, I think of, or OTG more interested in ..
[HD2 Android NAND Development] ogonzuhnina:
Guys,

Isn't the break of charging in host-enabled kernel related to the fact that default usb connection was disabled/replaced by host funtions?

I recall (when last time I revieved battery code), the charging mode was relating to whether the usb connection (device mode) is enabled or not.

Once the connection was established, the charging went to slow mode, when no connection was established, then it switched to fast charge.

Now as the host mode functions replaced the default ones, the check is not valid any more, thuss charging desn't work.

Is that still truth?

Would it be possible to swap the function to: whenever power appears on the usb port, kernel will assume it is a usb connection-pulling low amperage form the port, in the mean while the check is performed to check if a charger is plugged in. Once that is detected, than charging would switch to fast mode. I think there are standards in the chargers, to use 5th pin or bridge data+/data- channels.

Just an idea but who knows...

If I'll find time I'll review most up to date code but I am a noob in kernel development ;P
[HD2 Android NAND Development] bojanbl:
Yes switching modules is better but due to lack of possibilities and switching kernels would be fine ;) I managed to switch back to tytung 2.4 kernel without any problems... This USB Host enabled kernel has higher battery drain (lowest was 10mAh)...
[HD2 Android NAND Development] wheeliemonster:
Rick,

Sorry to go off-topic:

A while ago, you posted this is the IceCreamTosti thread. Do you know if anyone's working on it, as this is the last real frustration with the ICS HD2 builds.

Thanks, and sorry again to post off-topic.
[HD2 Android NAND Development] Rick_1995:
Hahaha, Yeah, OTG should be more beneficial as NTFS can be fixed by using user space file system.

Agreed, it is the last major problem. But sadly I cannot tell if anyone is working on it or if i will do it myself since my computer and network aren't good enough to be working with the "HUGE" codebase of ics.
[HD2 Android NAND Development] bojanbl:
This USB Host mode works even with my wireless mouse (Logitech Performance MX)... :D :eek:
[HD2 Android NAND Development] mootmetal:
how to uninstal this?
[HD2 Android NAND Development] retsam88:
1. Revert to your old backup.(if you did one)

2. Install new Kernel of your choice

3. Install any new ROM

I guess.

And for feedback, I have successfully ran USB Host with SD Build(Nexus HD2 ICS)

cat /proc/scsi/scsi detects properly almost any device

Also, it's possible to DIY very cheap self-powered(by 9V battery) USB Hub, and it works nice too. If anyone wants to build one, I offer some help :)
[HD2 Android NAND Development] kasprzak:
How Can I add USB-host function into NexusHD2-ICS-4.0.4-CM9-HWA V2.1 (Kernel: tytung_HWA_r2.3-uniMAC) rom ?
[HD2 Android NAND Development] retsam88:
Install this package(clk or magldr), but make backup first.
[HD2 Android NAND Development] clio94:
and how do you mount a usb stick? what command do you give in terminal?
[HD2 Android NAND Development] Rick_1995:
i rate that 10/10, isn't that the same package as first post...
[HD2 Android NAND Development] zoUphd2:
I have try it with 3 hubs and just dont want to work for me :( nothing to enable in rom after flashing the package ? I connect my phone with the hub usb cable with a switch from male to female usb .. and then i pliug in a mouse or keyboard .. but never worked. I have Latest Tytung ICS 2.1 With 2.4 kernel ? Maybe the switch dosent do the work at all ?
[HD2 Android NAND Development] bojanbl:
I also had problem with my 7 port USB hub, its power adapter was too weak, so I used Y USB cable, one Y USB port plugged in USB on PC and another Y USB port plugged in UCB hub and i got it working even without power adapter ;)

It is powered from USB port on PC...

---------- Post added at 11:09 PM ---------- Previous post was at 11:07 PM ----------

I just did install tytung kernel v2.4 without cleaning cache/dalvik cache ;)
[HD2 Android NAND Development] zoUphd2:
I don't understand that how a PC usb port have more power from the powered usb hub .. the other thing is that my mouse or keyboard the took the power that they need cause the led on mouse and keyboard are on .. but the Hd2 dosn't respond at all ..
[HD2 Android NAND Development] retsam88:
Of course this isn't my work. I'm just refreshing topic.
[HD2 Android NAND Development] bojanbl:
Maybe because this power adapter is Chinese and doesn't generate enough power...
[HD2 Android NAND Development] dertester123:
Have you measured if the incoming port is powered?

Many Usb-hubs are claimed as powered hubs, but that only goes for the (outgoing) devices you want to connect to the host.

In many cases the host aka our Hd2 isnt powered. The easiest is to use a power-only Y-cable and one of the outgoing ports to power itself. Or if you prefer a clean solution solder the power lines in the usbhub itself from a device port to the host port.

=======

(just a few questions, havent read the whole thread yet)

USB OTG seems not possible but as far as i understand its only a rarely used feature, as most used devices like storage,mouse etc are not otg ready...

Is the lack of mass storage/adb only temporary or something we have to live with, if we want to have usb host?
[HD2 Android NAND Development] Burag:
Are you sure that supplying 8~9 volts to USB devices (made for 5v) is safe?
[HD2 Android NAND Development] ogonzuhnina:
In electronics engineering there are elements to limit voltage throughtput (even a sipmle diode will drop ~0.6V)

And USB device specification defines a range of 5-5,5V - not to be picky ;)

There are even elements to bump voltage to 5,5V from say 3,7V (Li-ion cell)...

one could then have a rechargable OTG/HOST gear :)

Cheers
[HD2 Android NAND Development] specx2:
Usb Host Controller - with this application, you can mount a USB Flash (FAT 32)

retsam88, can be your concept watch 9V power supply?

http://xdaforums.com/showpost.php?p=26672358&postcount=116
[HD2 Android NAND Development] retsam88:
Do you mean 9V power adaptor? If it stays within required voltage then yes.

I have found old but correct schematics with needed parts. This is not my work, I have found it some time ago on xda.

Sorry for the question, but whats exactly keeping us from porting this to Gingerbread build?
[HD2 Android NAND Development] FunFrog:
Hey guys, for power supply with 9V battery or something other, higher than 6V you can buy a very cheap (less than $1) regulator like:

КР1195ЕН5А, КР1195ЕН5Б, КР1195ЕН5В, КР1195ЕН5Г, КР1195ЕН5Д, КР1195ЕН5Е, КР1212ЕН5 - made in Russia.

LT1083-5, LT1084-5, LT1085-5, LT1086-5 - made in USA.

Or similiar ones.

Also, take a look at sku.93278 @ DealExtreme - very good quality cable & charger, especially with sku.12720 rechargeable batteries.

P.S. The only way now to charge the phone is reflash it or charge in the recovery?
[HD2 Android NAND Development] specx2:
retsam88, thanks, that's what I like to see.

More beautiful/elegant option.

http://www.usbfever.com/index_eproduct_view.php?products_id=1340

:)
[HD2 Android NAND Development] cccy:
Has anyone tested this with a USD DAC?
[HD2 Android NAND Development] timurmurmur:
thx Rick, works good on tytung's cm9 rom.

http://xdaforums.com/album.php?albumid=7170
[HD2 Android NAND Development] bojanbl:
How did you make USB flash disk work? How did you mount it?
[HD2 Android NAND Development] retsam88:
You can mount it manually via Terminal Emulator or by using simple USB Host Controller which you can find either in Google Play store for free or here on xda:

http://xdaforums.com/showthread.php?t=1468531
[HD2 Android NAND Development] maddoc1007:
why not usb for cm7

why cant a flashable zip be made for cm7 not everyone wants to use ics. even all new phones sg2 sensations are all having problems since they got their updates to ics. the most problems 3 people i k ow are constantly complaining about are hiw slow wifi is with ics slow at loading web pages freezing of browsers etc and even market problems and 2 have sg2s and 1 has a htc sensation all theae phones are on different networks 1 on vodafone 1 on meteor and 1 on o2 yet they all have wifiproblems as i had when i installed ics. so i went back to cm7 and no more wifi problems.

so can u make a flashable zip for us on cm7 and if not can you tell us if we extract ur zip where to place the mod files and the work files and what changes we would have to make if any to thoae files??????
[HD2 Android NAND Development] pirlano:
working really good with Microsoft Keyboard and Mouse Wireless Comfort Desktop 5000 :D too happy :D
[HD2 Android NAND Development] kasprzak:
I installed usb-host.zip from the first post with AD Recovery (from SD Card) with success confirmation, and i reboot phone. Then I dowloaded from Google Play and installed Usb Host Controller and I have some notification:

SC3 USB HOST driver NOT found!

Root hub present, USB Host Mode is active.

I made a usb cable like:

1st connector -> Data -, Data+ [for usb mass storage stick]

2nd connector -> +5V, GND [for power supply, inserted into laptop usb]

3rd connector -> +5V, Data-,Data+,GND [phone (tested, working pc->phone cable)]

Am I doing everything right?
[HD2 Android NAND Development] retsam88:
You need -(negative polarity) on 1st connector.
[HD2 Android NAND Development] kasprzak:
I am an idiot. Of course problem is solved because I didn't connect GND.

Rick_1995 , generally in future, usb host mode can working together with usb mass storage and charging (but it depends on time) or this is imposible?
[HD2 Android NAND Development] clio94:
I connected in a usb hub 3 usb flash sticks and they worked all of them perfectly.I played video,copy files between them and sd card and everything went ok :D The most amazing was that battery didnt lose any energy all the time i tested it !!!

All devs you made an awesome work in our phone.Thank you very much
[HD2 Android NAND Development] XeX_DuBwoofer_x:
same question here, i use usb mass storage alot i mean i could just plug a usb stick into my phone however that would be awkward at times such as when i want to transfer something directly to my pc and dont have a usb stick to hand.

is there anyway we can somehow code a app that will do the same job as usb host controller? but have a feature to swap usb drivers/modules between standard and this for when we wish to use usb mass storage or usb host? it would be simple if you think about it just need a app that can remove the existing stuff replace it with host then when to switch back it removes host and then installs stock? just an idea, i would try it myself but never made an android app i can code in C# for windows games but dont know anything about android
[HD2 Android NAND Development] liiochen:
I've left the company, now I intend to port the USB-OTG function
[HD2 Android NAND Development] mandrakur:
Hallo Liiochen,

Whan you port the USB-OTG function for ICS,and have some time ,will be fantastic to try porting usb host to CM7roms:D.

Thanks
[HD2 Android NAND Development] liiochen:
It also support CM7.

But , you need compile it yourself. :(

source code & patch:

http://rerede.com/hotpointer/linux-os/05274535.html
[HD2 Android NAND Development] waterskier33:
Hello do you think the patch would work on desire with ICS rom or would that patch require some tweaking?

Thanx
[HD2 Android NAND Development] maddoc1007:
how would you compile it for cm7 as i no nothing about codeing or compiling as id.say a lot here who would like it for cm7 dit know how todo it either, ciuld you do a.zip.for.us??
[HD2 Android NAND Development] mengfei:
is it possible that this could work for SD ROMs? :o
[HD2 Android NAND Development] retsam88:
Yes, it is working on ICS SD builds. Look few posts earlier for info.
[HD2 Android NAND Development] Bldzr:
Guys is this real ? Can i play shooter games with my PC microsoft mouse ? ima gonna buy some cable's :D
[HD2 Android NAND Development] liiochen:
I'm sorry, I not have HTC Desire.

But I've seen some kernels , it's support OTG (look like, no test)

If you ask me how to fixed this. because:

1. The interrupt problem is you must request irq before any thing.

2. disable irq and set valid flags

3. enable irq

4. Make sure you have the right to use the USB clock( fixed the roothub return a error(get device descriptor is timeout))

These are in ehci-msm7201.c. good luck.:)
[HD2 Android NAND Development] retsam88:
@liiochen

You are the best.
[HD2 Android NAND Development] bojanbl:
I have a feeling that this is not all what you can do with our HD2 :D :eek: :cool:
[HD2 Android NAND Development] Bldzr:
OMGGG I DO ITTT !!! HD2 WILL NEVER DIEE :D:D

i just put my wired keyboard/mouse a4tech in the usb port and they WORK FINE !

My question now is HOW TO RECHARGE MY PHONE ?:/
[HD2 Android NAND Development] ph03n!x:
Quoting first post :)

So you recharge in with the phone switched off if using cLK, or flash a different kernel to recharge if you are using Magldr ;)

A Couple of posts that might be of interest to you:
[HD2 Android NAND Development] maddoc1007:
cm7 roms

i guess no one wants to port this for cm7 roms?
[HD2 Android NAND Development] Robbie P:
You could also install a nice sd build and use that to charge your phone, and still have phone on.;)

Edit; or use sd build for usb host.
[HD2 Android NAND Development] derschnelle:
I do it the same way!
[HD2 Android NAND Development] Bldzr:
The bad think is the games dont recognize the mouse ;/ now im searching for app who can make my mouse work on CS portable or modern combat 3 =] Someone who try to play any shooter with the mouse ?
[HD2 Android NAND Development] Rick_1995:
It's usually the app which must support HID (Human Interface Devices), my usb joystick works fine on tiger GBA emulator.
[HD2 Android NAND Development] liiochen:
All changes in the patach file.:D

The reason why I do it is I am going to control HD2 and connect its devices through network .

btw: All is based on Android kernel.:D

---------- Post added at 04:25 AM ---------- Previous post was at 03:48 AM ----------

Can I sync tytung last changes to my kernel?
[HD2 Android NAND Development] gyuri81:
Hi!

Usb host mode operates at 2.3 as well?

Tapatalk 2-vel küldve az én HD2-ről
[HD2 Android NAND Development] bojanbl:
Holly sh*t I didn't know that usb joystick can work with this :eek::eek::eek:

Now... I must try it :D

No I meant that you with other great devs have unlimited usage scenarios for our HD2 (Like this one, using joystick, didn't even thought on trying it on HD2) :D

I don't see why not (I would like to see this updated kernel of yours) but you have to ask him for permission ;)

What you meant by 2.3? Android version or Tytung Kernel version?
[HD2 Android NAND Development] gyuri81:
Sorry! Works with Android 2.3 ?

Tapatalk 2-vel küldve az én HD2-ről
[HD2 Android NAND Development] mengfei:
I see that the download file is for flashing, how do I get it to work with an SD ROM?

i tried to copy the folder/ files to the SD ROM Folder but it seems not correct :o

has anyone tried it with SD Roms?
[HD2 Android NAND Development] Robbie P:
First backup your build.

DL from this post http://xdaforums.com/showpost.php?p=26592459&postcount=6 and unzip.

Put system folder into a folder called root (create one if needed) in your build folder .

Get zImage from magldr folder and replace the one in your build folder.

Reboot
[HD2 Android NAND Development] maddoc1007:
android 2.3.7

does not work on 2.3.7 causes freeze on boit animation dorimanx 3.1.9 rom can any1 wxplain how they got this working on 2.3 android?
[HD2 Android NAND Development] bojanbl:
When you make diesel engine to work on petrol and vice verse than this could work also :cool:

You did install this ICS mod (Kernel mod), actually you installed ICS Kernel on GB rom and wondering why you can't get this to work?