USB OTG (USB host functionality) on Razr - Working!

Search This thread

jy1022

Member
Jul 31, 2010
21
0
Thank you very much for some very usefull tips.

If anyone still can't get it to work, I uploaded a video showing how I got it to work.

Just search youtub for "razr usb otg" (cannot post external link, because i am new to xda)

(It also works with mouse and keyboard)

Thank you!
Works great with my razr!

PC174472.jpg
 

PerKiller

Senior Member
Nov 29, 2010
80
2
Wow, cool

Alot of technical terms here, about USB, USB-cables etc. and I don't know much about them tbh. But I love this idea! I get my Motorola Droid Razr tomorrow (hopefully :D) and what I want is a cheap (and easy) way to connect: keyboard+mouse.

So is that possible without spending 100$ on a Lapdock?
 

PerKiller

Senior Member
Nov 29, 2010
80
2
Hello, sorry

Sorry I just saw your youtube video and it seems really simple! You say it works with mouse+keyboard. I am wondering, don't I need anything on software-side to make it detect and allow usage of a standard mouse/keyboard, or is that built into the software? Or can I only use it in Webtop mode?

Also, I am looking at some cheap USB-hubs, does it really matter what v. USB I use? I notice v 2.0 is really cheap, 3.0 abit more expensive..

