Quantcast

USB OTG not working as host

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

USB OTG not working as host

zachlac
I'd like to have two free USB ports, the normal Host port and the OTG port as a second host port.  The first host port works properly, but when I plug a slave device into the OTG port, nothing happens.  No messages on dmesg.  It's configured in the kernel as Host through the linux-omap3-2.6.31.bb recipe.  Is there a module I need to load?  I'm using the Overo Water with the Tobi board.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

Steve Sakoman
On Thu, Jan 7, 2010 at 12:46 PM, zachlac <[hidden email]> wrote:
>
> I'd like to have two free USB ports, the normal Host port and the OTG port as
> a second host port.  The first host port works properly, but when I plug a
> slave device into the OTG port, nothing happens.  No messages on dmesg.
> It's configured in the kernel as Host through the linux-omap3-2.6.31.bb
> recipe.  Is there a module I need to load?  I'm using the Overo Water with
> the Tobi board.

On the musb (OTG) port devices must be plugged in at boot time to be
recognized -- hot plug is not yet functional.

I believe that this should be fixed in the 2.6.33 musb driver, but I
haven't verified that yet.

Steve

> View this message in context: http://old.nabble.com/USB-OTG-not-working-as-host-tp27066693p27066693.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

zachlac
Thank you for your reply.  When I do this (boot the Overo with the device attached to the USB OTG port) there is still nothing.  The power light on the device does not go on.  Nothing jumps out at me in the dmesg log from startup: is there something in particular I should look for?


sakoman wrote
On Thu, Jan 7, 2010 at 12:46 PM, zachlac <zlacelle@gmail.com> wrote:
>
> I'd like to have two free USB ports, the normal Host port and the OTG port as
> a second host port.  The first host port works properly, but when I plug a
> slave device into the OTG port, nothing happens.  No messages on dmesg.
> It's configured in the kernel as Host through the linux-omap3-2.6.31.bb
> recipe.  Is there a module I need to load?  I'm using the Overo Water with
> the Tobi board.

On the musb (OTG) port devices must be plugged in at boot time to be
recognized -- hot plug is not yet functional.

I believe that this should be fixed in the 2.6.33 musb driver, but I
haven't verified that yet.

Steve

> View this message in context: http://old.nabble.com/USB-OTG-not-working-as-host-tp27066693p27066693.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

Steve Sakoman
On Thu, Jan 7, 2010 at 2:18 PM, zachlac <[hidden email]> wrote:
>
> Thank you for your reply.  When I do this (boot the Overo with the device
> attached to the USB OTG port) there is still nothing.  The power light on
> the device does not go on.  Nothing jumps out at me in the dmesg log from
> startup: is there something in particular I should look for?

I guess I should have also mentioned that you *must* have a proper OTG
cable -- a normal miniB will not work.

Are you sure you have the correct type of cable?  If so, it should "just work"

One other thing to be aware of is that the musb port can only supply
100ma.  If your device requires more power then you will need to use a
powered hub.

Steve

>
> sakoman wrote:
>>
>> On Thu, Jan 7, 2010 at 12:46 PM, zachlac <[hidden email]> wrote:
>>>
>>> I'd like to have two free USB ports, the normal Host port and the OTG
>>> port as
>>> a second host port.  The first host port works properly, but when I plug
>>> a
>>> slave device into the OTG port, nothing happens.  No messages on dmesg.
>>> It's configured in the kernel as Host through the linux-omap3-2.6.31.bb
>>> recipe.  Is there a module I need to load?  I'm using the Overo Water
>>> with
>>> the Tobi board.
>>
>> On the musb (OTG) port devices must be plugged in at boot time to be
>> recognized -- hot plug is not yet functional.
>>
>> I believe that this should be fixed in the 2.6.33 musb driver, but I
>> haven't verified that yet.
>>
>> Steve
>>
>>> View this message in context:
>>> http://old.nabble.com/USB-OTG-not-working-as-host-tp27066693p27066693.html
>>> Sent from the Gumstix mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Verizon Developer Community
>>> Take advantage of Verizon's best-in-class app development support
>>> A streamlined, 14 day to market process makes app distribution fast and
>>> easy
>>> Join now and get one step closer to millions of Verizon customers
>>> http://p.sf.net/sfu/verizon-dev2dev
>>> _______________________________________________
>>> gumstix-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and
>> easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> gumstix-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>
>>
>
> --
> View this message in context: http://old.nabble.com/USB-OTG-not-working-as-host-tp27066693p27068027.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

