Hi. I've just recently tried out an app from the market that would let me control emulators and some games with a Wii remote, but it wasn't compatible with my G2x. However, I stumbled upon what is most commonly known as "OTG" cable, but discovered they were worthless for the G2x as of now because 2.3 doesn't have USB hosting.
What I wanted to know is, number one, will the G2x have USB hosting when the official 4.0 update comes out, or is it missing some special hardware needed for that? And number two, is there any risks in just getting a cheap MicroUSB to Female USB cable from a trusted seller? Like, can it damage any internal parts because of different voltages between devices or something like that? Or is the worst thing that can happen is the cable simply not working?
I'd really appreciate an answer on this one, because USB hosting seems to open up a lot of possibilities with our devices.
The short answer as of right now is NO there aren't any common ways to enable USB Host. With that said, can the Tegra2 chip in the G2x support host mode?...yes. Will it require a custom kernel?...yes. So basically your phone needs to be rooted to say the least and a kernel framework to enable and support it. I'm actually looking into this as we speak but it's looking like it'll be a while.
As for the cable... no most generic micro-USB cable won't work as is. The OTG cables have either a 'grounded' 4th pin or a disconnected 4th in some usb host modes. But either way you either need an OTG cable or if you search online you can find several ways to splice and solder back generic USB.
I have been looking for a while, but there doesn't seem to a custom kernel that supports USB Host mode. I already have USB OTG adapter (mini Male to 4 pin USB female) + arduino board etc.. So are there any custom kernels out there?
oOo B0XeR oOo said:
The short answer as of right now is NO there aren't any common ways to enable USB Host. With that said, can the Tegra2 chip in the G2x support host mode?...yes. Will it require a custom kernel?...yes. So basically your phone needs to be rooted to say the least and a kernel framework to enable and support it. I'm actually looking into this as we speak but it's looking like it'll be a while.
As for the cable... no most generic micro-USB cable won't work as is. The OTG cables have either a 'grounded' 4th pin or a disconnected 4th in some usb host modes. But either way you either need an OTG cable or if you search online you can find several ways to splice and solder back generic USB.
Click to expand...
Click to collapse
this^^^
Nothing had really changed on this front, if you want to use Android as an ardi interface, I'd suggest you grab a cheapo phone that supports it out of the box.
Sent from my LG-P999 using Tapatalk
I bring you back to life!!!
Any update on this? Seems ICS/JB roms are out now... any strides in getting OTG to work? I'm looking to make a G2x into a dedicated TV gamer unit to replace my MK808 and forgot about OTG for my air mouse. I have a Bluetooth mouse to get me by but the airmouse was awesome.
I guess I can look for a Bluetooth airmouse as a last resort.
player911 said:
I bring you back to life!!!
Any update on this? Seems ICS/JB roms are out now... any strides in getting OTG to work? I'm looking to make a G2x into a dedicated TV gamer unit to replace my MK808 and forgot about OTG for my air mouse. I have a Bluetooth mouse to get me by but the airmouse was awesome.
I guess I can look for a Bluetooth airmouse as a last resort.
Click to expand...
Click to collapse
No OTG happiness for the G2X with any ROM and/or Kernel. There is a board from Sparkfun which provides an interface that enables a non-OTG phone to work like one for interfacing to Arduino, etc.
https://www.sparkfun.com/products/10748?
http://forum.xda-developers.com/showpost.php?p=19967110&postcount=8
Does anyone have an idea whether its possible to use MHL + OTG with charging on the Skyrocket? Whether it be stock or an aftermarket rom/kernel doesn't matter. I can't seem to find a definitive answer on this phone, but I'm leaning toward not possible.
This is what I planned on ordering. http://www.amazon.com/gp/product/B009LAZG2M/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1
I would assume since the MHL adapter puts the device in charge mode, it wouldn't read the attached usb device (if using a hub or y adapter) since it is not in Host mode. Any have any experiance with this or have any links they can provide. It would be much appreciated!
kennyry said:
Does anyone have an idea whether its possible to use MHL + OTG with charging on the Skyrocket? Whether it be stock or an aftermarket rom/kernel doesn't matter. I can't seem to find a definitive answer on this phone, but I'm leaning toward not possible.
This is what I planned on ordering. http://www.amazon.com/gp/product/B009LAZG2M/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1
I would assume since the MHL adapter puts the device in charge mode, it wouldn't read the attached usb device (if using a hub or y adapter) since it is not in Host mode. Any have any experiance with this or have any links they can provide. It would be much appreciated!
Click to expand...
Click to collapse
I have the same cable and mhl works as long add the rom supports it. As for your question I found this http://forum.xda-developers.com/showthread.php?t=1741583&page=21 and on the last page there is a link for someone who got it to work on as3 however our phones have different pin configuration but you should be able to do the same thing as him
OTG while using MHL sounds like a great way to fry something important on your phone. it's clear the note 2 had something like this in mind with the smart dock. it looks like the smart dock works with the S3 so it could be that the way they designed the usb port it all just works as needed for this.
I'm interested in the usecase/motivation for doing both at the same time if you don't mind sharing.
lart2150 said:
OTG while using MHL sounds like a great way to fry something important on your phone. it's clear the note 2 had something like this in mind with the smart dock. it looks like the smart dock works with the S3 so it could be that the way they designed the usb port it all just works as needed for this.
I'm interested in the usecase/motivation for doing both at the same time if you don't mind sharing.
Click to expand...
Click to collapse
Well my Skyrocket screen was destroyed by my youngest son So, I had an idea to use the old phone with the MHL adapter to connect to my TV (which is not a smart TV). The need for the OTG is to plug in peripherals such as kb/mouse, but after further review, i could probably just use bluetooth. The device itself doesn't need to have much storage really, all of the movies are being streamed from my mini home server (DLNA).
So instead of going out and spending 60 on a smart TV adapater, I figured I would try to make use of what I already had, a phone with a broken screen. I'm not even sure the digitizer works and I was unable to find a replacement screen a decent price. The phone has already been replaced with a Nexus 4, so I'm not really concerned with the "safety" of the skyrocket.
I think it would be nice to use it as a TV adapter, surf net, play games watch movies while in bed using a wireless mouse/keyboard.
You would think there would already be something like this out there...
I came across this, then noticed their statement "Use Bluetooth keyboard for wireless control" Which really tells me no OTG... and heard was broken ha.
http://www.amazon.com/iBolt-Streamer-MHL-Charging-Dock/dp/tech-data/B0094M3DZY/ref=de_a_smtd
I already found out, that the Moto G supports USB OTG, but would it support USB DAC's (digital-analog audio converter) ? If any Moto G owner owns a USB Dac or atleast something compareable like a USB headset or USB headphones, I'd be really thankfull if you could try it out.
The dac/headset needs to be plugged into the phone using a USB OTG cable.
Thanks!
Sent from my GT-I8160 using xda app-developers app
Works!! BUT:
I hooked an USB-OTG to Moto G, in there a Creative USB Soundcard with analog/digital output. Analog didn't work (must be the soundcard), but digital. I connected the digital out with a light cable to my RME environment and I could hear the music but with wrong frequency and crackled - but it works
Moto G has enough power to let the soundcard work.
[edit]
Hooked another soundcard in, this time analog works but wrong sample frequency and oversaturated, no option to control the volume.
Wow! This phone seems to be even more incredible value than I ever thought.
The problems that you mention sound pretty weird, though. The first thing that I'd suspect is the lack of special drivers for the soundcards on the Moto g. Maybe a simple DAC that doesn't need any special drivers would work better.
In fact, stock androids rarely work with any USB audio devices. But there's a app that includes special drivers and makes most USB-OTG enabled droids work with USB audio devices. You can the trial version (link in the description of the app) of it if you like:
https://play.google.com/store/apps/...=organic&utm_term=usb+audio+recorder+pro+demo
Be aware that the trial only works for 15 minutes and it doesn't play the usual audio formats. ( .flac works) If you try it, you should put a flac on the phone before installing the app.
Oh, and who knows how well this might work when CM and KitKat arrive!
Thanks a lot for your help.
Sent from my GT-I8160 using xda app-developers app
With the app it works, without stuttering and you can control the output volume, although there was an error warning at startup regarding main volume
I tried to record something, but hadn't enough time. First try was unsuccessful unfortunately.
shaftenberg said:
With the app it works, without stuttering and you can control the output volume, although there was an error warning at startup regarding main volume
I tried to record something, but hadn't enough time. First try was unsuccessful unfortunately.
Click to expand...
Click to collapse
Well, that's nice to hear. Maybe some Custom ROMs (Cyanogenmod in particular) will have better support for this without the app.
Anyway, I think I'm going to get this phone (Christmas is coming ). Usb audio support (atleast with the app) is crucial for me, so thanks for reporting that it works.:good:
One last thing though, what make and model were the two soundcards that you used for testing?
UnknownAX said:
One last thing though, what make and model were the two soundcards that you used for testing?
Click to expand...
Click to collapse
First a cheap Creative USB Soundcard, second a DJ-Audio-Player from EKS (www.eks.fi) which has its own soundcard per player.
Could you test this on the faux kernel that your running atm, Shaftenberg?
Most people who have tried it on the stock ROM have experienced the same glitches that you mentioned in your first post. On the other hand, there's also one report of it working fine, with the Google music player. The DAC is probably the biggest factor.
Anyway, I'm just waiting for the 16gb version to be available....
I tried 2 DACs. One was a CEntrance DACport LX flashed with the iPad firmware, and the other was a cheap off-brand thing (ELE EL-D01 on eBay). Both of them "worked", but I encountered the same issue with each: I tested both by playing a Youtube video, and the audio was not playing back at the proper sampling rate. The audio was slightly slowed down... as a result, pitches were slightly lower, and the audio lagged behind the video pretty significantly. If I had to guess, the audio was 48kHz, and Android was trying to play it back at 44.1kHz without resampling it first.
Why it was doing this, I have no idea: on a Nexus 4 running stock Jellybean with jacknorris' patch (which, AFAIK, doesn't pay attention to sampling rates but just assumes Android will handle that properly elsewhere), this works perfectly. However, it was fascinating/encouraging to see this work at all on the Moto G: it means that with stock firmware, not only does OTG/USB host mode work, and not only does the kernel have the stock Linux USB DAC driver compiled in, but the Android framework itself attempts to use the DAC, which is *definitely* not true with plain-jane AOSP.
One thing I was sad to see (which also seems to be true of a LOT of other Android phones that support OTG out-of-the-box) is that if I injected 5V from an external source into the USB power lines, the phone would NOT charge as long as OTG mode was engaged. Which means that, at least with the stock Moto G firmware, you can't both be in USB host most *and* be charging the battery at the same time. (Interestingly, the very first time you plug the power in, the phone says "charging", but it's quickly obvious it isn't. If you unplug and re-plug the power in after that, it will not show the lightning symbol on the battery any longer until you reboot the phone. Normal USB chargers continue to work without the OTG cable without requiring a reboot.)
-- Nathan
nlra said:
If I had to guess, the audio was 48kHz, and Android was trying to play it back at 44.1kHz without resampling it first.
Click to expand...
Click to collapse
That makes sense to me. But what would happen if we played a 44.1kHz track? It wouldn't have to resample then, would it?
Maybe that's why there is a report of it working with google music player...maybe he just happened to try it with a 44.1kHz track?
I'm pretty sure this will/can be fixed with a ROM / Kernel. Like USB OTG charging, it's just a matter of time (I hope). Both things have already been successfully enabled on many different devices.
Thanks for the info, luckily I'm not the only one showing interest in this.
It most definitely works with my Moto G and my FiiO E17 (connected via a generic OTG cable)
Trouble is, although it ALMOST worked, I got sporadic but impossible to listen to skipping/stuttering when using Poweramp or the native Google player app.
I finally found an app made by the same people who do the USB Audio Recorder Pro as mentioned by the poster, called USB Audio Player Pro (can't post the link, being a new poster, but a quick search for "USB audio player" gets to it)
...it costs over 5 pounds, and to be frank it is not the world's prettiest or richly featured player, but it certainly works and the output sound is great.
Anyway, just posting to let you know that it works, at least with my Fiio E17.
So here's some good news: after applying the official KitKat 4.4.2 OTA, OTG still works, USB DAC support still exists, and now it even works properly, at least for me! No more strange audio sampling issues: I could attach either one of my DACs and play the same Youtube clip without any difficulty! Audio was perfectly in-sync with the video.
-- Nathan
Did anyone manage to get USB audio to work with the Moto G play edition?
Has anybody found a way to enable OTG and charging at the same time? I genuinely enjoy listening to Moto G + FiiO E17 but it leaves me with low battery on the way home which is rather frustrating and makes me to swap charger/DAC during the day.
I don't mind putting unofficial ROM in as long as it doesn't require hardware mods.
jjacks said:
Has anybody found a way to enable OTG and charging at the same time? I genuinely enjoy listening to Moto G + FiiO E17 but it leaves me with low battery on the way home which is rather frustrating and makes me to swap charger/DAC during the day.
I don't mind putting unofficial ROM in as long as it doesn't require hardware mods.
Click to expand...
Click to collapse
I have taken ziddey's USB OTG kernel patch for the Nexus 4, which allows both for charging as well as USB OTG mode without an actual OTG cable, and I have compiled a new kernel for the stock Moto G 4.4.2 ROM, and it works great! The only thing is that you have to use a non-OTG cable...if it detects the OTG cable it will shut off the charging. So you will need a USB Y cable to inject a 5V power source to both your DAC and phone, and plug the phone into the Y cable using a standard micro-USB cable instead of an OTG cable.
If people are interested in this kernel, I can post it. You will need to unlock your bootloader to flash it.
-- Nathan
That is interesting. I would be happy to flash it. Is it safe operation? I flashed multiple windows mobile / windows phone devices but no experience with Android mods yet. Any downsides of custom kernel?
jjacks said:
That is interesting. I would be happy to flash it. Is it safe operation? I flashed multiple windows mobile / windows phone devices but no experience with Android mods yet. Any downsides of custom kernel?
Click to expand...
Click to collapse
You should read some of the other threads on how to unlock your Moto G bootloader and how to flash stock ROMs back, at the very least, before applying mine. I can't educate you on these matters here and there are other threads more appropriate for those discussions. Then take that knowledge and apply it to this. In this case, as long as you are using a stock Motorola ROM already (and not a GPE ROM!), you only need to flash one component: the kernel.
This kernel is completely identical to the stock Motorola kernel in every way except that it has ziddey's patch applied. So the only downsides would be:
1) because you have to unlock the bootloader, if you live in the U.S. at least, Motorola can legally void your hardware warranty, even if you have a hardware failure that cannot be linked to your unlocking of the bootloader. (Other countries' laws are different and Motorola may not be legally allowed to void warranties for bootloader unlocks where you are at.)
2) If an OTA update is pushed to your phone, I believe the kernel will be replaced with a stock one again, and this will stop working. Either that, or because you are running a custom kernel or an unlocked bootloader, perhaps OTAs won't be pushed to your phone, or if they are, they might not install. I have not tested this or read up on this myself as I generally detest OTA updates outside of my control, and prefer to flash my devices myself on my terms when I'm ready to do so.
You can read about ziddey's USB OTG patches that he developed (with the help/inspiration of CaptainMuon) here: http://forum.xda-developers.com/nexus-4/orig-development/usb-otg-externally-powered-usb-otg-t2181820
The only real difference between how this works on the Nexus 4 and how this works on the Moto G is that, as I explained previously, on the Moto G, there is something in hardware that prevents the phone from accepting a charge if it detects that you are using an OTG micro-USB cable, whereas the Nexus 4 doesn't care if you use an OTG cable or not because pin 5 on the Nexus 4 is not actually wired to anything internally. On the Moto G, there is even a slight cosmetic quirk: if you try to inject 5V power to the phone through an OTG cable, the first time that you plug it in after a fresh reboot, it will say that it is charging after you plug the cable in, but it actually isn't (battery will continue to deplete). And if you unplug the cable and plug it back in, it will no longer show the "charging" symbol, until you reboot the phone again. If you plug in a regular micro-USB cable, though, it will both show charging as well as actually take a charge.
Another thing to be aware of is that there are two different releases of KitKat 4.4.2 that Motorola has released for the G (they released an updated 4.4.2 ROM that fixed a couple of bugs after its initial release), but as far as I can tell, they have so far only released the kernel sources for the original 4.4.2 ROM and not the updated one. So I have only managed to build a kernel for the original 4.4.2 update for the Moto G. I have not tested this, but it's *possible* that this kernel will work just fine with the later 4.4.2 ROM. You are welcome to try it; you won't harm your phone by doing so and can always flash the factory kernel back if it doesn't work or has problems. This kernel likely won't work with any 3rd-party ROMs or with the Google Play Edition ROM (which doesn't support USB DACs anyway, sooo no point in using that one, at least if you care about USB audio which you obviously do). Motorola has not released any kernel sources for 4.4.3 or 4.4.4 yet either, so you should stick with 4.4.2 for now. If this kernel does not work with the later 4.4.2 release, then you should be able to downgrade your system image to the older 4.4.2 ROM and use this kernel with that.
The two 4.4.2 releases on the Moto G (excluding the GPE ROM) are marked by their kernel versions. The first 4.4.2 kernel is versioned as KXB20.9-1.8-1.4, and corresponds to the U.S. retail 172.44.4 ROM version, among others internationally. The second 4.4.2 kernel is versioned as KXB20.9-1.10-1.24-1.1, and corresponds to the U.S. retail 174.44.1 ROM version, among others internationally. It is the source for the first kernel that I have access to.
You may download my kernel from here: http://www.nconx.com/~nathan/motog/boot_motog_KXB20.9-1.8-1.4_OTG_charge.img
After you have unlocked the bootloader via Motorola's site and mfastboot, enter Fastboot mode on your phone again, and then flash the kernel to the phone with mfastboot (the Motorola version of fastboot) the same way that you would flash a stock Motorola kernel (see this post, step 3b: http://forum.xda-developers.com/showthread.php?t=2542219), but substituting in the file name of my kernel instead:
Code:
mfastboot flash boot boot_motog_KXB20.9-1.8-1.4_OTG_charge.img
Reboot your phone, plug it into your DAC + 5V power source (again, using a normal micro-USB cable), and enjoy battery charging while simultaneously connected up to your external DAC.
Good luck,
-- Nathan
Great. Thanks a lot. I will give it a try when I find some spare time
My Moto G works with Creative X-FI DAC
My Moto G runs Kitkat.
OTG cable is connected between Creative X-FI Dac and Moto G. Then Creative device's optical output is fed to the Logitech speaker with optical input. Sound with this setup is much better and awesome.
My Moto G Works w/ Fiio E07K
Running Android 4.4.4
Moto G (LTE) > USB OTG cable > Fiio E07K USB Cable > Fiio E07K > headphones
:victory:
nlra said:
I have taken ziddey's USB OTG kernel patch for the Nexus 4, which allows both for charging as well as USB OTG mode without an actual OTG cable, and I have compiled a new kernel for the stock Moto G 4.4.2 ROM, and it works great! The only thing is that you have to use a non-OTG cable...if it detects the OTG cable it will shut off the charging. So you will need a USB Y cable to inject a 5V power source to both your DAC and phone, and plug the phone into the Y cable using a standard micro-USB cable instead of an OTG cable.
If people are interested in this kernel, I can post it. You will need to unlock your bootloader to flash it.
-- Nathan
Click to expand...
Click to collapse
Would you be interested in building a compatible kernel for 4.4.4? Is the source available? My Moto G is brand new pre-installed with 4.4.4. so no option to use your 4.4.2 kernel. I would really appreciate the help - I have a project that requires me to be able to charge and host simultaneously.
Also, I'm fine with flashing an alternate ROM with source available, such as CyanogenMod -- anything to get OTG + Charging working. Any advice is appreciated.
Thanks,
samwathegreat