• Announcements

    • Reminder - MoDaCo position on illegal content

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such software
      Nintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)


      CUSTOM ROMS

      You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not be hosted directly in topic via the MoDaCo attachment system
      ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)
      ROMs must give full credit to the original author
      This decision has been taken in light of the huge amount of interest in this area of device customisation within the community, and member feedback! Please note that custom ROM discussion should be kept in specific device sub-areas, (e.g. Kaiser.MoDaCo.com for Kaiser based devices). ISSUES If you have any issues with this policy, please contact me directly via PM. P
    • Support MoDaCo by signing up to a MoDaCo Silver or Gold membership

      To sign up to an annual MoDaCo Silver subscription which will eliminate all ads from the site (as well as giving you access to the MoDaCo Online Kitchens for Android) for only £9.99 using PayPal, Credit or Debit Card, ensure you are logged in to the site, and then click the link below, which will take you directly to the subscription store! You can also sign up to an annual MoDaCo Gold subscription for £29.99, which adds the benefits listed below! PURCHASE A MODACO SUBSCRIPTION - FREE Titanium Backup Mobile for Android worth $5.99! - FREE 1 year PrivateInternetAccess.com worth $39.95! - FREE 1 year LastPass Premium worth $12! - FREE CalcConvert for Pocket PC from Binaryfish worth $17.95! - FREE Calendar Bar for Pocket PC from OmegaOne worth $9.99! - FREE CamerAware for Pocket PC and Smartphone from MoDaCo worth £19.99 / $30! - FREE Chronos for Pocket PC from ActiveKitten worth $14.95! - FREE CodeWallet Pro for Smartphone and Pocket PC from DeveloperOne worth up to $24.95! - FREE Concentrix for Pocket PC from eSoft Interactive worth $9.95! - FREE FlexMail for Pocket PC and Smartphone from WebIS worth up to $59.90! - FREE FTouchSL for Pocket PC from Vekoff s.r.o. worth 10 euro / $12.50! - FREE Jewel Challenge for Pocket PC from eSoft Interactive worth $9.95! - FREE John Cody's Alerts Pro for Smartphone from Omnisoft worth $14.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Dutch for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> French for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> German for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Italian for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Spanish for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Dutch for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> French for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> German for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Russian for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Turkish for Smartphone from Lingvosoft worth $49.95! - FREE Note2Self for Pocket PC and Smartphone from WebIS worth up to $19.90! - FREE Opera 8.60 for Pocket PC and Smartphone from Opera Software worth up to $48! - FREE Pocket Informant for Pocket PC and Smartphone from WebIS worth up to $59.90! - FREE Pocket Launcher for Pocket PC and Smartphone from Conduits worth $9.95! - FREE PTab for Pocket PC and Smartphone from z4soft worth up to $60! - FREE Resco Explorer for Pocket PC and Smartphone from Resco worth up to $49.90! - FREE Safemode for Pocket PC from monocube worth $12.95 - FREE SplashPhoto for Pocket PC and Smartphone from SplashData worth up to $59.90! - FREE Sprite Backup for Pocket PC and Smartphone from Sprite Software worth $29.95! - FREE Teksoft Glyphs UI for Pocket PC and Smartphone from Teksoft €9.95! - FREE Teksoft HeadsetRemote for Pocket PC and Smartphone from Teksoft €4.95! - FREE Traffic Jam for Pocket PC from eSoft Interactive worth $9.95! - FREE unlock (1 per year) from imei-check.co.uk - DISCOUNT of 10% at MoDaCo FairDeal - DISCOUNT of 10% at Semsons.com - FORUM - AD FREE SITE - FORUM - custom rank / title - FORUM - double competition entries - FORUM - double post attachment space - FORUM - no search flood control - FORUM - priority event registration - FORUM - triple PM space
    • Reminder: Selling items on the forum directly is not allowed

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspensions / ban.

External USB Devices

41 posts in this topic

Posted (edited) · Report post

I have started an attempt to connect external USB devices to the V9 and had some success. There are still some issues and I hope someone with more Android/Linux experience can help to resolve them.