zachlac
Hmm...The device states that the maximum operating current is 50 mA.  I will try to get a USB hub and see if that is the problem.  The device operates correctly when connected to the "Host" USB port.

As for the cable, I'm using the special white OTG cable from the Gumstix connection package.

Zach

sakoman wrote
I guess I should have also mentioned that you *must* have a proper OTG
cable -- a normal miniB will not work.

Are you sure you have the correct type of cable?  If so, it should "just work"

One other thing to be aware of is that the musb port can only supply
100ma.  If your device requires more power then you will need to use a
powered hub.

Steve

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

Steve Sakoman
On Thu, Jan 7, 2010 at 3:01 PM, zachlac <[hidden email]> wrote:
>
> Hmm...The device states that the maximum operating current is 50 mA.  I will
> try to get a USB hub and see if that is the problem.  The device operates
> correctly when connected to the "Host" USB port.
>
> As for the cable, I'm using the special white OTG cable from the Gumstix
> connection package.

That cable should work.  Let's see what happens with the hub.

Steve


> Zach
>
>
> sakoman wrote:
>>
>> I guess I should have also mentioned that you *must* have a proper OTG
>> cable -- a normal miniB will not work.
>>
>> Are you sure you have the correct type of cable?  If so, it should "just
>> work"
>>
>> One other thing to be aware of is that the musb port can only supply
>> 100ma.  If your device requires more power then you will need to use a
>> powered hub.
>>
>> Steve
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and
>> easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> gumstix-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>
>>
>
> --
> View this message in context: http://old.nabble.com/USB-OTG-not-working-as-host-tp27066693p27068596.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

Alex Gibson-3
In reply to this post by zachlac
On 8/01/2010 10:01 AM, zachlac wrote:
> Hmm...The device states that the maximum operating current is 50 mA.  I will
> try to get a USB hub and see if that is the problem.  The device operates
> correctly when connected to the "Host" USB port.
>
> As for the cable, I'm using the special white OTG cable from the Gumstix
> connection package.
>
> Zach
>    

That might be the operating current but whats the surge current when it
initially powers up ?

Alex

--
UTS CRICOS Provider Code:  00099F
DISCLAIMER: This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.  If
you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly, and
with authority, states them to be the views the University of Technology,
Sydney. Before opening any attachments, please check them for viruses and
defects.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

zachlac
The operating current is 30 mA.  The maximum current is 50 mA.

Alex Gibson-6 wrote
On 8/01/2010 10:01 AM, zachlac wrote:
> Hmm...The device states that the maximum operating current is 50 mA.  I will
> try to get a USB hub and see if that is the problem.  The device operates
> correctly when connected to the "Host" USB port.
>
> As for the cable, I'm using the special white OTG cable from the Gumstix
> connection package.
>
> Zach
>    

That might be the operating current but whats the surge current when it
initially powers up ?

Alex

--
UTS CRICOS Provider Code:  00099F
DISCLAIMER: This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.  If
you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly, and
with authority, states them to be the views the University of Technology,
Sydney. Before opening any attachments, please check them for viruses and
defects.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

Benny B. Simonsen
I use the OTG port with a HUB and it works with hot plug.
I have "cheated" a bit and have soldered to pins together on the USB OTG
connector (to force host mode all the time). If you just leave the OTG
cable in the Tobi board it should give the same result (I just couldn't
find an OTG cable)

Regarding dmesg you will only see units which is connected at boot time.
Messages after boot is directed to the console (in the default console
image I use at the moment)

Benny



fre, 08 01 2010 kl. 06:34 -0800, skrev zachlac:

