• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      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 softwareNintendo 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 contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      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 / suspension / ban.
Sign in to follow this  
Followers 0

USB Host on ZTE Blade 3?

19 posts in this topic

Posted

Is it possible to enable it?

I already have tried "USB Host Diagnostics" tool on the Play Store but that didn't work.

From the things that I read it has something to do with the kernel supporting it,but I don't know anything about modifying the kernel.

0

Share this post


Link to post
Share on other sites

Posted

With a quick look it seems that most things needed for USB host/OTG are already enabled in our kernel. It wouldn't be a big surprise if the actual drivers needed some hacking to make it work though. There's of course plenty of necessary changes to framework/vold/ramdisk/etc if you want external devices to be available for Android. Command line access should be possible as is.

Common problem with phones and external USB devices is that phones don't output power from the USB port. You'll need an active USB-hub or an y-cable with a 5V power input. This also means that there really isn't any practical use case scenario for this.

0

Share this post


Link to post
Share on other sites

Posted

I need it for connecting my Canon 600D to my phone so I can control it/view pictures on a larger screen.(with DSLR Controler from the Play Store).

And probably for a card reader or a flash memory stick - and all those things do not need an external power source.

Is this to difficult to code and can you do it?

0

Share this post


Link to post
Share on other sites

Posted

Like said, there already might be all the necessary support for DSLR Controller enabled. It's said to work on even non-rooted stock firmware just as long it's Honeycomb (Android 3.1) or higher. Card readers and flash memory sticks most definitely need outside power source.

Could I do it? Probably. Am I going to do it? No, because I have none of the necessary equipment to test this and no use for this anyway. It's like everything else in open source communities. You want something for yourselves - you better do it yourself. And if you're feeling generous enough you can share it with other people as well. ;)

0

Share this post


Link to post
Share on other sites

Posted

KonstaT would you try to do it if i gave you the needed hardware? i would do it but i only have experience in coding os files on iPhone and... it's completely different thing...

0

Share this post


Link to post
Share on other sites

Posted

KonstaT would you try to do it if i gave you the needed hardware? i would do it but i only have experience in coding os files on iPhone and... it's completely different thing...

There's always a problem with donated hardware. It might not be able to deliver what you're requesting. That's why I usually refuse. Cables like this cost practically nothing anyway so I might include one in my next buyincoins/dealextreme order.

0

Share this post


Link to post
Share on other sites

Posted

i tried myself and only thing to really do is the s3c usb host driver. at least i think so because my blade 3 notices a usb host cable but complains about the driver. (USB Host Helper)

0

Share this post


Link to post
Share on other sites

Posted

It seems that s3c driver is something for Exynos devices. You should look into how this is done on Qualcomm devices.

0

Share this post


Link to post
Share on other sites

Posted

ok. thank you :D (they really should add a thanks button like xda :D)

0

Share this post


Link to post
Share on other sites

Posted

Ok, so I just received some cables. Good news, OTG-cable is recognized by the usb host controller out of the box.


<6>[07-19 07:55:32.613] [5726: kworker/0:1]msm_hsusb_host msm_hsusb_host.0: Qualcomm On-Chip EHCI Host Controller
<6>[07-19 07:55:32.613] [5726: kworker/0:1]msm_hsusb_host msm_hsusb_host.0: new USB bus registered, assigned bus number 1
<6>[07-19 07:55:32.613] [5726: kworker/0:1]msm_hsusb_host msm_hsusb_host.0: irq 47, io base 0xa0800000
<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: Product: Qualcomm On-Chip EHCI Host Controller
<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: Manufacturer: Linux 3.0.8-CyanogenMod-perf-gf491622 ehci_hcd
<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: SerialNumber: msm_hsusb_host.0
<6>[07-19 07:55:32.613] [5726: kworker/0:1]hub 1-0:1.0: USB hub found
<6>[07-19 07:55:32.613] [5726: kworker/0:1]hub 1-0:1.0: 1 port detected
[/CODE] Bad news, as expected there is no power output to power plugged devices.
[CODE]<6>[07-19 07:55:35.096] [5984: kworker/0:0]msm_otg_suspend: usb in low power mode