The story so far is

  • I recompiled the kernel (pulled from Kallt_Kaffe's github) with USB host/OTG support, flashed on the V9 with no problems
  • It will not work with non-powered USB devices, looks like the V9 is not supplying power to the micro USB port
  • If I plugged a powered device in after booting, the V9 reboots
  • I need to connect a powered USB hub (I guess any powered USB devices will do) and restart the V9 for it to use any of the devices plugged into the hub. So far USB flash stick, USB hard disk mouse, and keyboard worked.
  • I used the Q5_USB_Memory_Manager.apk to mount USB disks. It works with FAT32 drives. To mount NTFS drive, i need to mount it in terminal (and I can use an USB keyborad to type) because the umask wasn't set correctly by the app.
  • I also have the Huawei S7 (a similar grade device), Other than the NTFS mounting issue, it does not have the other problems.

Any help or suggestions will be much appreciated.

Edit: Now, I can use a powered device without re-starting the tab. All I have to do is to plug the hub in first and then supply power to the hub. Main hurdle now is how to get the V9 to supply power to the USB devices.

Edited by forforum
2

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Nice to hear. I really want to test this out

So.. are you going to post the modified files?

Edited by solidtudor
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Nice to hear. I really want to test this out

So.. are you going to post the modified files?

I was trying to sort out the power issue first. I still have intermittent reboot problem when plugging power into the USB hub. You are welcome to try, but, I am not responsible for any problem this kernel may cause. To be safe, i would recommend you to plug the USB hub with power prior to power on the tab. Of course, you will need an OTG cable to connect the USB hub to the tab.

The kernel is based on Kallt_Kaffe's kernel source as at 17/7/2011, therefore, you must have his CM7 20110711 or later installed for this to work. You should have clock work recovery (4.0.0.8 or later) installed and KK's latest kernel on your SD card, in case you need to load KK's original kernel. Thanks to KK for his work and his help when I started on this.

The kernel install file is here.

You can find Q5 USB Memory Manger here.

To use the mouse

left click - press the screen

right click - back button

middle click - menu button

scroll wheel - up/down button

Enjoy!

Edited by forforum
0

Share this post


Link to post
Share on other sites

Posted · Report post

I was trying to sort out the power issue first. I still have intermittent reboot problem when plugging power into the USB hub. You are welcome to try, but, I am not responsible for any problem this kernel may cause. To be safe, i would recommend you to plug the USB hub with power prior to power on the tab. Of course, you will need an OTG cable to connect the USB hub to the tab.

The kernel is based on Kallt_Kaffe's kernel source as at 17/7/2011, therefore, you must have his CM7 20110711 or later installed for this to work. You should have clock work recovery (4.0.0.8 or later) installed and KK's latest kernel on your SD card, in case you need to load KK's original kernel. Thanks to KK for his work and his help when I started on this.

The kernel install file is here.

You can find Q5 USB Memory Manger here.

To use the mouse

left click - press the screen

right click - back button

middle click - menu button

scroll wheel - up/down button

Enjoy!

Thanks foforum! I installed the modified kernel files without any problem. As you said, the device reboots when plugging power into the USB hub..

I will try my USB mouse and USB memory when I get time to do that, thanks again foforum I've been waiting long time for thiscool.gif

0

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks for working on this. I just bought a battery powered USB hub (http://www.dealextreme.com/p/cable-style-dual-power-1000ma-usb-2-0-4-port-hub-13526 and an external battery) in addition to a host cable (http://cgi.ebay.com/Micro-USB-Host-Cable-MID-OTG-Left-Angled-/130543361525?pt=LH_DefaultDomain_0&hash=item1e64fd9df5) in case you don't get power-out working.

0

Share this post


Link to post
Share on other sites

Posted · Report post

I have started an attempt to connect external USB devices to the V9 and had some success. There are still some issues and I hope someone with more Android/Linux experience can help to resolve them

I've now bought two different OTG adapters and a powered USB hub and I will start experiment with USB host mode when time allows.

Would you mind sharing the source files on what you've done so far?

EDIT: Nevermind. Just realized our source has what is needed allready and borrowed the config from your kernel... Looking good so far. :)

0

Share this post


Link to post
Share on other sites

Posted · Report post

Edit: Now, I can use a powered device without re-starting the tab. All I have to do is to plug the hub in first and then supply power to the hub. Main hurdle now is how to get the V9 to supply power to the USB devices.

I used your config on the latest kernel source and it works without reboots for me. There was an usb rebooting issue on the ZTE Blade that Tom solved by removed some cdrom emulation code and I added those change to the kernel repo 2011-07-15. It's possible that those changes fixed this issue.
0

Share this post


Link to post
Share on other sites

Posted · Report post

I used your config on the latest kernel source and it works without reboots for me. There was an usb rebooting issue on the ZTE Blade that Tom solved by removed some cdrom emulation code and I added those change to the kernel repo 2011-07-15. It's possible that those changes fixed this issue.

You are right, the v9 kernel has built in otg support. The config file I used basically is borrowed from the Huawei S7. You may also noticed that I leave most of the driver in the kernel rather than compile them as modules, this was just for quick upload of the kernel for testing. At 4MB, it is a bit big.

I've been comparing the otg driver (msm72kotg.c) sources between the V9, the Blade and Huawei S7 to try to work out how the various bits work. My kernel hacking skill is very basic at best. So far, the changes I made did not make improve the situation a lot. The blade otg driver also works with the v9, no rebooting problem, but, you lost the USB peripheral mode. I haven't try your 2011-7-15 kernel, so not too sure whether it has the same issue. Hope you can work it out.

0

Share this post


Link to post
Share on other sites

Posted · Report post

I've only tested (and only added support for) usb hid and storage support and seems to work fine. The keyboard layout is US (or perhaps GB) but other than that it works as it should. I also tested to mount an USB flash drive.

Sometimes the tablet freezes when I insert the USB HUB or a device to the HUB but disconnecting and reconnecting usually helps. No reboots so far. The batterymeter got pretty much badword up once and claimed it only had 1% battery left (which wasn't true) and not even a restart resolved it so I was a bit worried that I had fried something but removing the battery and then booting into clockwork to wipe batterystats seems to have resolved it.

Any suggested uses for this other than storage and mouse/keyboard? What are you using on your tablets?

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Sometimes the tablet freezes when I insert the USB HUB or a device to the HUB but disconnecting and reconnecting usually helps. No reboots so far. The batterymeter got pretty much badword up once and claimed it only had 1% battery left (which wasn't true) and not even a restart resolved it so I was a bit worried that I had fried something but removing the battery and then booting into clockwork to wipe batterystats seems to have resolved it.

I do not have battery issues. Actually, the powered hub charges the V9! I read that some powered hub does not pass power back to the host, may be that's why you did not have the rebooting issue. Can you check whether yours does? When I get a chance, I may disable the power from the USB A cable to see if I can duplicate your results. Also, do you have the peripheral mode back once you unplug the OTG cable?

Any suggested uses for this other than storage and mouse/keyboard? What are you using on your tablets?

As you know, the sound output of the V9 leaves a lot to be desired, the other thing I was trying to get working is USB sound. I have a Creative USB sound card, it half worked. The control knob on the sound card controls the volume of the V9, but, sound still comes out of the 3.5mm jack. May be the standard class 1 sound driver is not compatible or may be it is not possible. I've been busy lately with work and haven't look at it again.

The V9 is essentially a toy, to learn more about Android. Does get a bit of use when I am out and about or lying in bed, GPS, RDP, email, video, web browsing etc.

Edit: Un-soldered the power from the USB A side of the hub, and the V9 is not restarting when plugging and unpluging t he hub. But, the V9 won't be charged anymore! May be it is better to have the charging facility?

Edited by forforum
0

Share this post


Link to post
Share on other sites

Posted · Report post

I do not have battery issues. Actually, the powered hub charges the V9! I read that some powered hub does not pass power back to the host, may be that's why you did not have the rebooting issue. Can you check whether yours does? When I get a chance, I may disable the power from the USB A cable to see if I can duplicate your results. Also, do you have the peripheral mode back once you unplug the OTG cable?

Yes, my HUB does not power the tablet. Found a USB harddisk cable with an extra USB connect (for extra power) that I was able to use to get it to charge the tablet and with this I get reboots on connect too.

And yes, when I unplug the cable it switches back to peripheral mode automaticly.

As you know, the sound output of the V9 leaves a lot to be desired, the other thing I was trying to get working is USB sound. I have a Creative USB sound card, it half worked. The control knob on the sound card controls the volume of the V9, but, sound still comes out of the 3.5mm jack. May be the standard class 1 sound driver is not compatible or may be it is not possible. I've been busy lately with work and haven't look at it again.
The control knob propably uses USB HID but I doubt Android supports USB Audio out-of-the-box. That would propably need some tweaking in the audio libs.

But yes, the internal speakers are painfully bad. I bought a Creative D80 (BT speaker) and while the D80 likely isn't the best BT speaker it sure beats using the internal sound.

EDIT: I've managed to get USB disks to automount by looking at how it is setup for the Nook Color and the Advent Vega in CM7. Only tried with FAT32 so far. Going to compile a flash disk with NTFS and try that too.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Yes, my HUB does not power the tablet. Found a USB harddisk cable with an extra USB connect (for extra power) that I was able to use to get it to charge the tablet and with this I get reboots on connect too.

May be you can replace the msm72k_otg.c with the one from blade, it stops the reboot, but, I seemed to have lost peripheral mode. In the V9 driver, it handles the connection differently to the blade and those mods were done only late last year. May be you can look at the few routines at the end of the driver source to see if you can tweak it.

EDIT: I've managed to get USB disks to automount by looking at how it is setup for the Nook Color and the Advent Vega in CM7. Only tried with FAT32 so far. Going to compile a flash disk with NTFS and try that too.

When you mount ntfs, make sure you use the -o umask=000 option, otherwise, you can only see the files in terminal with su. File explorers won't see the disk without that option.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Here's what I'm using right now: http://www.mediafire...cmy93ncr4no9fso

This is a complete CM7 install as it has changes also to vold.fstab, init.v9.rc and build.prop.

USB disks (FAT) are automaticly mounted to /mnt/usbdisk. They can also be safely unmounted in Settings->Storage.

USB-storage and HID support are compiled into the kernel. NTFS is also supported by the kernel but not by vold.

EDIT: Attached a vold where I've added support for automounting NTFS. Just replace /system/bin/vold with the new version.

vold.zip

0

Share this post


Link to post
Share on other sites

Posted · Report post

New version using the new vold (se above) and also codepage i kernel has been changed to UTF8 (fixes swedish character problems with both NTFS and also CIFS mounts for me, not sure if it messes up something else for others?)

http://www.mediafire.com/?4v7mcdgjb5bfqy7

0

Share this post


Link to post
Share on other sites

Posted · Report post

New version using the new vold (se above) and also codepage i kernel has been changed to UTF8 (fixes swedish character problems with both NTFS and also CIFS mounts for me, not sure if it messes up something else for others?)

http://www.mediafire...4v7mcdgjb5bfqy7

Fantastic, will give it a try tonight..

BTW, is this kernel still having the reboot problem when plugging in a powered hub?

0

Share this post


Link to post
Share on other sites

Posted · Report post

BTW, is this kernel still having the reboot problem when plugging in a powered hub?

Yes it still does that, haven't changed anything except the kernel config so far. It also seems to freeze when recovering from suspend. A workaround is to go into the development settings and check "always on" to make sure it doesn't go into sleep while recieving power.

Btw, your Huawei S7, does it provide power through the USB-port. In other words, can it use USB devices directly without using a self-powered HUB?

0

Share this post


Link to post
Share on other sites

Posted · Report post

Yes it still does that, haven't changed anything except the kernel config so far. It also seems to freeze when recovering from suspend. A workaround is to go into the development settings and check "always on" to make sure it doesn't go into sleep while recieving power.

Btw, your Huawei S7, does it provide power through the USB-port. In other words, can it use USB devices directly without using a self-powered HUB?

I noticed that too, if you have devices connected, it freezes everynow and then if the device goes to sleep. Please try the ZTE Blade msm72k_otg.c from here. It fixes reboot and freeze problems for me, but as I said before, I lost peripherals mode completely. Here is the compiled kernel based on your latest kernel soruce I always make sure I have your standard kernel on my SD card to recover from.

The Huawei S7 supplies enough power to drive keyboard, mouse and USB sticks. USB hard disks need to be powered. I think the OTG spec says power out should be between 8MA and 100MA. The difference between the Huawei S7 and the ZTE V9 is that the S7 has a dedicated charge port (a 2.5mm jack), therefore it can safely supply power to micro USB port when host mode is enabled. At the moment, my S7 is mounted in my car, I can play media easily by plugging in a FAT formatted USB stick.

0

Share this post


Link to post
Share on other sites

Posted · Report post

The freezing after suspend is propably the biggest show-stopper right now. I'll do some source comparing to see what I can find. One solution could be to add a wakelock when it switches to OTG mode to prevent it from going to sleep when host mode is active.

I've posted the NTFS vold patch up for review here: http://review.cyanogenmod.com/#change,7457

0

Share this post


Link to post
Share on other sites

Posted · Report post

But yes, the internal speakers are painfully bad. I bought a Creative D80 (BT speaker) and while the D80 likely isn't the best BT speaker it sure beats using the internal sound.

Just a quick note for the those in Australia (where most MyTab owners will be). Aldi will be doing the Creative Bluetooth Speaker (D100 I think) for $49.99 next Thursday. Seems like a good price in comparison with other Oz prices for the unit.

http://www.aldi.com.au/au/html/offers/2827_18836.htm

I now return you to your regularly scheduled ROM hacking discussions...

0

Share this post


Link to post
Share on other sites

Posted · Report post

I noticed that too, if you have devices connected, it freezes everynow and then if the device goes to sleep. Please try the ZTE Blade msm72k_otg.c from here.

Reboot problem seems to be fixed (mostly) by using that version, however the suspend problem remained but I added a wake lock to prevent suspend when in host mode and it seems to do the trick.

I did not lose peripheral mode using the older msms72k_otg.c. It still happily accepts adb and usb mounting through normal USB connection if I switch cables.

I'll compile a new, complete, cm7 with the new changes for you to try.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Please try this build: http://www.mediafire...c7mht854v79l08t

I very seldoms reboot when inserting cable and suspend problems should be gone (as it doesn't enter suspend while in usb host mode).

For me the USB peripheral mode is still working fine when I switch cables.

Let me know how it works for you.

EDIT: With lockscreen enabled the UI still freezes on suspend/resume although it should be possible for it to suspend. It seems it is just the UI that freezes (adb still works) so maybe it has something to do with having a mouse attached. I'l try with just an flash disk to see if it changes it's behaviour.

0

Share this post


Link to post
Share on other sites

Posted · Report post

It seems the UI freezes happens only when mouse is attached and only in portrait mode. Doesn't matter if lockscreen is enabled or not but since the lockscreen forces portrait it triggers the bug.

USB Storage and USB Keyboard doesn't cause this. Propably a bug in the input system.

So basicly, it works quite OK right now apart from the mouse-ui-freeze-thing.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Here's the latest version (without the not needed wakelock): http://www.mediafire...k5y6l08ynq0rnbh

WOW, you've been working hard!!

Installed the 2011-08-19 built, works fine. Peripheral mode works. However, OTG mode sometimes doesn't come on. Plug in hub first and then power helps, as you said in the Swedish forum.

Which OTG driver did you use? If it is the Blade driver, it must be the extra drivers I loaded with my config that cause the peripheral mode problem.

0

Share this post


Link to post
Share on other sites

Posted · Report post

WOW, you've been working hard!!

Installed the 2011-08-19 built, works fine. Peripheral mode works. However, OTG mode sometimes doesn't come on. Plug in hub first and then power helps, as you said in the Swedish forum.

Which OTG driver did you use? If it is the Blade driver, it must be the extra drivers I loaded with my config that cause the peripheral mode problem.

I used the V9 driver but in the end I removed all the differences so it ended up to be identical to the Blade driver. Not sure why you lost peripheral mode.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.