FORUMS
Remove All Ads from XDA

USB Host mode on Defy

16 posts
Thanks Meter: 17
 
By MAPGPS, Junior Member on 19th February 2011, 01:51 PM
Post Reply Email Thread
Has anyone tried Defy's USB Host mode?

Would like to attach USB devices onto Defy:
- USB keyboard / mouse
- USB disk drives
- Other types of USB 3G modems (like CDMA1x/EVDO)
- Arduino IO board
...

I haven't bought Defy yet, but want to do some pre-research before the purchase.
Could someone do me a favor to post the outputs of "dmesg" on Defy?
(Run dmesg command under the Linux console).

I expect to see something like:
Code:
...
OMAP3630 ES1.1
...
twl4030_usb twl4030_usb: Initialized TWL4030 USB module
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Sangoma WANPIPE  r outer v1.1 (c) 1995-2000 Sangoma Technologies Inc.
Bluetooth: Core ver 2.15
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=0
musb_hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
...
I got above dmesg by Web searching for an OMAP3630 test board, not a Defy.
Just want to make sure Defy is equipped with USB OTG controller.
The Following 3 Users Say Thank You to MAPGPS For This Useful Post: [ View ] Gift MAPGPS Ad-Free
 
 
19th February 2011, 04:23 PM |#2  
Member
Flag Moscow
Thanks Meter: 16
 
More
This function not supported in the kernel, so kernel we can not replace, because bootloader is locked.
19th February 2011, 05:30 PM |#3  
OP Junior Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by _ReBoot_

This function not supported in the kernel, so kernel we can not replace, because bootloader is locked.

Understood the bootloader is locked by Moto, and a kernel must be signed.

Instead of replacing kernel itself, can we just load new driver modules (*.ko via insmod command)?
Does Moto also prevent from loading customized driver modules?
19th February 2011, 05:51 PM |#4  
OP Junior Member
Thanks Meter: 17
 
More
Can someone help to get the outputs of "cat /proc/driver/musb_hdrc" ?

Something like:
Code:
#cat /proc/driver/musb_hdrc 
Status: MHDRC, Mode=Peripheral (Power=60, DevCtl=80)
OTG state: b_idle; inactive
Options: musb-dma, otg (peripheral+host), debug=3 [eps=16]
Peripheral address: 30
Root port status: 00000000
Gadget driver: (none)
20th February 2011, 02:19 PM |#5  
unrafa's Avatar
Senior Member
Flag Galicia
Thanks Meter: 70
 
More
Post
http://copytaste.com/e272
20th February 2011, 04:04 PM |#6  
OP Junior Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by unrafa

http://copytaste.com/e272

unrafa, thanks a lot for your info.

One correction to my previous command line for current USB mode:
"cat /sys/devices/platform/musb_hdrc/mode"

Following dmesg of Defy shows the internal USB modem is attached to the USB Host for modem init. But later reset as b_peripheral:
Code:
<6>[    8.118133] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<4>[    8.118347] IRQ 78/usbtll: IRQF_DISABLED is not guaranteed on shared IRQs
<6>[    8.119018] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
<6>[    8.119323] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
<6>[    8.119842] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
<6>[    8.134368] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
<6>[    8.135192] usb usb1: configuration #1 chosen from 1 choice
<6>[    8.135650] hub 1-0:1.0: USB hub found
<6>[    8.135833] hub 1-0:1.0: 3 ports detected
<6>[    8.136688] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
<6>[    8.137451] usbcore: registered new interface driver cdc_acm
<6>[    8.137573] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
<6>[    8.138244] usbcore: registered new interface driver usbserial
<6>[    8.138366] usbserial: USB Serial Driver core
<6>[    8.138641] USB Serial support registered for moto-modem
<6>[    8.138946] usbcore: registered new interface driver moto-modem
<6>[    8.139312] USB Serial support registered for QSC 6085 Modem Driver
<6>[    8.139617] usbcore: registered new interface driver cdma-modem
...
<6>[   80.229614] MUSB BUS RESET as b_peripheral
How about to use:
"echo b_host > /sys/devices/platform/musb_hdrc/mode"
to enable the Host mode again?

May run command "modinfo musb_hdrc" to get actual parameters we can use to enable the Host mode.
Something like "modprobe musb_hdrc mode_default=1".
20th February 2011, 05:14 PM |#7  
unrafa's Avatar
Senior Member
Flag Galicia
Thanks Meter: 70
 
More
$ cat /sys/devices/platform/musb_hdrc/mode
b_peripheral

# echo b_host > /sys/devices/platform/musb_hdrc/mode
# echo b_host > /sys/devices/platform/musb_hdrc/mode
# cat /sys/devices/platform/musb_hdrc/mode
b_peripheral

# ls
uevent
modalias
subsystem
power
driver
gadget
mode
vbus
srp
# cat power
power: invalid length
# ls
uevent
modalias
subsystem
power
driver
gadget
mode
vbus
srp
# cat mode
b_peripheral
# cat vbus
Vbus off, timeout 0 msec
# cat srp
srp: invalid length
# cat uevent
DRIVER=musb_hdrc
MODALIAS=platform:musb_hdrc
# cat modalias
platform:musb_hdrc
# cat subsystem
subsystem: invalid length


# modinfo musb_hdrc
modinfo: can't open '/lib/modules/2.6.32.9-ga649a2e/modules.dep': No such file or directory

# modprobe musb_hdrc
modprobe: chdir(/lib/modules): No such file or directory

by the way /lib/modules doesnt exist, there are 20 modules in /system/lib/modules
and no musb_hdrc module there


Inside android's menu if i change "motorola Phone portal" to "USB mass storage" dmesg got this

<3>[12344.262695] do_cmd_proc_msg: Acquisition cycle length overflow
<6>[12345.158843] musb_pullup - Disabling USB Pullups
<6>[12345.159606] usbnet_disable
<7>[12345.159881] mtp_function_disable(): disabled
<6>[12345.161651] adb_release
<6>[12345.163146] adb_open
<6>[12345.165618] Sending USBLAN disabled uevent
<6>[12345.279876] musb_pullup - Enabling USB Pullups
<6>[12345.389068] device_mode_change_write - Successfully enabled function - msc_adb
<6>[12345.594573] MUSB BUS RESET as b_peripheral
<6>[12345.674407] MUSB BUS RESET as b_peripheral
<6>[12345.705291] android_usb gadget: high speed config #1: android
<4>[12349.139770] mmc0: Starting deferred resume
<4>[12349.511322] mmc0: Deferred resume completed


/sys/module/musb_hdrc/parameters/debug exists. no more than that file


Would it be possible to connect an external hard disk to this phone?
20th February 2011, 05:38 PM |#8  
Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by MAPGPS

Does Moto also prevent from loading customized driver modules?

No, we really can load own driver modules....

sent from my moto defy with taptalk
23rd February 2011, 05:13 PM |#9  
m11kkaa's Avatar
Recognized Developer / Contributor
Thanks Meter: 2,161
 
Donate to Me
More
It would be very great if this will work.
Is there any progress?
24th February 2011, 02:33 AM |#10  
sonhy's Avatar
Senior Member
Thanks Meter: 63
 
More
yeah, be nice to connect 2 usb hosts so i can copy my slr pictures from a 32gb sd card over to a 320gb hdd.
I have usb y cables so i can power the hosts with an external usb charger.
6th April 2011, 11:09 AM |#11  
viper.'s Avatar
Senior Member
Flag ZAGREB
Thanks Meter: 52
 
More
Any news on this?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes