This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

beagleboard with usb otg

Guru 20755 points

Hello,

Can anyone please try to see if he can work with usb otg (ethernet RNDIS) on beagleboard ?
this is the download page for kernel 2.6.37 I use:
It fails as following:

root@beagleboard:/lib/modules/2.6.37/kernel/drivers/usb/gadget# insmod g_ether.ko

insmod: error inserting 'g_ether.ko': -1 No such device

Regards,
Ran
  • Hi Ran,
    I'm trying to investigate the issue but I have some questions:
    Have you seen some errors or other suspicious messages during compiling the kernel?
    Could you share your .config file?
    Also could you check whether your hardware is compatible with the system requirements described in the AM35x-OMAP35x-PSP 04.02.00.07 UserGuide?

    BR
    Tsvetolin Shulev
  • Hi,

    It works now, I just had to add:
    CONFIG_USB_MUSB_OMAP2PLUS_GLUE

    Thank you very much,
    Ran
  • Hi,

    It seems that it works, but only partly.
    It has some disconnections every several seconds, and after such disconnect I need to set the ip again, and only then can check ping with PC.
    Do you find any problem in the attached log below ?

    I make all the testing on the beagleboard with PSP 04.02.00.07;

    root@beagleboard:~#
    root@beagleboard:~# ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:6 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:672 (672.0 B) TX bytes:672 (672.0 B)

    usb0 Link encap:Ethernet HWaddr 36:19:CA:A6:B0:B2
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:258 errors:0 dropped:12 overruns:0 frame:0
    TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:21820 (21.3 KiB) TX bytes:2828 (2.7 KiB)

    root@beagleboard:~# [ 141.243835] <30>dhclient[340]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 6
    [ 141.252990] <30>NetworkManager[132]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 6
    ifconfig usb0 10.0.0.20
    [ 145.770416] <30>avahi-daemon[143]: root@beagleboardJoining mDNS multicast group on interface usb0.IPv4 with address 10.0.0.20.:~#
    [ 145.785308] <30>avahi-daemon[143]: New relevant interface usb0.IPv4 for mDNS.
    [ 145.792846] <30>avahi-daemon[143]: Registering new address record for 10.0.0.20 on usb0.IPv4.
    ifconfig usb0 10.0.0.20[ 147.258056] <30>dhclient[340]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 13
    [ 147.268096] <30>NetworkManager[132]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 13
    ping 10.0.0.17
    PING 10.0.0.17 (10.0.0.17): 56 data bytes
    64 bytes from 10.0.0.17: seq=0 ttl=128 time=4.558 ms
    64 bytes from 10.0.0.17: seq=1 ttl=128 time=0.681 ms
    64 bytes from 10.0.0.17: seq=2 ttl=128 time=0.545 ms
    64 bytes from 10.0.0.17: seq=3 ttl=128 time=0.626 ms
    64 bytes from 10.0.0.17: seq=4 ttl=128 time=0.682 ms
    64 bytes from 10.0.0.17: seq=5 ttl=128 time=0.484 ms
    64 bytes from 10.0.0.17: seq=6 ttl=128 time=0.682 ms
    64 bytes from 10.0.0.17: seq=7 ttl=128 time=0.699 ms
    64 bytes from 10.0.0.17: seq=8 ttl=128 time=0.569 ms
    64 bytes from 10.0.0.17: seq=9 ttl=128 time=0.602 ms
    64 bytes from 10.0.0.17: seq=10 ttl=128 time=0.664 ms
    [ 160.271301] <30>dhclient[340]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 9
    [ 160.280273] <30>NetworkManager[132]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 9
    64 bytes from 10.0.0.17: seq=11 ttl=128 time=0.716 ms
    64 bytes from 10.0.0.17: seq=12 ttl=128 time=0.654 ms
    64 bytes from 10.0.0.17: seq=13 ttl=128 time=0.585 ms
    64 bytes from 10.0.0.17: seq=14 ttl=128 time=0.658 ms
    64 bytes from 10.0.0.17: seq=15 ttl=128 time=0.657 ms
    64 bytes from 10.0.0.17: seq=16 ttl=128 time=0.507 ms
    64 bytes from 10.0.0.17: seq=17 ttl=128 time=0.650 ms
    64 bytes from 10.0.0.17: seq=18 ttl=128 time=0.657 ms
    64 bytes from 10.0.0.17: seq=19 ttl=128 time=0.664 ms
    [ 169.280670] <30>dhclient[340]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 13
    [ 169.289825] <30>NetworkManager[132]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 13
    64 bytes from 10.0.0.17: seq=20 ttl=128 time=0.750 ms
    64 bytes from 10.0.0.17: seq=21 ttl=128 time=0.645 ms
    64 bytes from 10.0.0.17: seq=22 ttl=128 time=0.509 ms
    64 bytes from 10.0.0.17: seq=23 ttl=128 time=0.652 ms
    64 bytes from 10.0.0.17: seq=24 ttl=128 time=0.661 ms
    64 bytes from 10.0.0.17: seq=25 ttl=128 time=0.614 ms
    64 bytes from 10.0.0.17: seq=26 ttl=128 time=0.605 ms
    [ 175.687316] <12>NetworkManager[132]: <warn> (usb0): DHCPv4 request timed out.
    [ 175.696746] <30>NetworkManager[132]: NetworkManager[132]: <warn> (usb0): DHCPv4 request timed out.
    [ 175.890899] <14>NetworkManager[132]: <info> (usb0): canceled DHCP transaction, DHCP client pid 340
    [ 175.900848] <14>NetworkManager[132]: <info> Activation (usb0) Stage 4 of 5 (IP4 Configure Timeout) scheduled...
    [ 175.911895] <14>NetworkManager[132]: <info> Activation (usb0) Stage 4 of 5 (IP4 Configure Timeout) started...
    [ 175.924743] <14>NetworkManager[132]: <info> Activation (usb0) Stage 5 of 5 (IP Configure Commit) scheduled...
    [ 175.935516] <14>NetworkManager[132]: <info> Activation (usb0) Stage 4 of 5 (IP4 Configure Timeout) complete.
    [ 175.946166] <30>NetworkManager[132]: NetworkManager[132]: <info> (usb0): canceled DHCP transaction, DHCP client pid 340
    [ 175.957763] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 4 of 5 (IP4 Configure Timeout) scheduled...
    [ 175.972564] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 4 of 5 (IP4 Configure Timeout) started...
    [ 175.985260] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 5 of 5 (IP Configure Commit) scheduled...
    [ 175.997924] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 4 of 5 (IP4 Configure Timeout) complete.
    [ 176.010406] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 5 of 5 (IP Configure Commit) started...
    [ 176.026794] <14>NetworkManager[132]: <info> Activation (usb0) Stage 5 of 5 (IP Configure Commit) started...
    [ 176.039611] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 5 of 5 (IP Configure Commit) failed (no IP configuration found)
    [ 176.054565] <14>NetworkManager[132]: <info> Activation (usb0) Stage 5 of 5 (IP Configure Commit) failed (no IP configuration found)
    [ 176.067382] <14>NetworkManager[132]: <info> (usb0): device state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
    [ 176.081024] <30>NetworkManager[132]: NetworkManager[132]: <info> (usb0): device state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
    [ 176.095947] <12>NetworkManager[132]: <warn> Activation (usb0) failed.
    [ 176.102752] <30>NetworkManager[132]: NetworkManager[132]: <warn> Activation (usb0) failed.
    [ 176.111511] <14>NetworkManager[132]: <info> Activation (usb0) Stage 5 of 5 (IP Configure Commit) complete.
    [ 176.121734] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 5 of 5 (IP Configure Commit) complete.
    [ 176.133880] <14>NetworkManager[132]: <info> (usb0): device state change: failed -> disconnected (reason 'none') [120 30 0]
    [ 176.145538] <30>NetworkManager[132]: NetworkManager[132]: <info> (usb0): device state change: failed -> disconnected (reason 'none') [120 30 0]
    [ 176.159118] <14>NetworkManager[132]: <info> (usb0): deactivating device (reason 'none') [0]
    [ 176.168151] <30>NetworkManager[132]: NetworkManager[132]: <info> (usb0): deactivating device (reason 'none') [0]
    [ 176.178894] <30>avahi-daemon[143]: Withdrawing address record for 10.0.0.20 on usb0.
    [ 176.187103] <30>avahi-daemon[143]: Leaving mDNS multicast group on interface usb0.IPv4 with address 10.0.0.20.
    [ 176.197692] <30>avahi-daemon[143]: Interface usb0.IPv4 no longer relevant for mDNS.
    ping: sendto: Network is unreachable
    root@beagleboard:~# [ 178.687561] <14>NetworkManager[132]: <info> Auto-activating connection 'Wired connection 1'.
    [ 178.702331] <14>NetworkManager[132]: <info> Activation (usb0) starting connection 'Wired connection 1'
    [ 178.712951] <14>NetworkManager[132]: <info> (usb0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
    [ 178.724975] <30>NetworkManager[132]: NetworkManager[132]: <info> Auto-activating connection 'Wired connection 1'.
    [ 178.736145] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) starting connection 'Wired connection 1'
    [ 178.750030] <30>NetworkManager[132]: NetworkManager[132]: <info> (usb0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
    [ 178.764343] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 1 of 5 (Device Prepare) scheduled...
    [ 178.776824] <14>NetworkManager[132]: <info> Activation (usb0) Stage 1 of 5 (Device Prepare) scheduled...
    [ 178.787170] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 1 of 5 (Device Prepare) started...
    [ 178.799346] <14>NetworkManager[132]: <info> Activation (usb0) Stage 1 of 5 (Device Prepare) started...
    [ 178.809600] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) scheduled...
    [ 178.823333] <14>NetworkManager[132]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) scheduled...
    [ 178.833953] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 1 of 5 (Device Prepare) complete.
    [ 178.845977] <14>NetworkManager[132]: <info> Activation (usb0) Stage 1 of 5 (Device Prepare) complete.
    [ 178.856079] <14>NetworkManager[132]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) starting...
    [ 178.868865] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) starting...
    [ 178.881317] <14>NetworkManager[132]: <info> (usb0): device state change: prepare -> config (reason 'none') [40 50 0]
    [ 178.895477] <30>NetworkManager[132]: NetworkManager[132]: <info> (usb0): device state change: prepare -> config (reason 'none') [40 50 0]
    [ 178.923431] <14>NetworkManager[132]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) successful.
    [ 178.943969] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) successful.
    [ 178.973449] <14>NetworkManager[132]: <info> Activation (usb0) Stage 3 of 5 (IP Configure Start) scheduled.
    [ 178.990295] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 3 of 5 (IP Configure Start) scheduled.
    [ 179.002838] <14>NetworkManager[132]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) complete.
    [ 179.013427] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 2 of 5 (Device Configure) complete.
    [ 179.025634] <14>NetworkManager[132]: <info> Activation (usb0) Stage 3 of 5 (IP Configure Start) started...
    [ 179.036224] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 3 of 5 (IP Configure Start) started...
    [ 179.048706] <14>NetworkManager[132]: <info> (usb0): device state change: config -> ip-config (reason 'none') [50 70 0]
    [ 179.060333] <30>NetworkManager[132]: NetworkManager[132]: <info> (usb0): device state change: config -> ip-config (reason 'none') [50 70 0]
    [ 179.073944] <14>NetworkManager[132]: <info> Activation (usb0) Beginning DHCPv4 transaction (timeout in 45 seconds)
    [ 179.085174] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Beginning DHCPv4 transaction (timeout in 45 seconds)
    [ 179.100494] <14>NetworkManager[132]: <info> dhclient started with pid 348
    [ 179.108001] <30>NetworkManager[132]: NetworkManager[132]: <info> dhclient started with pid 348
    [ 179.118896] <14>NetworkManager[132]: <info> Activation (usb0) Stage 3 of 5 (IP Configure Start) complete.
    [ 179.140502] <30>NetworkManager[132]: NetworkManager[132]: <info> Activation (usb0) Stage 3 of 5 (IP Configure Start) complete.
    [ 179.189056] <30>dhclient[348]: Internet Systems Consortium DHCP Client 4.2.0
    [ 179.198425] <30>dhclient[348]: Copyright 2004-2010 Internet Systems Consortium.
    [ 179.207031] <30>NetworkManager[132]: Internet Systems Consortium DHCP Client 4.2.0
    [ 179.215759] <30>dhclient[348]: All rights reserved.
    [ 179.221405] <30>NetworkManager[132]: Copyright 2004-2010 Internet Systems Consortium.
    [ 179.231109] <30>dhclient[348]: For info, please visit https://www.isc.org/software/dhcp/
    [ 179.240264] <30>NetworkManager[132]: All rights reserved.
    [ 179.246887] <30>NetworkManager[132]: For info, please visit https://www.isc.org/software/dhcp/
    [ 179.256347] <27>dhclient[348]: can't create /var/lib/dhcp/dhclient-0c0c5428-c126-43cf-8afe-4c6c853eff49-usb0.lease: No such file or directory
    [ 179.269897] <30>NetworkManager[132]: can't create /var/lib/dhcp/dhclient-0c0c5428-c126-43cf-8afe-4c6c853eff49-usb0.lease: No such file or directory
    [ 179.283996] <30>NetworkManager[132]: NetworkManager[132]: <info> (usb0): DHCPv4 state changed nbi -> preinit
    [ 179.294647] <14>NetworkManager[132]: <info> (usb0): DHCPv4 state changed nbi -> preinit
    [ 179.303375] <30>dhclient[348]: Listening on LPF/usb0/36:19:ca:a6:b0:b2
    [ 179.310516] <30>dhclient[348]: Sending on LPF/usb0/36:19:ca:a6:b0:b2
    [ 179.317657] <30>NetworkManager[132]: Listening on LPF/usb0/36:19:ca:a6:b0:b2
    [ 179.325256] <30>dhclient[348]: Sending on Socket/fallback
    [ 179.331268] <30>NetworkManager[132]: Sending on LPF/usb0/36:19:ca:a6:b0:b2
    [ 179.339019] <30>dhclient[348]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 4
    [ 179.347930] <30>NetworkManager[132]: Sending on Socket/fallback
    [ 179.354583] <30>NetworkManager[132]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 4

    root@beagleboard:~#
    root@beagleboard:~# [ 183.251190] <30>dhclient[348]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 10
    [ 183.260375] <30>NetworkManager[132]: DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 10

    root@beagleboard:~# ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:6 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:672 (672.0 B) TX bytes:672 (672.0 B)

    usb0 Link encap:Ethernet HWaddr 36:19:CA:A6:B0:B2
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:377 errors:0 dropped:13 overruns:0 frame:0
    TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:30429 (29.7 KiB) TX bytes:13694 (13.3 KiB)

    Regards,
    Ran
  • Hi Ran,

    After I analyze the log I think that the reason for the ping stopping is that you have static dhcp configuration on the usb0 interface but in the same time the dhcp client is started at the same interface usb0. When the dhcp discover retransmission times out the dhcp client clears the usb0 interface configuration (including your static settings).
    I suggest you to kill the dhcp client or to change interface configuration as follow:

    Open the /etc/network/interfaces file with some text editor.

    Search for something like "iface usb0 inet dhcp" and comment it by #.
    Then add if it is missing the following configuration:
    iface usb0 inet static
            address 192.168.129.201  # Change with your device IP
            netmask 255.255.255.0    # Change ...
            network 192.168.129.0    # Change ...
            gateway 192.168.129.200  # Change ...

    Save the change and then execute the command:
    /etc/init.d/networking restart

    Then execute 'ifconfig -a' and share the output.

    If the usb0 is down or the configuration is missing configure the usb0 interface again with static configuration.

    BR

    Tsvetolin Shulev