Jump to content

Ethernet USB gadget not working on legacy


sgufa
Go to solution Solved by sgufa,

Recommended Posts

Hi. i tried to use g_ether module on legacy 3.4.112 kernel but without success. 

 

Could anyone help me?

 

this is what i have when i run modprobe g_ether:

 

 

[sw_udc]: [sw_usb_udc]: binding gadget driver 'g_ether'
[sw_udc]: alloc request: ep(0xc0a8b7e8, ep0, 64), req(0xef3c8940)
WRN:L2728(drivers/usb/sunxi_usb/udc/sw_udc.c):ERR: usb device is not active
<4>g_ether gadget: using random self ethernet address
<4>g_ether gadget: using random host ethernet address
<6>usb0: MAC 5a:1d:b8:22:02:7f
<6>usb0: HOST MAC 6e:49:95:27:67:f7
ep_matches, wrn: endpoint already claimed, ep(0xc0a8b834, 0xeeb62480, ep1-bulk)
ep_matches, wrn: endpoint already claimed, ep(0xc0a8b834, 0xeeb62480, ep1-bulk)
ep_matches, wrn: endpoint already claimed, ep(0xc0a8b880, 0xeeb62480, ep2-bulk)
[sw_udc]: alloc request: ep(0xc0a8b8cc, ep3-bulk, 512), req(0xee6b2000)
ep_matches, wrn: endpoint already claimed, ep(0xc0a8b834, 0xeeb62480, ep1-bulk)
<6>g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
<6>g_ether gadget: g_ether ready
WRN:L2762(drivers/usb/sunxi_usb/udc/sw_udc.c):ERR: usb device is not active
 
Suggestions?
 
The fex is the cubieboard2 included in lib.
Thank you

 

Link to comment
Share on other sites

Armbian & Khadas are rewarding contributors

Can you please ensure that no gadget module is referenced in /etc/modules, then reboot and show us the output of

cat /sys/bus/platform/devices/sunxi_usb_udc/otg_role

In case this is 2 then please do an

echo 0 >/sys/bus/platform/devices/sunxi_usb_udc/otg_role
modprobe g_ether
echo 2 >/sys/bus/platform/devices/sunxi_usb_udc/otg_role
ifconfig usb0 192.168.99.99 netmask 255.255.255.0 up

and report back.

Link to comment
Share on other sites

with debian i get this:

 

 modprobe g_ether

 

 

[sw_udc]: [sw_usb_udc]: binding gadget driver 'g_ether'

[sw_udc]: alloc request: ep(0xc0a8b7e8, ep0, 64), req(0xee670680)

<4>g_ether gadget: using random self ethernet address

<4>g_ether gadget: using random host ethernet address

<6>usb0: MAC ee:0d:e6:46:d2:05

<6>usb0: HOST MAC 82:f9:1f:a7:f2:35

ep_matches, wrn: endpoint already claimed, ep(0xc0a8b834, 0xee707b80, ep1-bulk)

ep_matches, wrn: endpoint already claimed, ep(0xc0a8b834, 0xee707b80, ep1-bulk)

ep_matches, wrn: endpoint already claimed, ep(0xc0a8b880, 0xee707b80, ep2-bulk)

[sw_udc]: alloc request: ep(0xc0a8b8cc, ep3-bulk, 512), req(0xee0d6bc0)

ep_matches, wrn: endpoint already claimed, ep(0xc0a8b834, 0xee707b80, ep1-bulk)

<6>g_ether gadget: Ethernet Gadget, version: Memorial Day 2008

<6>g_ether gadget: g_ether ready

[sw_udc]: CONFIG_USB_GADGET_DUALSPEED

[sw_udc]: usbd_start_work[sw_udc]: IRQ: suspend

[sw_udc]: ERR: usb speed is unkown

[sw_udc]: IRQ: reset

[sw_udc]: irq: reset happen, throw away all urb

<6>ADDRCONF(NETDEV_UP): usb0: link is not ready

[sw_udc]:

+++++++++++++++++++++++++++++++++++++

[sw_udc]:  usb enter high speed.

[sw_udc]:

+++++++++++++++++++++++++++++++++++++

[sw_udc]: Set address 17

<6>g_ether gadget: high-speed config #2: RNDIS

[sw_udc]: ep enable: ep3(0xc0a8b8cc, ep3-bulk, 128, 8)

[sw_udc]: ep enable: ep1(0xc0a8b834, ep1-bulk, 128, 512)

[sw_udc]: ep enable: ep2(0xc0a8b880, ep2-bulk, 0, 512)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51700)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51f40)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51f00)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51d80)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51dc0)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51740)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51cc0)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51a40)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51d00)

[sw_udc]: alloc request: ep(0xc0a8b834, ep1-bulk, 512), req(0xeea51bc0)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xeea519c0)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xeea51900)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xeea518c0)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xeea515c0)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xeea51b80)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xeea51c40)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xeea51800)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xeea51ac0)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xee9fd900)

[sw_udc]: alloc request: ep(0xc0a8b880, ep2-bulk, 512), req(0xee9fd880)

nuke: ep num is 0

WRN:L1041(drivers/usb/sunxi_usb/udc/sw_udc.c):ERR: Operation not supported

WRN:L1041(drivers/usb/sunxi_usb/udc/sw_udc.c):ERR: Operation not supported

WRN:L1355(drivers/usb/sunxi_usb/udc/sw_udc.c):handle_ep0: ep0 setup end

WRN:L1041(drivers/usb/sunxi_usb/udc/sw_udc.c):ERR: Operation not supported

<6>ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready

<7>usb0: no IPv6 routers present

 

 

and on my pc i see a serial port but not an ethernet card
Link to comment
Share on other sites

Thank you tkaiser. Now the problem is that i have windows 10 x64 and cannot find a compatible rndis driver. is there a way to change the usb vid and pid of the usb gadget on the cubieboard2?

Link to comment
Share on other sites

Thank you tkaiser. Now the problem is that i have windows 10 x64 and cannot find a compatible rndis driver. is there a way to change the usb vid and pid of the usb gadget on the cubieboard2?

You can specify VID and PID as  module parameters to g_ether - check

sudo modinfo g_ether

BTW. Did you try to force standart Microsoft RNDIS driver or it's impossible on Win10 x64?

Link to comment
Share on other sites

  • Solution

Hello zador, i've found an unsigned driver under linux source documentation and installed it bypassing the digital signature verification at boot. All is working well with Jessie. I'll try to understand why it doesnt work on Trusty. I'm downloading a pre-compiled trusty image and gonna test in short time. Thank you all

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines