Ethernet using USB OTG

Started by Dim, November 22, 2014, 09:54:09 PM

Previous topic - Next topic

Dim

Hello everybody.

I am trying to get ethernet up and running on my board a13-OLinuXino rev-E. I have a couple of question.

1. Should I pull the OTG-ID pin on the board to ground?

I have followed these instruction on compiling the kernel: http://linux-sunxi.org/USB_Gadget
Compilation seems OK.

After starting the board and running modprobe g_ether this is what I get.


WRN:L2728(drivers/usb/sunxi_usb/udc/sw_udc.c):[  116.782366] WRN:L2728(drivers/usb/sunxi_usb/udc/sw_udc.c):ERR: usb device
is not active
ERR: usb device is not active
<4>g_ether gadget: using random self ethernet address
[  116.798603] g_ether gadget: using random self ethernet address
<6>usb0: MAC 0a:2f:f1:5d:1d:86
[  116.810063] usb0: MAC 0a:2f:f1:5d:1d:86
<6>usb0: HOST MAC 00:11:22:33:44:55
[  116.823497] usb0: HOST MAC 00:11:22:33:44:55
ep_matches, wrn: endpoint already claimed, ep(0xc0752fc4, 0xdfb445c0, ep1-bulk)
[  116.841576] ep_matches, wrn: endpoint already claimed, ep(0xc0752fc4, 0xdfb445c0, ep1-bulk)
ep_matches, wrn: endpoint already claimed, ep(0xc0752fc4, 0xdfb445c0, ep1-bulk)
[  116.876351] ep_matches, wrn: endpoint already claimed, ep(0xc0752fc4, 0xdfb445c0, ep1-bulk)
ep_matches, wrn: endpoint already claimed, ep(0xc0753010, 0xdfb445c0, ep2-bulk)
[  116.900541] ep_matches, wrn: endpoint already claimed, ep(0xc0753010, 0xdfb445c0, ep2-bulk)
ep_matches, wrn: endpoint already claimed, ep(0xc0752fc4, 0xdfb445c0, ep1-bulk)
[  116.916521] ep_matches, wrn: endpoint already claimed, ep(0xc0752fc4, 0xdfb445c0, ep1-bulk)
<6>g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[  116.930732] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
<6>g_ether gadget: g_ether ready
[  116.940549] g_ether gadget: g_ether ready
WRN:L2762(drivers/usb/sunxi_usb/udc/sw_udc.c):[  116.948748] WRN:L2762(drivers/usb/sunxi_usb/udc/sw_udc.c):ERR: usb device
is not active
ERR: usb device is not active


Any suggestions how to get this thing going?

Dim

I've got it running. For later use:

1. No need to change anything on the board (i.e. pull ID pin to ground).
2. Compile the kernel with these instructions http://linux-sunxi.org/USB_Gadget.
3. Update your SD card.
4. Add the following to "/etc/modules"
g_ether host_addr=00:11:22:33:44:55
5. In "/etc/network/interfaces" on your olinuxino add
auto usb0
iface usb0 inte static
address 10.0.1.2
netmask 255.255.255.0
gateway 10.0.1.1

6. On your host in "/etc/network/interfaces" add
auto usb0
iface usb0 inte static
address 10.0.1.1
netmask 255.255.255.0


After booting up you should be able to ping the two machines.