Thanks for any answers! (Hopefully I can make this work before New years eve which will be spent at work, so I won't have the worst new years eve ever XD)
 

smiak

New member
Jan 2, 2012
2
0
Lviv
the whole touch screen is not working together with OMG cable

I just tried OTG cable from ebay together with usb 4 port usb hub with an external power adaptor 5v 500ma. Motorola Razr sucessfully found an external flash drive, its charging but the whole phone touch screen is not working while connected!!! 4 bottom keys, power and volume rocker buttons are working though.
Could you please advice what might be the problem? :confused:

I have UK XT910 version with native firmware(I only rooted it).
If I unplug power button display starts reacting but flash drive goes offline :(

The cable can be found on ebay if you type this: "Original Micro USB male to USB female Host OTG Cable"
 

smiak

New member
Jan 2, 2012
2
0
Lviv
The issue is now resolved

It turns out Razr don't want to accept chinese power adaptor which comes with usb hub (I tried even 2 of them 500mA and 1500mA with the same outcome).
So I used male to male usb cable with original power adaptor and plug it directly to the hub. In this way everything started to work!

I even connected flash drive, mouse and keyboard at the same time. Only one question remains: how to swich keybord language on usb keyboard? Shifting space key is not an option for the keyboard! Therefore its imposible to type ukrainian via usb keyboard.
 
It turns out Razr don't want to accept chinese power adaptor which comes with usb hub (I tried even 2 of them 500mA and 1500mA with the same outcome).
So I used male to male usb cable with original power adaptor and plug it directly to the hub. In this way everything started to work!

I even connected flash drive, mouse and keyboard at the same time. Only one question remains: how to swich keybord language on usb keyboard? Shifting space key is not an option for the keyboard! Therefore its imposible to type ukrainian via usb keyboard.

Have you tried going into the settings and checking settings for the USB keyboard? Settings> Input and Keyboard or sth like that.
 

deadmanjokes

Member
Oct 19, 2010
28
1
The first try was with the Motorola LapDock, the second one with a custom USBOTG cable.

When you connect the RAZR to the USBOTG cable or to a LapDock, it says that a dock has been connected to the device (HD Multimedia Station or LapDock, both are recognized as docks, obviously).
So you have to connect something to your RAZR and it will be instantly recognized but the USB Device Connected notification is shown only in WebTop, not in Android.


The USBOTG cable HAS TO give power to the RAZR and to the devices you're connecting to it, otherwise the RAZR won't recognize the Dock Connected status.
Be sure your AC power is 5V with at least 1A, otherwise there won't be enough amperage for RAZR and the connected device and since the RAZR has got the priority, you'll only charge the device's battery and your connected USB device won't have the necessary power for working correctly.


ROOT is not needed for OTG USBHost operation as the device has been configured by Moto to work in USBHost Mode.
When you connect an external pendrive, the device will automatically create a device node and will automatically mount the connected pendrive/USBHDD in a directory created in /mnt.

I've successfully connected all the device I was able to use on ATRIX, including keyboards, mouses, an 8GB PenDrive and a 500GB external HDD.
I'm also about to see if I can do a modification to the ATRIX LapDock for including into it another USB HUB and a switchable (ON/OFF) 2.5 250GB SATA->USB HDD. If I'll success in this, I'll also post on xda-developers a thread with the instructions on how to do that.
:eek::eek:
great news mate, will try it immedeatly

:D
 

casaroli

Member
Jan 6, 2012
32
12
Santa Rita do Sapucai
Hello,

The OTG port on the TI OMAP4430 is USB 2.0 *only*. It needs a powered USB 2.0 HUB with integrated Transaction Translator, to translate to USB 1.x. Also, it does not provide any power and you do not need to provide power to it. Its a hardware "feature". I think it should work if you use the modded cable connected to a hub.

Having the HUB to charge the Razr is a different thing, that has nothing to do with USB 2.0 OTG, and USB HUBs or so. It has to be manually triggered by the OS, and I think maybe Webtop does this (or not).

Also, not every HUB do provide power to the upstream port on the USB, so you might want to check before. Trying this.

Perhaps we would like to test force running webtop (with Nebtop, maybe). Or use the inexpensive Webtop adaptor that came with my razr?

As soon as my cable arrives, I gonna test it here and post some more comments.

Thank you
 

ajwillys

New member
Apr 28, 2011
2
0
This is awesome! I just bought all the parts necessary to build this on ebay. I plan on fashioning it into some sort of housing/dock so its more of a permanently assembled solution. Thanks for posting this! If what I come up with is worthy, I'll post a photo.
 

szuwx

Senior Member
Sep 5, 2009
50
1
Hi, i'm having small problems with this otg. I've done otg cable from nokia micro usb to usb, works on nokia e7. I connected razr like this, otg cable-usb connector(female usb from both sides)-hub. Hub is modecon ufo with 7 usb ports, on begining it didn't worked bcs it didn't give +5 on cable that is usually conected to pc. So i soldered +5 from one of povered ports to this vire. When it's connected to razr phone starts to charge, after connecting mouse to hub it's working, but after connecting any usb memory stick ar disk im getting error "sorry, aplication usb (procedd com.motorola.usb) was stopped suddenly. try again". Mouse is still working but storage devices no. My phone is only rooted. I'm on 651.73.30.xt910.nonefigsretail.en.eu
 

szuwx

Senior Member
Sep 5, 2009
50
1
It's based on alcor au6256 . I installed USB Host Controller and it detects both logitech controller for mouse, and and pendrive. Mouse is still working but after connecting any storage device still getting same app crash (app usb).
Working perfectly fine now, after updating from 651.73.30.
 
Last edited:

codenamefly21

Member
Feb 18, 2012
22
3
I was finally able to hook up a usb hub to my bionic and read usb drives. But for the sake of portability i made a rechargeable battery powered usb hub. It works great.
 
P

P5x5-User

Guest
I have some ideas and problems to bring into this thread.
Maybe someone can shed some light on my thoughts.

I have a rooted Razr XT910 and a car dock.
Also, i have a (in fact, more, but that is not part of the problem) 4-port USB Power supply for car and mains (Ansmann 5211013).
I'd like to use this power supply at home and in my car to charge my phone and have the ability to play movies and music from external USB storage. (I know it does not with the car dock cable because in there data lines are used for the audio.)
The reason for this power supply is simple: my wife and also the kids have devices with USB charge, and our car only has one outlet. So this handy thing allows me to use my Razr as Nav, while wifes phone can recharge and kids have power to play all the way to wherever we drive.
(Side note: it has 2 sockets noted "for iphone", 1 for "Samsung, Philips, Creative", 1 for "Navigation". Razr originally showed "AC" in iphone sockets, "USB-charge" in Samsung socket and did not charge in "Nav" socket. Sockets have different resistors on data lines: iphone has divider, Samsung has pull downs, Nav has open data lines. I removed resistors on my experiments. I used a battery monitor app to see the charge info.)

Also, i am able to solder, i earn my money in a electronics factory building all kinds of stuff, so electrically spoken i know what i am doing.
But, i am new to Android and Razr.

Experiment 1: I have bought a no-name USB-OTG cable ("micro B male" to "A female") and noticed the razr won't do anything, nor does the stick.
Trying a externally powered HDD did nothing also.
Conclusion: Power missing. :(

Experiment 2: I then modified a hub (D-Link DHub7) to "backpower" the host on his USB-B-Female, and upon plugging the Razr with its OTG-Adapter into the upstream cable of the hub, the Razr shows it's charging, also the hub powers the downstream plugs (usually upon recognition of the host). Plugging my stick into the hub makes it blink and appear on my Razr.
Conclusion: Works, but has too much of plugs, cables and additional hardware. :(

Experiment 3: I soldered 2 of the 4 sockets of the Ansmann power supply in parallel. I then plugged the hub in one of these ports (power on, ports off) and connected my phone to the other via the standard cable (micro B male to A male, the supplied data/charge cable). Phone showed "AC charge", but did not recognize Hub/stick (all lights were off).
Conclusion: There is some magic in the OTG adapter, so it's needed. :(

Experiment 4: connected hub with stick to bridged power supply ports, soldered A-male-to-A-male USB cable, plugged it into the other power port and the other end to my OTG-Adapter, then into the phone. Razr charged and recognized hub and stick.
Conclusion: works, but needs "special" cable and also too much of it. :(

I want to get rid of the Hub, so i started
Experiment 5: Stick to bridged port. A-A-cable to other bridged port, other end to OTG adapter, adapter to Razr. Razr charged, no USB recognition.
Conclusion: Hub is needed. :(

But:
I do not want to carry all those :eek: things:
- power supply (with mains and car cable)
- hub with host cable
- OTG adapter
- standard data cable (to charge with minimum plugging)

My goal is to have the power supply and a data cable ready, plug it in (into iphone sockets = AC charge) and simply charge.
Or use the other sockets, plug stick/hdd in the other bridged port and use it.
I can live with having a second data cable (with pin 4 set to GND = OTG-Mode). I can also solder this data cable myself, i have the plugs at hand.
I don't want that OTG adapter (only 10cm and god knows why it's angled), because it's too short and dangly, and it does nothing because i need the hub to initiate data transfer and have the ability to supply power to the phone and peripheral. Using the hub on an PC would "divide by zero" because it powers the PC back, leading to at least unwanted results, if not burning something.
I want a nice solution, throwing the supply under my chair, connect 2m cable from there to my phone so i can handle it easy, connecting the stick or HDD also to the supply (out of my feets/hands range and on the ground, so it won't fall off the sofa or kill the USB plug on my phone) and maybe 5m HDMI to my TV, but that's another story.

Anybody out there who knows how to make OTG work without the hub? :confused:
Functionality is ok, cables are no problem, but the phone recognizes the Stick only behind the hub, i don't want that.

Sorry for the post being a novel, but i wanted to give you all my info.
I am sure i missed something, so please ask if you need to know something.

Regards, Jens
 

Niseg

New member
Sep 7, 2010
1
0
I've got the Y cable and OTG cable I got from ebay and started my own testing. I'm using a fairly weak battery as a power sources (5.6V 350mAout 900mAh). These are the devices I tried so far and their functionality
-Keyboard - I tried it today after updating to 65.1.40.Retail.en.IL (Israeli) , set the external keyboard to Hebrew (language and settings menu) and it worked well including switching language to English using alt-shift .
- Mouse - supported natively like bluetooth. I had a problem with one mouse that didn't fight well with the phone for power.
- Disk on key - No problem sandisk 8GB (that's the brand they sell here)
- 500GB external Hard drive (WD elements 2.5" ) - I had to plug in the hub to a 2A~ power supply (it doesn't push power into upstream port so the battery was still there ) and format the drive to fat32 (using fat32formater program). the phone didn't like exFAT for some reason and it didn't recognize the drive when it was NTFS.
- Ethernet - We tested it here at work but it didn't work. Someone told me it works. I know you can connect Ethernet through an HDMI adapter .


My current problem is that my battery is weak and the phone likes to gobble up current from it not leaving much to the devices. Is there a way to limit the current draw from the phone?! I'm going to get a more powerful 2A output battery soon and I bet I can run a hard drive with it but it would be kinda bulky to haul around compared to what I have now .
 
Last edited:

codenamefly21

Member
Feb 18, 2012
22
3
I had the same problem with the battery draw all I did was put a resistor inline with the power wire running to the phone I use a 4ohm. The resistor cuts down the amperage draw but not the voltage. The phone doesn't actually need to charge just a power signal coming in.
 
Nov 21, 2010
23
1
Guys need help.. I followed the instructions to prepare a custom otg cable and managed to build one.. MiniUSB male to USB male(power) and USB female.. I checked all the connections and everything seems to be alright. Now wen I connect the male USB to power, mini USB to phone and female USB to pen drive/ hdd, the phone seems to go to charging mode and the light of my pen drive/hdd starts glowing.. And that's it.. nothing seems to happen. But wen I connect my mouse, my razr detects it and seems to work flawlessly... I dont know what seems to be the problem. By the way am using 5v 1A wall charger for power.:(
 

Jakefreese

New member
Aug 27, 2012
1
0
Can't you all read what someone writes prior you?
USBOTG WORKS ONLY IF EXTERNALLY POWERED. HARDWARE LIMITATION.

Have y'all come across a battery setup for this? I want too be able to tether to my canon 7d camera and use dslr controller app. Thanks!

Sent from my DROID RAZR using xda app-developers app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    @Karmarock

    micro-usb-b.jpg

    1 VCC Red +5 V
    2 D− White Data −
    3 D+ Green Data +
    4 ID none Mode Identification
    5 GND Black Ground

    LapDock:
    +5V and GND connected directly to the battery of the LapDock, TX+RX connected to the integrated USB HUB.

    Docking Station:
    +5V and GND connected directly to external power (5V AC), TX+RX connected to the integrated USB HUB.

    Oh, in BOTH, for enabling the Host Mode, pins 4 and 5 are shortcircuited, exactly as the USB OTG specifications.
    3
    Success at last!!!

    Used an external HUB and a new OTG cable [credits to Kholk].
    Didn't worked with the external power from the HUB (actually didn't recharge the Razr).
    Worked using Y wire.
    Could only access pendrives when connected to the HUB.
    Very strange as I supposed it should also work just connecting directly any memory stick to the OTG cable (powered with the Y cable)! Instead an USB HUB is required!
    Checked back and actually this configuration works also with the samsung cable (this confirms to me its a real OTG cable, I was so desperate that came to thinking it was just plain plug converter).
    So maybe I made 3 working OTG cables, but was checking the wrong configuration!

    To my great surprise the Razr dretects when the device is connected (just wait for a bunch of seconds) and lets you also explore it and unmount it even without using webtob (just select the option from the USB Icon that will appear in the upper bar).

    The good news (not to me as I wasted a lot of time soldering) is that this setup can be obtained with standard cables:
    -Any real OTG micro USB male to USB female
    -Any USB male to mini USB male Y cable with extra USB male just for power (standard for some external HDD)
    -An external USB Hub with female mini USB in.

    Before updating my first post will do some more experiments and let you know about the findings.
    3
    I successfully got OTG functionality working! It took a little modification of some standard USB cables, but here's how I did it:

    I ordered a USB OTG cable (Micro USB male to USB Female) from Ebay for $1.99, including shipping.
    I had a USB extension cable (USB Male to USB Female) that I purchased from the dollar store (for $1.00)
    I had another outdated USB cable (Mini USB) that I no longer used

    Cut the USB extension cable in half and strip all 4 wires inside (on both cut ends).
    Then cut off the Mini USB end of the Mini USB cable. Strip the 4 wires (mine was strictly a charging cable, so it only had 2-red and black).
    Connect the white and green (data) wires of both ends of the USB extension cable, being careful to insulate each wire from touching one another.
    Connect the red and black wires to each other as well, and connect the black and red wires from the third cable (JUST the black and red wires are needed).

    Voila! Now plug the OTG cable into your phone, and use the extension cable as a normal extension cable to connect your USB devices. Then take the extra cable (the one with just the black and red wires connected) and plug it into your USB wall charger. There you go! If you did everything right, this should work perfectly!

    I just wrote this entire post using my OTG setup with a hub, a USB mouse, and a USB keyboard.

    Sent from my DROID RAZR Maxx using XDA Premium
    1
    Dismounted a micro usb male to USB female cable, to my surprise found it with connection 4 free.
    Hence made the 4-5 bridge and checked again.
    Yet no usb host connectivity with an external powered 2.5 HD.
    The HD happened to charge the Razr.
    Hence modified the cable disconnecting the +5V.
    Now I should have an OTG cable with an external powered devices.
    As soon as I'll find back my USB Y cable I'll check with it and some external devices to see if any of them is recognized right out of the box.

    Yet I suspect that, like the Razr Upon USB connection let you choose between some differents kind of connections, maybe some settings has to trigger host mode.
    Any idea?