Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ethernet USB Gadget not working, no ethernet interface
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Chagatai
n00b
n00b


Joined: 10 Jul 2021
Posts: 14

PostPosted: Sun Jul 11, 2021 8:55 am    Post subject: Ethernet USB Gadget not working, no ethernet interface Reply with quote

I've been trying to get my Ethernet USB gadget to work on my Gentoo machine for months now on and off and I've had no meaningful progress resolving this issue. I've tried to follow the following guide recently to try to get the gadget working - https://developer.ridgerun.com/wiki/index.php/How_to_use_USB_device_networking

I built that driver into the kernel, not as a module. I have enabled Ethernet driver support in the kernel as well. Everything else in my .config is pretty standard, I don't have anything too specific with regards to networking.

I'm using Gentoo on a Purism Librem 15v3 in case there's anyone out there with the same problem. I'm absolutely stuck here and I have no idea what to do.

Here's the output of some relevant commands.

Code:


myusername@myhostname ~ % lspci | grep -i Ethernet

myusername@myhostname ~ % lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.1 USB controller: Intel Corporation Device 9d30 (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
00:1f.5 Non-VGA unclassified device: Intel Corporation Device 9d24 (rev 21)
01:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01)
02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a809

myusername@myhostname ~ % lsusb
Bus 001 Device 006: ID 0b95:772b ASIX Electronics Corp. AX88772B
Bus 001 Device 003: ID 0489:e076 Foxconn / Hon Hai
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 004: ID 058f:d102 Alcor Micro Corp. HD WebCam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

myusername@myhostname ~ % ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 38:b1:db:76:d6:29 brd ff:ff:ff:ff:ff:ff
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0

myusername@myhostname ~ % lsmod
Module                  Size  Used by
x86_pkg_temp_thermal    20480  0

myusername@myhostname ~ % dmesg | grep -i ethernet
[    0.336783] jme: JMicron JMC2XX ethernet driver version 1.0.8

myusername@myhostname ~ % dmesg | grep g_ether
[    0.352245] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers



Last edited by Chagatai on Sun Jul 11, 2021 4:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jul 11, 2021 9:08 am    Post subject: Reply with quote

Welcome to Gentoo!

Plz backup your .config and try with
Code:

CONFIG_USB_NET_DRIVERS=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_AX88179_178A=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_CDC_NCM=m
CONFIG_USB_NET_HUAWEI_CDC_NCM=m
CONFIG_USB_NET_CDC_MBIM=m
CONFIG_USB_NET_DM9601=m
CONFIG_USB_NET_SR9700=m
CONFIG_USB_NET_SR9800=m
CONFIG_USB_NET_SMSC75XX=m
CONFIG_USB_NET_SMSC95XX=m
CONFIG_USB_NET_GL620A=m
CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDC_SUBSET_ENABLE=m
CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_NET_ZAURUS=m
CONFIG_USB_NET_CX82310_ETH=m
CONFIG_USB_NET_KALMIA=m
CONFIG_USB_NET_QMI_WWAN=m
CONFIG_USB_NET_INT51X1=m
CONFIG_USB_CDC_PHONET=m
CONFIG_USB_SIERRA_NET=m
CONFIG_USB_NET_CH9200=m
CONFIG_USB_NET_AQC111=m
CONFIG_USB_NET_RNDIS_WLAN=m
CONFIG_USB4_NET=m
CONFIG_USB_NET2272=m
CONFIG_USB_NET2280=m

CONFIG_USB_RTL8152=m

Quote:

I built that driver into the kernel, not as a module

Plz prefer it as a module.
Before rebuilding
plz try
Code:

modprobe usbnet
modprobe r8152

_________________
:)
Back to top
View user's profile Send private message
Chagatai
n00b
n00b


Joined: 10 Jul 2021
Posts: 14

PostPosted: Sun Jul 11, 2021 10:03 am    Post subject: Reply with quote

alamahant wrote:
Welcome to Gentoo!

Plz backup your .config and try with
Code:

CONFIG_USB_NET_DRIVERS=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_AX88179_178A=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_CDC_NCM=m
CONFIG_USB_NET_HUAWEI_CDC_NCM=m
CONFIG_USB_NET_CDC_MBIM=m
CONFIG_USB_NET_DM9601=m
CONFIG_USB_NET_SR9700=m
CONFIG_USB_NET_SR9800=m
CONFIG_USB_NET_SMSC75XX=m
CONFIG_USB_NET_SMSC95XX=m
CONFIG_USB_NET_GL620A=m
CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDC_SUBSET_ENABLE=m
CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_NET_ZAURUS=m
CONFIG_USB_NET_CX82310_ETH=m
CONFIG_USB_NET_KALMIA=m
CONFIG_USB_NET_QMI_WWAN=m
CONFIG_USB_NET_INT51X1=m
CONFIG_USB_CDC_PHONET=m
CONFIG_USB_SIERRA_NET=m
CONFIG_USB_NET_CH9200=m
CONFIG_USB_NET_AQC111=m
CONFIG_USB_NET_RNDIS_WLAN=m
CONFIG_USB4_NET=m
CONFIG_USB_NET2272=m
CONFIG_USB_NET2280=m

CONFIG_USB_RTL8152=m

Quote:

I built that driver into the kernel, not as a module

Plz prefer it as a module.
Before rebuilding
plz try
Code:

