Guest mchalakov Posted June 16, 2013 Report Posted June 16, 2013 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.
Guest KonstaT Posted June 16, 2013 Report Posted June 16, 2013 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.
Guest mchalakov Posted June 16, 2013 Report Posted June 16, 2013 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?
Guest KonstaT Posted June 16, 2013 Report Posted June 16, 2013 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. ;)
Guest topias231 Posted July 6, 2013 Report Posted July 6, 2013 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...
Guest KonstaT Posted July 7, 2013 Report Posted July 7, 2013 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.
Guest topias231 Posted July 9, 2013 Report Posted July 9, 2013 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)
Guest KonstaT Posted July 9, 2013 Report Posted July 9, 2013 It seems that s3c driver is something for Exynos devices. You should look into how this is done on Qualcomm devices.
Guest topias231 Posted July 11, 2013 Report Posted July 11, 2013 ok. thank you :D (they really should add a thanks button like xda :D)
Guest KonstaT Posted July 19, 2013 Report Posted July 19, 2013 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
Guest peetu20 Posted July 19, 2013 Report Posted July 19, 2013 (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 July 19, 2013 by peetu20
Guest KonstaT Posted July 19, 2013 Report Posted July 19, 2013 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.
Guest Something Wierd Posted July 19, 2013 Report Posted July 19, 2013 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.
Guest peetu20 Posted July 19, 2013 Report Posted July 19, 2013 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.
Guest peetu20 Posted July 19, 2013 Report Posted July 19, 2013 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.
Guest peetu20 Posted July 19, 2013 Report Posted July 19, 2013 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.
Guest peetu20 Posted July 19, 2013 Report Posted July 19, 2013 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.
Guest KonstaT Posted July 20, 2013 Report Posted July 20, 2013 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
Guest KonstaT Posted July 20, 2013 Report Posted July 20, 2013 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.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now