> The operating current is 30 mA.  The maximum current is 50 mA.
>
>
> Alex Gibson-6 wrote:
> >
> > On 8/01/2010 10:01 AM, zachlac wrote:
> >> Hmm...The device states that the maximum operating current is 50 mA.  I
> >> will
> >> try to get a USB hub and see if that is the problem.  The device operates
> >> correctly when connected to the "Host" USB port.
> >>
> >> As for the cable, I'm using the special white OTG cable from the Gumstix
> >> connection package.
> >>
> >> Zach
> >>    
> >
> > That might be the operating current but whats the surge current when it
> > initially powers up ?
> >
> > Alex
> >
> > --
> > UTS CRICOS Provider Code:  00099F
> > DISCLAIMER: This email message and any accompanying attachments may
> > contain
> > confidential information.  If you are not the intended recipient, do not
> > read, use, disseminate, distribute or copy this message or attachments.
> > If
> > you have received this message in error, please notify the sender
> > immediately and delete this message. Any views expressed in this message
> > are those of the individual sender, except where the sender expressly, and
> > with authority, states them to be the views the University of Technology,
> > Sydney. Before opening any attachments, please check them for viruses and
> > defects.
> >
> > ------------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and
> > easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev 
> > _______________________________________________
> > gumstix-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> >
> >
>


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

zachlac
I seem to have discovered the problem when sifting through boot-up messages:

> usb 1-1: New USB device found, idVendor=0403, idProduct=6011
> usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 1-1: Product: USB-COM232 Plus4
> usb 1-1: Manufacturer: FTDI
> usb 1-1: SerialNumber: FTSKY3MH
> usb 1-1: rejected 1 configuration due to insufficient available bus power
> usb 1-1: no configuration chosen from 1 choice

Hopefully the hub will fix this problem.

Benny B. Simonsen wrote
I use the OTG port with a HUB and it works with hot plug.
I have "cheated" a bit and have soldered to pins together on the USB OTG
connector (to force host mode all the time). If you just leave the OTG
cable in the Tobi board it should give the same result (I just couldn't
find an OTG cable)

Regarding dmesg you will only see units which is connected at boot time.
Messages after boot is directed to the console (in the default console
image I use at the moment)

Benny
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

Benny B. Simonsen
In reply to this post by Steve Sakoman
Steve Sakoman skrev:

> On Thu, Jan 7, 2010 at 12:46 PM, zachlac <[hidden email]> wrote:
>  
>> I'd like to have two free USB ports, the normal Host port and the OTG port as
>> a second host port.  The first host port works properly, but when I plug a
>> slave device into the OTG port, nothing happens.  No messages on dmesg.
>> It's configured in the kernel as Host through the linux-omap3-2.6.31.bb
>> recipe.  Is there a module I need to load?  I'm using the Overo Water with
>> the Tobi board.
>>    
>
> On the musb (OTG) port devices must be plugged in at boot time to be
> recognized -- hot plug is not yet functional.
>
> I believe that this should be fixed in the 2.6.33 musb driver, but I
> haven't verified that yet.
>
> Steve
>
>  
Steve,

Are you sure that it's not the host port which have hot plug problems?
On the OTG port (in permanent host mode) I have tried to plug / unplug
an USB mouse (connected through a HUB) as fast as possible for 1 minut
without problems.

On the host port I got this with the same setup and one unplug / plug cycle
-----------------------------------
usb 2-2.1: USB disconnect, address 3
ehci-omap ehci-omap.0: port 2 reset error -110
hub 2-0:1.0: hub_port_status failed (err = -32)
usb 2-2: USB disconnect, address 2
hub 2-0:1.0: unable to enumerate USB device on port 2
-----------------------------------

Benny

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

kebgc
Where are the specifications for the USB ports, I've looked at the WIKI pages and on gumstix.net but I can't see it.
I'm trying to get a USB 3G/HSDPA modem working without a hub. I want to make sure that I'll definitely need a powered hub.

