Use OTG as USB (OTG host mode) in LINUX

1,902 views
Skip to first unread message

bbel...@gmail.com

unread,
Apr 8, 2013, 7:25:36 AM4/8/13
to cubie...@googlegroups.com
 I have a question and I’m desperate, I have about three weeks trying. I’m doing at my university in Spain and I need to use the cubieboard otg port as host to detect and use  a pl2303 usb to serial device in LINUX. When I connect to a standard USB port it detects it with no problems,  as ttyUSB0 port for example, but when I connect it to the OTG port appears to me powered but no signs of life or mounts. I tried everything possible to use the OTG port as another USB. I’m using to connect to the correct mini-a  OTG cable and have tried a thousand things but no way, even reinstalled the system several times. When I do a dmesg or lsusb did not show anything. I’m out of ideas, 

before plug the device:

root@mele:/# lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M

plugin the devide on a normal usb port:

root@mele:/# lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
|__ Port 1: Dev 3, If 0, Class=vend., Driver=pl2303, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M

plugin the device on otg port

root@mele:/# lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M

This is my script.bin


[usbc0]
usb_used = 1
usb_port_type = 0
usb_detect_type = 0
usb_id_gpio =
usb_det_vbus_gpio =
usb_drv_vbus_gpio = port:PB09
usb_host_init_state = 0

[usbc1]
usb_used = 1
usb_port_type = 1
usb_detect_type = 0
usb_id_gpio =
usb_det_vbus_gpio =
usb_drv_vbus_gpio = port:PH06
usb_host_init_state = 1

[usbc2]
usb_used = 1
usb_port_type = 1
usb_detect_type = 0
usb_id_gpio =
usb_det_vbus_gpio =
usb_drv_vbus_gpio = port:PH03
usb_host_init_state = 0

[usb_feature]
vendor_id = 6353
mass_storage_id = 1
adb_id = 2
manufacturer_name = “USB Developer”
product_name = “Android”
serial_number = “20080411″


Thanks in advance


Roman Mamedov

unread,
Apr 8, 2013, 7:32:13 AM4/8/13
to cubie...@googlegroups.com, bbel...@gmail.com
On Mon, 8 Apr 2013 04:25:36 -0700 (PDT)
bbel...@gmail.com wrote:

> I have a question and I’m desperate, I have about three weeks trying. I’m
> doing at my university in Spain and I need to use the cubieboard otg port
> as host to detect and use a pl2303 usb to serial device in LINUX. When I
> connect to a standard USB port it detects it with no problems, as ttyUSB0
> port for example, but when I connect it to the OTG port appears to me
> powered but no signs of life or mounts. I tried everything possible to use
> the OTG port as another USB. I’m using to connect to the correct mini-a
> OTG cable and have tried a thousand things but no way, even reinstalled
> the system several times. When I do a dmesg or lsusb did not show anything.
> I’m out of ideas,
>
> before plug the device:
>
> root@mele:/# lsusb -t
> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
>
> plugin the devide on a normal usb port:
>
> root@mele:/# lsusb -t
> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
> |__* Port 1: Dev 3, If 0, Class=vend., Driver=pl2303, 12M*
> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
>
> plugin the device on otg port
>
> root@mele:/# lsusb -t
> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
>
> This is my script.bin
>
>
> [usbc0]
> usb_used = 1
> usb_port_type = 0

It didn't occur to you to try changing this to 1, so it's like the others?

usb_port_type: USB port type:

type usb port type
0 device only
1 host only
2 OTG

http://linux-sunxi.org/Fex_Guide
--
With respect,
Roman
signature.asc

Benito Bellido

unread,
Apr 9, 2013, 8:23:14 AM4/9/13
to cubie...@googlegroups.com
Hi again,

I'm still trying, but no success, Could someone give me a idea or any clue?

Best regards


--
You received this message because you are subscribed to a topic in the Google Groups "Cubieboard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cubieboard/rJgv8YOU85M/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cubieboard+...@googlegroups.com.
Visit this group at http://groups.google.com/group/cubieboard?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Craig Hastie

unread,
Apr 9, 2013, 2:30:47 PM4/9/13
to cubie...@googlegroups.com

Has Romans indirect suggestion not worked?
As in changing the value from 0 to either 1 or 2 (I think Roman suggest 1 but you can check his email.
Craig

You received this message because you are subscribed to the Google Groups "Cubieboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cubieboard+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages