Jump to content

(Request) USB OTG 2.6.35


Guest memedroid123

Recommended Posts

Guest Sulthekk

It's been done once for gingerbread by someone called 'johnsmithx', but he didn't release the source for it, and later he just deleted the published binary too. Tomm13b had also done some OTG experiments with an earlier .32 kernel, but this version had problems with wifi-keepalive.

Link to comment
Share on other sites

Guest matcho13579

There were some problems with deep sleep in .35 (at least I had that problems - he was telling me he had no problems at all), I was testing his kernel builds, but... he just disappears, don't know why

Link to comment
Share on other sites

Guest ontherocks

As I know, USB OTG is supported from Android 3.1 onwards. So, will installing a ICS or JB ROM make it work in Blade?

Edited by ontherocks
Link to comment
Share on other sites

  • 4 weeks later...
Guest ontherocks

I understand that if OTG was possible it would have been available........obviously

Still I am confused.

Say for example the latest CyanogenMod ROMs that are ported to Blade were for devices that have OTG support.....am I right?

If so, while porting do people disable it in kernel?

Edited by ontherocks
Link to comment
Share on other sites

Guest Sulthekk

It's disabled in the kernel for power saving as far as I can remember, because it makes the device unable to sleep properly - that was the (stated I haven't tried it myself) difference with johnsmithx's kernel, as was capable of OTG with proper deepsleep support. Btw, for OTG with the Blade you would need a special Y-shaped USB cable and a power supply anyway, because the phone doesn't give enough power to most USB devices.

Link to comment
Share on other sites

Guest matcho13579

It's disabled in the kernel for power saving as far as I can remember, because it makes the device unable to sleep properly - that was the (stated I haven't tried it myself) difference with johnsmithx's kernel, as was capable of OTG with proper deepsleep support. Btw, for OTG with the Blade you would need a special Y-shaped USB cable and a power supply anyway, because the phone doesn't give enough power to most USB devices.

Exactly like on my SGS 1, you can easily buy Y-shaped USB cable on eBay or Dealextreme...also, there's no problem to buy an USB charger and you're good to go ;)

Link to comment
Share on other sites

Guest ontherocks

Btw, for OTG with the Blade you would need a special Y-shaped USB cable and a power supply anyway, because the phone doesn't give enough power to most USB devices.

Exactly like on my SGS 1, you can easily buy Y-shaped USB cable on eBay or Dealextreme...also, there's no problem to buy an USB charger and you're good to go ;)

Which one of the two cables below are you guys talking about? Or is it something else?

oqTBIXD.png

QJWOt23.png

Link to comment
Share on other sites

Guest sugotron

Thanks for the reply matcho13579, have been looking around in the old forum threads but can't find any download links that work (files have been removed from dropbox etc). Starting to feel a bit hopeless :(

Link to comment
Share on other sites

Guest Sulthekk

If you search for 'experiental cm7 kernel', there should be at least one cm7 (gingerbread) kernel that supports it, but it's quite old and is still 2.6.32.

I think however, that there was a link to it's dource, maybe with some tinkering the patches could be applied relatively seamlessly to the latest cm7 kernel. I'm not sure if it would any harder with 4.X, because there were a lot of kernel updates, and I'm pretty sure they affected USB, at least because of tethering.

Link to comment
Share on other sites

Guest sugotron

Hi Sulthekk - i searched for it and found the thread, but all the dropbox links are dead. Would be great if someone found an old flashable version with OTG support, otherwise the only option is probably to try and locate the original source for the versions released by johnsmithx and t0mm13b and learn to compile everything myself...

Thanks for helping though

Edited by sugotron
Link to comment
Share on other sites

Guest Sulthekk

Just checked out KonstaT's current kernel sources, and there seems to be a config option for USB host/otg mode for quallcomm devices out of the box. I am not sure if it's working and/or it's safe to use, but I think there was a bricked phone at the thread you found, so we should be careful there. I have no proper cable near me to test (all our usb cables are plugged in somewhere), but I could build the kernel image for you, although I won't take any responsibility if you brick your blade with it. I think you also need to modify the Y-shaped cable so on one end only 2 pins are connected, but I can't clearly remember whether it's the data or electricity pins (the info should be somewhere in one of the old OTG topics though).

Are you sure that OTG mode is worth the risk?

Also please note that OTG haven't been tested on the Blade for quite a while, even if it worked, I have no idea if it has any stability/usability/performance impacts, I can only assume that your phone may become unable to sleep properly.

Edited by Sulthekk
Link to comment
Share on other sites

Guest sugotron

That is really, really nice of you. I would be totally ok with the bricking risk, I have two blades that are no longer in use - one with a cracked screen.

The reason why I am so keen on this is that I want to hook the blade up to an arduino with some sensors, and leave it in my family's summer house over winter - to keep an eye on the temperature and play music when the mice are dancing. I know there are other connectivity options - actually got the blade to talk to the arduino using a 'host shield' over the weekend (through ADB, not Googles ADK), but it is not a straight-forward solution. Going to try a Bluetooth module as well, but would much prefer to use USB OTG. Currently using a Xperia Z for the project, where OTG works really well, but don't want to leave that in an abandoned house for half the year.

Ordered a Y-cable form eBay, but as the arduino has its own power supply it might work anyway.

Edited by sugotron
Link to comment
Share on other sites

Guest Sulthekk

Okay, then I will try to do the compile with that kernel config enabled, although I'm not sure if any drivers are needed or not for your use case, but since you already got it working with another device I assume you already know how to sort it out.

Link to comment
Share on other sites

Guest Sulthekk

Okay, it seems like the current kernel sources fail to compile with OTG enabled, but it seems to be just a few missing prototypes until now, so nothing too hard. I guess it's a remaining piece of mess from the original zte code release, layed hidden in unused ifdefs.

P.S: I have been too optimistic. The first error was indeed a missing a prototype, but now I just can't sort out that 'undefined reference' in a way that doesn't involve ugly things like copy from header and paste into c file. I will try collect some outputs and post it there, because I'm no C jedi, and I ran out of ideas after spending hours googling the issue. I am however, now more interested in it than ever, so I guess I won't be sleeping well unless I sort it out. :(

Edited by Sulthekk
Link to comment
Share on other sites

Guest Sulthekk

Output and changes

 

I *think* that although by adding an ld parameter I could get it working in case of the first object, the problem itself is very similar in case of notify.o

 

It fails because of that 'undefined reference' in the paste, but usbfs_mutex is declared in usb.h of the very same directory, and is included with

#include "usb.h"

In case of msm72k_otg.o, the problem was the very same, as it got the same error with two methods declared in include/linux/usb.h, included with

#include <linux/usb.h>

Although I was able to continue compiling by adding notify.o as an input parameter of ld.

But in case of notify.o, I have no idea what could I do to fix it (apart from the ugly copying of the contents of usb.h instead of including it, which in theory does the same). The preprocessor doesn't give a warning, it only fails at linking.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.