These are my MUSB kernel settings, should these support the OTG port as a hub:
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_SOC=y
# CONFIG_USB_MUSB_HOST is not set
# CONFIG_USB_MUSB_PERIPHERAL is not set
CONFIG_USB_MUSB_OTG=y
# CONFIG_USB_GADGET_MUSB_HDRC is not set
CONFIG_USB_MUSB_HDRC_HCD=y
# CONFIG_MUSB_PIO_ONLY is not set
CONFIG_USB_MUSB_DEBUG=y

ALSO anyone got a spec for the OTG cable mentioned earlier, can't see one available on GUMSTIX, if its non-standard mini-A to mini-B ??
Benny B. Simonsen wrote
Steve Sakoman skrev:
> On Thu, Jan 7, 2010 at 12:46 PM, zachlac <zlacelle@gmail.com> wrote:
>  
>> I'd like to have two free USB ports, the normal Host port and the OTG port as
>> a second host port.  The first host port works properly, but when I plug a
>> slave device into the OTG port, nothing happens.  No messages on dmesg.
>> It's configured in the kernel as Host through the linux-omap3-2.6.31.bb
>> recipe.  Is there a module I need to load?  I'm using the Overo Water with
>> the Tobi board.
>>    
>
> On the musb (OTG) port devices must be plugged in at boot time to be
> recognized -- hot plug is not yet functional.
>
> I believe that this should be fixed in the 2.6.33 musb driver, but I
> haven't verified that yet.
>
> Steve
>
>  
Steve,

Are you sure that it's not the host port which have hot plug problems?
On the OTG port (in permanent host mode) I have tried to plug / unplug
an USB mouse (connected through a HUB) as fast as possible for 1 minut
without problems.

On the host port I got this with the same setup and one unplug / plug cycle
-----------------------------------
usb 2-2.1: USB disconnect, address 3
ehci-omap ehci-omap.0: port 2 reset error -110
hub 2-0:1.0: hub_port_status failed (err = -32)
usb 2-2: USB disconnect, address 2
hub 2-0:1.0: unable to enumerate USB device on port 2
-----------------------------------

Benny

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

zachlac
I believe the OTG cable is actually micro-AB to mini-B.  You MUST use this cable type for OTG to work.

I got in the powered hub yesterday, and it works great.  I think you might have to have at least one device plugged into the hub on boot, and the hub definitely must be plugged into the OTG port, but other than that you can hot-swap devices on the hub without problems.

I did nt have to mess with the kernel at all.  To quote an above post, "it should just work".  One thing to note: the ports are EHCI only, meaning you must use only High-Speed USB devices if connecting directly to the port.  Using a hub has been said to fix this problem.

-Zach

kebgc wrote
Where are the specifications for the USB ports, I've looked at the WIKI pages and on gumstix.net but I can't see it.
I'm trying to get a USB 3G/HSDPA modem working without a hub. I want to make sure that I'll definitely need a powered hub.

These are my MUSB kernel settings, should these support the OTG port as a hub:
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_SOC=y
# CONFIG_USB_MUSB_HOST is not set
# CONFIG_USB_MUSB_PERIPHERAL is not set
CONFIG_USB_MUSB_OTG=y
# CONFIG_USB_GADGET_MUSB_HDRC is not set
CONFIG_USB_MUSB_HDRC_HCD=y
# CONFIG_MUSB_PIO_ONLY is not set
CONFIG_USB_MUSB_DEBUG=y

ALSO anyone got a spec for the OTG cable mentioned earlier, can't see one available on GUMSTIX, if its non-standard mini-A to mini-B ??
Benny B. Simonsen wrote
Steve Sakoman skrev:
> On Thu, Jan 7, 2010 at 12:46 PM, zachlac <zlacelle@gmail.com> wrote:
>  
>> I'd like to have two free USB ports, the normal Host port and the OTG port as
>> a second host port.  The first host port works properly, but when I plug a
>> slave device into the OTG port, nothing happens.  No messages on dmesg.
>> It's configured in the kernel as Host through the linux-omap3-2.6.31.bb
>> recipe.  Is there a module I need to load?  I'm using the Overo Water with
>> the Tobi board.
>>    
>
> On the musb (OTG) port devices must be plugged in at boot time to be
> recognized -- hot plug is not yet functional.
>
> I believe that this should be fixed in the 2.6.33 musb driver, but I
> haven't verified that yet.
>
> Steve
>
>  
Steve,