modprobe usbnet
modprobe r8152


Thanks. I'm having some trouble locating where these config options should be available in make menuconfig. I tried a couple search engines and grepping my current .config for the options but I only found a few which I had already buiilt in and I've now built them as a module.

Any tips on how to find these options?

These seem pretty important but I can't locate them.

Code:


CONFIG_USB_NET_DRIVERS=m
CONFIG_USB_USBNET=m



Or should I just try pasting this whole thing into the .config? I would prefer to know where to find these though.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4149
Location: Bavaria

PostPosted: Sun Jul 11, 2021 10:47 am    Post subject: Reply with quote

Chagatai wrote:
Or should I just try pasting this whole thing into the .config? [...]

Please dont do it. Some options in your kernel configuration are only available if you have enabled some other. First you need this (do it via "make menuconfig"):
Code:
Device Drivers  --->
  [*] Network device support  --->
    [*]   USB Network Adapters  --->
Back to top
View user's profile Send private message
Chagatai
n00b
n00b


Joined: 10 Jul 2021
Posts: 14

PostPosted: Sun Jul 11, 2021 11:10 am    Post subject: Reply with quote

pietinger wrote:
Chagatai wrote:
Or should I just try pasting this whole thing into the .config? [...]

Please dont do it. Some options in your kernel configuration are only available if you have enabled some other. First you need this (do it via "make menuconfig"):
Code:
Device Drivers  --->
  [*] Network device support  --->
    [*]   USB Network Adapters  --->


Thank you very much! The solution worked.

I had actually seen these config options before but I couldn't locate them and I assumed that they might be for an older kernel version. Turns out I was looking in the completely wrong places.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sun Jul 11, 2021 11:11 am    Post subject: Reply with quote

Chagatai,

What two devices are you trying to connect?

When you are looking for config options that are 'missing' go into menuconfig and press the 'z' key
This will display all the hidden and therefore unselectable options.
They will appear in the search too, so you can go to them and read the Depends on: boolean in the help.
That Depends on: boolean must evaluate to true before the option can be selected.

Note: You may need to apply this search and enable process several times.

Gadget ethernet devices can appear as ethX or usbX. In either case udev will mangle the names.

Never edit the kernel .config by hand. Read some of the help.
Some options select several others. You are unlikely to get the 'several others' with hand editing and if your kernel builds, it likely won't work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Chagatai
n00b
n00b


Joined: 10 Jul 2021
Posts: 14

PostPosted: Sun Jul 11, 2021 1:29 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Chagatai,

What two devices are you trying to connect?

When you are looking for config options that are 'missing' go into menuconfig and press the 'z' key
This will display all the hidden and therefore unselectable options.
They will appear in the search too, so you can go to them and read the Depends on: boolean in the help.
That Depends on: boolean must evaluate to true before the option can be selected.

Note: You may need to apply this search and enable process several times.

Gadget ethernet devices can appear as ethX or usbX. In either case udev will mangle the names.

Never edit the kernel .config by hand. Read some of the help.
Some options select several others. You are unlikely to get the 'several others' with hand editing and if your kernel builds, it likely won't work.


Thanks for the friendly advice! I was unaware of the 'z' option in the menuconfig.

I was simply trying to connect a LAN cable from my router to my laptop with an Ethernet to USB thing.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sun Jul 11, 2021 2:45 pm    Post subject: Reply with quote

Chagatai,

Code:
myusername@myhostname ~ % lsusb
Bus 001 Device 003: ID 0489:e076 Foxconn / Hon Hai
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 004: ID 058f:d102 Alcor Micro Corp. HD WebCam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


There are no USB Ethernet devices there, so your USB/Ethernet doda was not connected,
From the 0489:e076, that's a Bluetooth 0489:e076 Foxconn / Hon Hai not working Bluetooth interface.

Further, it won't use "Gadget Mode". That's for Ethernet protocol over USB, as in tethering a mobile phone.

Step one is to get your USB Ethernet interface to appear in lsusb.

If its connected now unplug it. Look at dmesg and make a note of the time of the last entry.
Reconnect the device and post everything in dmesg after the the time you noted above.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Chagatai
n00b
n00b


Joined: 10 Jul 2021
Posts: 14

PostPosted: Sun Jul 11, 2021 4:22 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Chagatai,

Code:
myusername@myhostname ~ % lsusb
Bus 001 Device 003: ID 0489:e076 Foxconn / Hon Hai
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 004: ID 058f:d102 Alcor Micro Corp. HD WebCam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


There are no USB Ethernet devices there, so your USB/Ethernet doda was not connected,
From the 0489:e076, that's a Bluetooth 0489:e076 Foxconn / Hon Hai not working Bluetooth interface.

Further, it won't use "Gadget Mode". That's for Ethernet protocol over USB, as in tethering a mobile phone.

Step one is to get your USB Ethernet interface to appear in lsusb.

If its connected now unplug it. Look at dmesg and make a note of the time of the last entry.
Reconnect the device and post everything in dmesg after the the time you noted above.


I just noticed that I had the USB disconnected when I was running the command for the post. Sorry about that. The proper command output has been edited in.

Hmm, so I don't actually need to build support for USB Gadgets at all? That's great to know. I was a bit confused about that. I'll rebuild without the gadget support. Thanks!

The issue has been resolved after I found where the proper kernel modules were, but thank you for your explanation.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum