Jump to content

USB Host on ZTE Blade 3?


Guest mchalakov

Recommended Posts

Guest mchalakov

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.

Link to comment
Share on other sites

Guest KonstaT

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.

Link to comment
Share on other sites

Guest mchalakov

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?

Link to comment
Share on other sites

Guest KonstaT

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. ;)

Link to comment
Share on other sites

  • 3 weeks later...
Guest topias231

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...

Link to comment
Share on other sites

Guest KonstaT

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.

Link to comment
Share on other sites

Guest topias231

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)

Link to comment
Share on other sites

Guest KonstaT

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

Link to comment
Share on other sites

Guest peetu20

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
Link to comment
Share on other sites

Guest KonstaT

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.

Link to comment
Share on other sites

Guest Something Wierd

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.

Link to comment
Share on other sites

Guest peetu20

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.
Link to comment
Share on other sites

Guest peetu20

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.
Link to comment
Share on other sites

Guest peetu20

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.
Link to comment
Share on other sites

Guest peetu20

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.
Link to comment
Share on other sites

Guest KonstaT

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.

Link to comment
Share on other sites

Guest KonstaT

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.

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.