Are you sure that it's not the host port which have hot plug problems?
On the OTG port (in permanent host mode) I have tried to plug / unplug
an USB mouse (connected through a HUB) as fast as possible for 1 minut
without problems.

On the host port I got this with the same setup and one unplug / plug cycle
-----------------------------------
usb 2-2.1: USB disconnect, address 3
ehci-omap ehci-omap.0: port 2 reset error -110
hub 2-0:1.0: hub_port_status failed (err = -32)
usb 2-2: USB disconnect, address 2
hub 2-0:1.0: unable to enumerate USB device on port 2
-----------------------------------

Benny

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host

joe joe

zachlac wrote
I believe the OTG cable is actually micro-AB to mini-B.  You MUST use this cable type for OTG to work.

I got in the powered hub yesterday, and it works great.  I think you might have to have at least one device plugged into the hub on boot, and the hub definitely must be plugged into the OTG port, but other than that you can hot-swap devices on the hub without problems.

I did nt have to mess with the kernel at all.  To quote an above post, "it should just work".  One thing to note: the ports are EHCI only, meaning you must use only High-Speed USB devices if connecting directly to the port.  Using a hub has been said to fix this problem.

-Zach

kebgc wrote
Where are the specifications for the USB ports, I've looked at the WIKI pages and on gumstix.net but I can't see it.
I'm trying to get a USB 3G/HSDPA modem working without a hub. I want to make sure that I'll definitely need a powered hub.

These are my MUSB kernel settings, should these support the OTG port as a hub:
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_SOC=y
# CONFIG_USB_MUSB_HOST is not set
# CONFIG_USB_MUSB_PERIPHERAL is not set
CONFIG_USB_MUSB_OTG=y
# CONFIG_USB_GADGET_MUSB_HDRC is not set
CONFIG_USB_MUSB_HDRC_HCD=y
# CONFIG_MUSB_PIO_ONLY is not set
CONFIG_USB_MUSB_DEBUG=y

ALSO anyone got a spec for the OTG cable mentioned earlier, can't see one available on GUMSTIX, if its non-standard mini-A to mini-B ??
Benny B. Simonsen wrote
Steve Sakoman skrev:
> On Thu, Jan 7, 2010 at 12:46 PM, zachlac <zlacelle@gmail.com> wrote:
>  
>> I'd like to have two free USB ports, the normal Host port and the OTG port as
>> a second host port.  The first host port works properly, but when I plug a
>> slave device into the OTG port, nothing happens.  No messages on dmesg.
>> It's configured in the kernel as Host through the linux-omap3-2.6.31.bb
>> recipe.  Is there a module I need to load?  I'm using the Overo Water with
>> the Tobi board.
>>    
>
> On the musb (OTG) port devices must be plugged in at boot time to be
> recognized -- hot plug is not yet functional.
>
> I believe that this should be fixed in the 2.6.33 musb driver, but I
> haven't verified that yet.
>
> Steve
>
>  
Steve,

Are you sure that it's not the host port which have hot plug problems?
On the OTG port (in permanent host mode) I have tried to plug / unplug
an USB mouse (connected through a HUB) as fast as possible for 1 minut
without problems.

On the host port I got this with the same setup and one unplug / plug cycle
-----------------------------------
usb 2-2.1: USB disconnect, address 3
ehci-omap ehci-omap.0: port 2 reset error -110
hub 2-0:1.0: hub_port_status failed (err = -32)
usb 2-2: USB disconnect, address 2
hub 2-0:1.0: unable to enumerate USB device on port 2
-----------------------------------

Benny

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Somebody mentioned that I should use a micro-AB to mini-B cable to properly use the USB OTG.  What end should I use to connect to the Summit expansion board OTG port?  I'm confused because the OTG port on the Summit looks different than the host port, which is a mini-B. If mini-B is what its supposed to use, why can't a normal mini-B to USB A work?    
   
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USB OTG not working as host - a more detailed look