I guess I have to figure out next what kind of Y-cable is needed (2 male ends, 1 female end?) and where to get one. Or do craftwork myself and cut some cables... :P

0

Share this post


Link to post
Share on other sites

Posted (edited)

Ok, so I just received some cables. Good news, OTG-cable is recognized by the usb host controller out of the box.


<6>[07-19 07:55:32.613] [5726: kworker/0:1]msm_hsusb_host msm_hsusb_host.0: Qualcomm On-Chip EHCI Host Controller

<6>[07-19 07:55:32.613] [5726: kworker/0:1]msm_hsusb_host msm_hsusb_host.0: new USB bus registered, assigned bus number 1

<6>[07-19 07:55:32.613] [5726: kworker/0:1]msm_hsusb_host msm_hsusb_host.0: irq 47, io base 0xa0800000

<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: Product: Qualcomm On-Chip EHCI Host Controller

<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: Manufacturer: Linux 3.0.8-CyanogenMod-perf-gf491622 ehci_hcd

<6>[07-19 07:55:32.613] [5726: kworker/0:1]usb usb1: SerialNumber: msm_hsusb_host.0

<6>[07-19 07:55:32.613] [5726: kworker/0:1]hub 1-0:1.0: USB hub found

<6>[07-19 07:55:32.613] [5726: kworker/0:1]hub 1-0:1.0: 1 port detected

Bad news, as expected there is no power output to power plugged devices.
<6>[07-19 07:55:35.096] [5984: kworker/0:0]msm_otg_suspend: usb in low power mode[/code]

I guess I have to figure out next what kind of Y-cable is needed (2 male ends, 1 female end?) and where to get one. Or do craftwork myself and cut some cables... :P

Cutting and modding usb-cables is easy. Would be nice to get usb host support :)
Edited by peetu20
0

Share this post


Link to post
Share on other sites

Posted

USB OTG works out of the box just fine. You just need the right kind of cable (USB OTG Y-cable with 5V power source).


<6>[07-19 18:55:06.917] [4: kworker/0:0]msm_hsusb_host msm_hsusb_host.0: Qualcomm On-Chip EHCI Host Controller
<6>[07-19 18:55:06.917] [4: kworker/0:0]msm_hsusb_host msm_hsusb_host.0: new USB bus registered, assigned bus number 1
<6>[07-19 18:55:06.917] [4: kworker/0:0]msm_hsusb_host msm_hsusb_host.0: irq 47, io base 0xa0800000
<6>[07-19 18:55:06.917] [4: kworker/0:0]usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
<6>[07-19 18:55:06.917] [4: kworker/0:0]usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
<6>[07-19 18:55:06.917] [4: kworker/0:0]usb usb1: Product: Qualcomm On-Chip EHCI Host Controller
<6>[07-19 18:55:06.917] [4: kworker/0:0]usb usb1: Manufacturer: Linux 3.0.8-CyanogenMod-perf-gf491622 ehci_hcd
<6>[07-19 18:55:06.917] [4: kworker/0:0]usb usb1: SerialNumber: msm_hsusb_host.0
<6>[07-19 18:55:06.917] [4: kworker/0:0]hub 1-0:1.0: USB hub found
...
<6>[07-19 18:55:07.237] [12: khubd]usb 1-1: new high speed USB device number 2 using msm_hsusb_host
<6>[07-19 18:55:07.387] [12: khubd]usb 1-1: New USB device found, idVendor=0951, idProduct=1607
<6>[07-19 18:55:07.387] [12: khubd]usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[07-19 18:55:07.387] [12: khubd]usb 1-1: Product: DataTraveler 2.0
<6>[07-19 18:55:07.387] [12: khubd]usb 1-1: Manufacturer: Kingston
<6>[07-19 18:55:07.387] [12: khubd]usb 1-1: SerialNumber: 5B7A11970009
<6>[07-19 18:55:07.387] [12: khubd]scsi0 : usb-storage 1-1:1.0
<5>[07-19 18:55:08.388] [3042: scsi_scan_0]scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS
<5>[07-19 18:55:08.388] [3042: scsi_scan_0]sd 0:0:0:0: Attached scsi generic sg0 type 0
<5>[07-19 18:55:11.321] [5: kworker/u:0]sd 0:0:0:0: [sda] 7823360 512-byte logical blocks: (4.00 GB/3.73 GiB)
<5>[07-19 18:55:11.331] [5: kworker/u:0]sd 0:0:0:0: [sda] Write Protect is off
<7>[07-19 18:55:11.331] [5: kworker/u:0]sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
<3>[07-19 18:55:11.331] [5: kworker/u:0]sd 0:0:0:0: [sda] No Caching mode page present
<3>[07-19 18:55:11.331] [5: kworker/u:0]sd 0:0:0:0: [sda] Assuming drive cache: write through
<3>[07-19 18:55:11.331] [5: kworker/u:0]sd 0:0:0:0: [sda] No Caching mode page present
<3>[07-19 18:55:11.331] [5: kworker/u:0]sd 0:0:0:0: [sda] Assuming drive cache: write through
<6>[07-19 18:55:11.331] [5: kworker/u:0] sda: sda1
<3>[07-19 18:55:11.331] [5: kworker/u:0]sd 0:0:0:0: [sda] No Caching mode page present
<3>[07-19 18:55:11.331] [5: kworker/u:0]sd 0:0:0:0: [sda] Assuming drive cache: write through
<5>[07-19 18:55:11.331] [5: kworker/u:0]sd 0:0:0:0: [sda] Attached SCSI removable disk[/CODE] You can use 'lsusb' to list plugged usb devices. You still need to manually mount usb storage but I'll look into if vold can auto mount it in CM10/CM10.1. Mount:
[CODE]
mkdir /sdcard/usb
chmod 777 /sdcard/usb
mount -t vfat /dev/block/sda1 /sdcard/usb
Unmount:
umount /sdcard/usb[/code]

Copying files from and to usb storage works fine. I also tested an usb mouse which worked fine. Keyboard is still untested but I can't see any reason why it wouldn't work as well.

0

Share this post


Link to post
Share on other sites

Posted

Do I have to do anything to the rom/kernel to make this work or it works just as it is.I'll try to find that kind of cable in the next week or try to make one myself.

0

Share this post


Link to post
Share on other sites

Posted

Do I have to do anything to the rom/kernel to make this work or it works just as it is.I'll try to find that kind of cable in the next week or try to make one myself.

As KonstaT says, you need just USB-OTG cable and command line skills.
0

Share this post


Link to post
Share on other sites

Posted

Do I have to do anything to the rom/kernel to make this work or it works just as it is.I'll try to find that kind of cable in the next week or try to make one myself.

As KonstaT says, you need just USB-OTG cable and command line skills.
0

Share this post


Link to post
Share on other sites

Posted

Do I have to do anything to the rom/kernel to make this work or it works just as it is.I'll try to find that kind of cable in the next week or try to make one myself.

As KonstaT says, you need just USB-OTG cable and command line skills.
0

Share this post


Link to post
Share on other sites

Posted

Do I have to do anything to the rom/kernel to make this work or it works just as it is.I'll try to find that kind of cable in the next week or try to make one myself.

As KonstaT says, you need just USB-OTG cable and command line skills.
0

Share this post


Link to post
Share on other sites

Posted

Do I have to do anything to the rom/kernel to make this work or it works just as it is.I'll try to find that kind of cable in the next week or try to make one myself.

No need to mess with kernels or anything, OTG cable with external power source is the key. This should even work on stock ROMs but I've obviously only tested it with CM10.1. Of course you'll need root access to manually mount usb storage but mouse/keyboard/etc should work even on unrooted stock.

Here's information on what kind of cable you need and how to make one.

http://forum.xda-dev...d.php?t=1828032

Mine came out pretty. :P

post-834050-0-04692800-1374305508_thumb.

0

Share this post


Link to post
Share on other sites

Posted

Vold also seems to play nicely with this. Support for external USB storage coming to CyanogenMod builds. USB storage is automatically mounted when plugged in and can be unmounted/mounted under Settings -> Storage.

post-834050-0-77124900-1374313203_thumb. post-834050-0-97906400-1374313218_thumb.

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
Sign in to follow this  
Followers 0

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