Forums

Tommy
Tommy
Offline
Resolved
0 votes
Noob:
Running fresh install of ClearOS home 7. In order to run gateway mode a second Ethernet is needed, hence I added an USB LAN port from Realtek. It is not recognized and cant be added on the web-interface. I plugged the same into a Debian box and it was recognized = the unit is working and recognized by standard Linux kernel. I was able to find the Debian driver for the USB LAN online and download it. Problem now is how to actually upload it to ClearOs, keeping in mind that I have near to none Linux experience.
Friday, November 16 2018, 12:21 PM
Share this post:

Accepted Answer

Friday, November 16 2018, 01:47 PM - #Permalink
Resolved
0 votes
The USB 3.0 NIC below works out of the box with ClearOS 7 using the ax88179_178a driver included

https://www.dlink.com.au/home-solutions/DUB-1312-usb-3-0-to-gigabit-ethernet-adapter

Have two in use here...
The reply is currently minimized Show
Responses (7)
  • Accepted Answer

    Tuesday, December 04 2018, 09:47 AM - #Permalink
    Resolved
    0 votes
    This is beginning to look like a mess. It seems that support of WiFi interfaces was removed mid-release in November. I'm really not happy with this and am asking for the decision to be reversed. It does not mean you can't use WiFi interfaces. You'll just have to do the initial set up by hand. The biggest problem is identifying the NIC name.

    Try this.
    Cold boot without the NIC.
    Plug in the NIC
    Type "dmesg". You should see something like:
    [   80.703825] usb 2-3: new high-speed USB device number 4 using xhci_hcd
    [ 80.821163] usb 2-3: New USB device found, idVendor=7392, idProduct=7811
    [ 80.821175] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 80.821181] usb 2-3: Product: 802.11n WLAN Adapter
    [ 80.821186] usb 2-3: Manufacturer: Realtek
    [ 80.821191] usb 2-3: SerialNumber: 00e04c000001
    [ 81.106998] rtl8192cu: Chip version 0x10
    [ 81.617875] rtl8192cu: Board Type 0
    [ 81.619582] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
    [ 81.619693] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
    [ 81.622051] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
    [ 81.625281] usbcore: registered new interface driver rtl8192cu

    This shows the NIC being detected and driver (rtl8192cu) being loaded. If you don't see your r8152 driver being loaded, type "modprobe r8152" and have another look at dmesg. There should also be similar messages in /var/log/messages.
    Then type "ls /sys/class/net" your NIC name should start with "w". Note it. (there must be better ways of getting to the name but this may be OK)

    Go to /etc/sysconfig/network-scripts and create a file ifcfg-your_NIC_name. Use as a template the ifcfg file from another LAN interface, but change the "TYPE" to "Wireless" and the DEVICE to your_NIC_name. Change the IPADDR to be in a different LAN subnet.
    I have a /etc/sysconfig/network-scripts/ifcfg-wlp0s16u3 with:
    DEVICE=wlp0s16u3
    TYPE="Wireless"
    ONBOOT="yes"
    USERCTL="no"
    BOOTPROTO="static"
    IPADDR="172.22.122.1"
    NETMASK="255.255.255.0"


    At this point you should be able to do an "ifup your_NIC_name". It may fail until you configure your AP settings (install app-wireless and be prepared to configure /etc/hostapd/hostapd.conf manually - I can't remember its state. I think there is ClearOS documentation to cover it).

    Now you have the ifcfg file, the NIC should be available in the DHCP Server app and the Wireless Access Point app.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 17 2018, 09:39 AM - #Permalink
    Resolved
    0 votes
    I think we've all missed the answer. I've just done a "modinfo r8152" and it gives:
    [root@server ~]# modinfo r8152
    filename: /lib/modules/3.10.0-862.11.6.v7.x86_64/kernel/drivers/net/usb/r8152.ko.xz
    version: v1.08.9
    license: GPL
    description: Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
    author: Realtek linux nic maintainers <nic_swsd@realtek.com>
    retpoline: Y
    rhelversion: 7.5
    srcversion: 57B292E3EADC5AA0E303FC1
    alias: usb:v0955p09FFd*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v0955p09FFd*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v17EFp7214d*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v17EFp7214d*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v17EFp720Cd*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v17EFp720Cd*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v17EFp7205d*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v17EFp7205d*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v17EFp3069d*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v17EFp3069d*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v17EFp3062d*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v17EFp3062d*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v17EFp304Fd*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v17EFp304Fd*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v04E8pA101d*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v04E8pA101d*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v045Ep07C6d*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v045Ep07C6d*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v045Ep07ABd*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v045Ep07ABd*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v0BDAp8153d*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v0BDAp8153d*dc*dsc*dp*icFFisc*ip*in*
    alias: usb:v0BDAp8152d*dc*dsc*dp*ic02isc06ip00in*
    alias: usb:v0BDAp8152d*dc*dsc*dp*icFFisc*ip*in*
    depends: mii
    intree: Y
    vermagic: 3.10.0-862.11.6.v7.x86_64 SMP mod_unload modversions
    signer: CentOS Linux kernel signing key
    sig_key: A8:3C:CC:61:6B:01:A2:80:BB:33:24:28:04:9F:6F:0F:0D:D7:3B:76
    sig_hashalgo: sha256
    So it covers the USB ID 0bda:8153. Try just typing:
    modprobe r8152
    Your interface may just appear. If it does, good.

    If it does not subsequently reappear after boot up, add a file /etc/sysconfig/modules/r8152.modules (I think it can be called anything.modules), and in it put:
    modprobe r8152
    Then make the file executable. It should now survive a reboot.
    Like
    1
    The reply is currently minimized Show
  • Accepted Answer

    Tommy
    Tommy
    Offline
    Friday, November 16 2018, 04:16 PM - #Permalink
    Resolved
    0 votes
    that worked. thanks all
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 16 2018, 01:36 PM - #Permalink
    Resolved
    0 votes
    I've tried compiling it and it fails. I don't have the knowledge to fix it.
    [root@server r8152-2.10.0]# make modules
    make -C /lib/modules/3.10.0-862.11.6.v7.x86_64/build SUBDIRS=/root/rtl8153/r8152-2.10.0 modules
    make[1]: Entering directory `/usr/src/kernels/3.10.0-862.11.6.v7.x86_64'
    CC [M] /root/rtl8153/r8152-2.10.0/r8152.o
    In file included from /root/rtl8153/r8152-2.10.0/r8152.c:30:0:
    /root/rtl8153/r8152-2.10.0/compatibility.h:20:0: warning: "NETIF_F_CSUM_MASK" redefined [enabled by default]
    #define NETIF_F_CSUM_MASK NETIF_F_ALL_CSUM
    ^
    In file included from include/linux/skbuff.h:36:0,
    from include/linux/if_ether.h:23,
    from include/uapi/linux/ethtool.h:18,
    from include/linux/ethtool.h:17,
    from include/linux/netdevice.h:43,
    from /root/rtl8153/r8152-2.10.0/r8152.c:15:
    include/linux/netdev_features.h:191:0: note: this is the location of the previous definition
    #define NETIF_F_CSUM_MASK (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
    ^
    In file included from /root/rtl8153/r8152-2.10.0/r8152.c:30:0:
    /root/rtl8153/r8152-2.10.0/compatibility.h:22:0: warning: "IS_REACHABLE" redefined [enabled by default]
    #define IS_REACHABLE(option) (defined(option) || \
    ^
    In file included from <command-line>:0:0:
    ././include/linux/kconfig.h:52:0: note: this is the location of the previous definition
    #define IS_REACHABLE(option) (config_enabled(option) || \
    ^
    In file included from /root/rtl8153/r8152-2.10.0/r8152.c:30:0:
    /root/rtl8153/r8152-2.10.0/compatibility.h:25:0: warning: "skb_vlan_tag_present" redefined [enabled by default]
    #define skb_vlan_tag_present(__skb) vlan_tx_tag_present(__skb)
    ^
    In file included from /root/rtl8153/r8152-2.10.0/r8152.c:21:0:
    include/linux/if_vlan.h:81:0: note: this is the location of the previous definition
    #define skb_vlan_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
    ^
    In file included from /root/rtl8153/r8152-2.10.0/r8152.c:30:0:
    /root/rtl8153/r8152-2.10.0/compatibility.h:26:0: warning: "skb_vlan_tag_get" redefined [enabled by default]
    #define skb_vlan_tag_get(__skb) vlan_tx_tag_get(__skb)
    ^
    In file included from /root/rtl8153/r8152-2.10.0/r8152.c:21:0:
    include/linux/if_vlan.h:82:0: note: this is the location of the previous definition
    #define skb_vlan_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
    ^
    In file included from /root/rtl8153/r8152-2.10.0/r8152.c:30:0:
    /root/rtl8153/r8152-2.10.0/compatibility.h:27:0: warning: "skb_vlan_tag_get_id" redefined [enabled by default]
    #define skb_vlan_tag_get_id(__skb) vlan_tx_tag_get_id(__skb)
    ^
    In file included from /root/rtl8153/r8152-2.10.0/r8152.c:21:0:
    include/linux/if_vlan.h:83:0: note: this is the location of the previous definition
    #define skb_vlan_tag_get_id(__skb) ((__skb)->vlan_tci & VLAN_VID_MASK)
    ^
    /root/rtl8153/r8152-2.10.0/r8152.c: In function ‘rtl_tx_vlan_tag’:
    /root/rtl8153/r8152-2.10.0/r8152.c:1627:2: error: implicit declaration of function ‘vlan_tx_tag_present’ [-Werror=implicit-function-declaration]
    if (skb_vlan_tag_present(skb)) {
    ^
    /root/rtl8153/r8152-2.10.0/r8152.c:1630:3: error: implicit declaration of function ‘vlan_tx_tag_get’ [-Werror=implicit-function-declaration]
    opts2 = TX_VLAN_TAG | swab16(skb_vlan_tag_get(skb));
    ^
    /root/rtl8153/r8152-2.10.0/r8152.c: In function ‘rtl8152_set_speed’:
    /root/rtl8153/r8152-2.10.0/r8152.c:5629:11: error: ‘BMCR_SPEED10’ undeclared (first use in this function)
    bmcr = BMCR_SPEED10;
    ^
    /root/rtl8153/r8152-2.10.0/r8152.c:5629:11: note: each undeclared identifier is reported only once for each function it appears in
    /root/rtl8153/r8152-2.10.0/r8152.c: At top level:
    /root/rtl8153/r8152-2.10.0/r8152.c:7656:2: error: unknown field ‘ndo_change_mtu’ specified in initializer
    .ndo_change_mtu = rtl8152_change_mtu,
    ^
    /root/rtl8153/r8152-2.10.0/r8152.c:7656:2: warning: initialization from incompatible pointer type [enabled by default]
    /root/rtl8153/r8152-2.10.0/r8152.c:7656:2: warning: (near initialization for ‘rtl8152_netdev_ops.ndo_validate_addr’) [enabled by default]
    cc1: some warnings being treated as errors
    make[2]: *** [/root/rtl8153/r8152-2.10.0/r8152.o] Error 1
    make[1]: *** [_module_/root/rtl8153/r8152-2.10.0] Error 2
    make[1]: Leaving directory `/usr/src/kernels/3.10.0-862.11.6.v7.x86_64'
    make: *** [modules] Error 2
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 16 2018, 01:11 PM - #Permalink
    Resolved
    0 votes
    The driver you've downloaded is not for your NIC. It is for and RTL8111/8168/8411 wired NIC. The one you seem to want is the RTL8153. You'll need to download the sources and compile it, but then you'll need to re-compile it for every kernel update. You can download the source from here.

    To compile you may need to set up the development environment following the instructions here but you won't need to install an editor.
    The reply is currently minimized Show
  • Accepted Answer

    Tommy
    Tommy
    Offline
    Friday, November 16 2018, 12:46 PM - #Permalink
    Resolved
    0 votes
    ah ok, Isusb shows: ID 0bda:8153 Realtek Semiconductor Corp.
    the driver downloaded (0008-r8168-8.043.02.tar.bz2 is:
    RealTek RTL8168B/8111B, RTL8168C/8111C, RTL8168CP/8111CP, RTL8168D/8111D, RTL8168DP/8111DP, and RTL8168E/8111E Gigabit Ethernet controllers with PCI-Express interface.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 16 2018, 12:38 PM - #Permalink
    Resolved
    0 votes
    You can't load a NIC driver in ClearOS which has not been compiled for ClearOS. What is the driver and what is the output of "lsusb"?
    The reply is currently minimized Show
Your Reply