softwizz
In reply to this post by zachlac
I've been trying hard to get a USB flash drive to mount on my target board (custom board using Overo Water). My build is Scott Ellis's minimal 2.6.34 r97 one, with modifications for my use cases.

linux-omap3-2.6.34.bb contains sed scripting to enforce the correct kernel configurations for host, peripheral and OTG modes, but I can't get the OTG configuration to mount the flash drive, yet the host configuration does it fine.

The differences between the sed scripts used to condition the kernel config, are as follows :-

   1,2c1,2
   <         if [ "${MUSB_MODE}" = "host" ]; then
   <             sed -i 's:# CONFIG_USB_MUSB_HOST is not set:CONFIG_USB_MUSB_HOST=y:g' ${WORKDIR}/defconfig
   ---
   >         if [ "${MUSB_MODE}" = "otg" ]; then
   >             sed -i 's:CONFIG_USB_MUSB_HOST=y:# CONFIG_USB_MUSB_HOST is not set:g' ${WORKDIR}/defconfig
   4,6c4,6
   <             sed -i 's:CONFIG_USB_MUSB_OTG=y:# CONFIG_USB_MUSB_OTG is not set:g' ${WORKDIR}/defconfig
   <             sed -i 's:# CONFIG_USB_MUSB_HDRC_HCD is not set:CONFIG_USB_MUSB_HDRC_HCD=y:g' ${WORKDIR}/defconfig
   <             sed -i 's:CONFIG_USB_GADGET_MUSB_HDRC=y:# CONFIG_USB_GADGET_MUSB_HDRC is not set:g' ${WORKDIR}/defconfig
---
   >             sed -i 's:# CONFIG_USB_MUSB_OTG is not set:CONFIG_USB_MUSB_OTG=y:g' ${WORKDIR}/defconfig
   >             sed -i 's:CONFIG_USB_MUSB_HDRC_HCD=y:# CONFIG_USB_MUSB_HDRC_HCD is not set:g' ${WORKDIR}/defconfig
   >             sed -i 's:# CONFIG_USB_GADGET_MUSB_HDRC is not set:CONFIG_USB_GADGET_MUSB_HDRC=y:g' ${WORKDIR}/defconfig

The differences between the generated config files, are as follows :-

   1134a1135
   > CONFIG_USB_OTG=y
   1162c1163
   < CONFIG_USB_MUSB_HOST=y
   ---
   > # CONFIG_USB_MUSB_HOST is not set
   1164,1165c1165,1166
   < # CONFIG_USB_MUSB_OTG is not set
   < # CONFIG_USB_GADGET_MUSB_HDRC is not set
   ---
   > CONFIG_USB_MUSB_OTG=y
   > CONFIG_USB_GADGET_MUSB_HDRC=y
   1306,1307c1307
   < CONFIG_USB_GADGET_OMAP=y
   < CONFIG_USB_OMAP=y
   ---
   > # CONFIG_USB_GADGET_OMAP is not set
   1322c1322
   < # CONFIG_USB_GADGET_DUALSPEED is not set
   ---
   > CONFIG_USB_GADGET_DUALSPEED=y

The target is booted up with the flash driver already inserted in the OTG port via a mini-to-standard USB adaptor which has been doctored for use on the OTG port. The differences between the USB-related  console boot log entries for the two built kernels are as follows :-
 
   67c67
   < musb_hdrc: version 6.0, musb-dma, host, debug=0
   ---
   > musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=0
   74,84c74
   < musb_hdrc musb_hdrc: MUSB HDRC host driver
   < musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
   < usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
   < usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
   < usb usb1: Product: MUSB HDRC host driver
   < usb usb1: Manufacturer: Linux 2.6.34 musb-hcd
   < usb usb1: SerialNumber: musb_hdrc
   < hub 1-0:1.0: USB hub found
   < hub 1-0:1.0: 1 port detected
   < musb_hdrc musb_hdrc: USB Host mode controller at fa0ab000 using DMA, IRQ 92
   ---
   > musb_hdrc musb_hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
   95,96c85,86
   < rt_fiq_stub_wrapper: c0046720
   < fiq_vector: ffff001c,  rt_fiq_stub: c0046720, fiq_len: 48
   ---
   > rt_fiq_stub_wrapper: c0045720
   > fiq_vector: ffff001c,  rt_fiq_stub: c0045720, fiq_len: 48
   128c118
   < net eth0: MAC Address: 1a:d3:b9:ac:26:3a
   ---
   > net eth0: MAC Address: 7e:a8:a0:85:2b:0f
   136c126
   < ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 2
   ---
   > ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
   139,145c129,135
   < usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
   < usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
   < usb usb2: Product: OMAP-EHCI Host Controller
   < usb usb2: Manufacturer: Linux 2.6.34 ehci_hcd
   < usb usb2: SerialNumber: ehci-omap.0
   < hub 2-0:1.0: USB hub found
   < hub 2-0:1.0: 3 ports detected
   ---
   > usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
   > usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
   > usb usb1: Product: OMAP-EHCI Host Controller
   > usb usb1: Manufacturer: Linux 2.6.34 ehci_hcd
   > usb usb1: SerialNumber: ehci-omap.0
   > hub 1-0:1.0: USB hub found
   > hub 1-0:1.0: 3 ports detected
   150,152d139
   < udc: OMAP UDC driver, version: 4 October 2004 (iso) (dma)
   173d159
   < usb 1-1: new high speed USB device using musb_hdrc and address 2
   176c162
   < twl_rtc twl_rtc: setting system clock to 2011-06-16 10:46:31 UTC (1308221191)
   ---
   > twl_rtc twl_rtc: setting system clock to 2011-06-15 17:26:49 UTC (1308158809)
   178,183d163
   < usb 1-1: New USB device found, idVendor=0781, idProduct=5567
   < usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
   < usb 1-1: Product: Cruzer Blade
   < usb 1-1: Manufacturer: SanDisk
   < usb 1-1: SerialNumber: 200607741107BDF258E5
   < scsi0 : usb-storage 1-1:1.0
   185,186c165,166
   < mmc0: new high speed SD card at address 1234
   < mmcblk0: mmc0:1234 SA02G 1.83 GiB
   ---
   > mmc0: new high speed SD card at address 0007
   > mmcblk0: mmc0:0007 SU02G 1.83 GiB
   189c169
   < EXT3-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommended
   ---
   > EXT3-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is recommended
   194c174
   < Freeing init memory: 152K
   ---
   > Freeing init memory: 148K
   196,203d175
   < scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.10 PQ: 0 ANSI: 2
   < sd 0:0:0:0: [sda] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
   < sd 0:0:0:0: [sda] Write Protect is off
   < sd 0:0:0:0: [sda] Assuming drive cache: write through
   < sd 0:0:0:0: [sda] Assuming drive cache: write through
   <  sda: sda1
   < sd 0:0:0:0: [sda] Assuming drive cache: write through
   < sd 0:0:0:0: [sda] Attached SCSI removable disk
   206,207d177
   < FAT: bogus number of reserved sectors
   < VFS: Can't find a valid FAT filesystem on dev sda.

Looking at the above, what seems to be the case is that host mode employs drivers/usb/gadget/omap_udc.c via CONFIG_USB_GADGET_OMAP and CONFIG_USB_OMAP, which then detects a whole other hub in addition to the one detected by both the host and OTG builds, and it is on this other hub that the flash drive is found. In place of drivers/usb/gadget/omap_udc.c the OTG build employs other code modules via CONFIG_USB_GADGET_MUSB_HDRC and CONFIG_USB_MUSB_HDRC_HCD, but the net effect of them is a loss of this host-side functionality.

I've tried modifying the kernel config (both directly and via the sed scripts) to include both the MUSB stuff and CONFIG_USB_GADGET_OMAP/CONFIG_USB_OMAP, but the config subsystem cannot tolerate these coexisting, and OTG builds without the MUSB configs hit a #error at  drivers/usb/gadget/musb_core.h:103

Can anyone give me any clues about where I can take this?

Cheers,

Mike
 
Loading...