2

I'm configuring RPi as a WiFi repeater. Built-in WiFi module works as a main network adapter and configured to receive DHCP address. Second adapter Asus N10 dongle, meant to create a local WiFi network, detected successfully after inserting as wlan1 in addition to built-in wlan0. Problem is, after reboot interface disappearing from the system (ifconfig does not show wlan1) and I need to re-insert it.

I tried configuring /etc/network/interfaces

auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual

and /etc/dhcpcd.conf

interface wlan1
    static ip_address=192.168.4.1/24
    nohook wpa_supplicant

No effect, adapter still requires re-inserting

UPDATE dmesg output right after boot gives the following messages

[4.348457] usb 1-1.2: r8712u: USB_SPEED_HIGH with 4 endpoints
[4.349986] usb 1-1.2: r8712u: Boot from EFUSE: Autoload OK
[4.605101] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04
[4.605826] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 9.10.105 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2018-03-09 18:56:28 
[4.977617] usb 1-1.2: r8712u: CustomerID = 0x0010
[4.977639] usb 1-1.2: r8712u: MAC Address from efuse = 30:85:a9:6e:5a:d9
[4.977650] usb 1-1.2: r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"

30:85:a9:6e:5a:d9 is Asus N10 MAC address

After I re-insert the adapter, I see new messages in the output

[436.052089] usb 1-1.2: new high-speed USB device number 7 using dwc_otg
[436.184403] usb 1-1.2: New USB device found, idVendor=0b05, idProduct=1786
[436.184419] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[436.184428] usb 1-1.2: Product: ASUS EZ N Network Adapter
[436.184436] usb 1-1.2: Manufacturer: Manufacturer Realtek 
[436.184444] usb 1-1.2: SerialNumber: 00e04c000001
[436.187629] r8712u: register rtl8712_netdev_ops to netdev_ops
[436.187653] usb 1-1.2: r8712u: USB_SPEED_HIGH with 4 endpoints
[436.189124] usb 1-1.2: r8712u: Boot from EFUSE: Autoload OK
[436.613105] usb 1-1.2: r8712u: CustomerID = 0x0010
[436.613125] usb 1-1.2: r8712u: MAC Address from efuse = 30:85:a9:6e:5a:d9
[436.613149] usb 1-1.2: r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"
[437.562399] r8712u 1-1.2:1.0 wlan1: 1 RCR=0x153f00e
[437.562936] r8712u 1-1.2:1.0 wlan1: 2 RCR=0x553f00e
[439.682544] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready

UPDATE2

Also I receive Under-voltage detected! (0x00050005) message during every reboot. Maybe it affects hardware initialization, I'm not sure

UPDATE3

ifconfig as requested

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:f9:c3:2d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1554  bytes 185783 (181.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1554  bytes 185783 (181.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.38  netmask 255.255.252.0  broadcast 192.168.3.255
        inet6 fe80::f490:92fc:c558:8541  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:ac:96:78  txqueuelen 1000  (Ethernet)
        RX packets 16671  bytes 16141581 (15.3 MiB)
        RX errors 0  dropped 18  overruns 0  frame 0
        TX packets 11804  bytes 1416579 (1.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Asus adapter description, which appears after re-inserting

wlan1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 30:85:a9:6e:5a:d9  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
  • please search for any messages in output of dmesg regarding the adapter before and after you re-insert it - post any relevant dmesg info in the question – Jaromanda X Mar 28 at 12:38
  • Done, see update – Yuri S. Cherkasov Mar 28 at 13:21
  • before you re-insert it, what's the output of ifconfig -a -s – Jaromanda X Mar 28 at 13:39
  • I described above, wlan0 only – Yuri S. Cherkasov Mar 28 at 14:09
  • I now you said what ifconfig output is ... but did you do ifconfig -a - I want to see if it's just down for some reason – Jaromanda X Mar 28 at 14:20
1

You are using Debian networking managed with /etc/network/interfaces together with dhcpcd. It is known that there are some quirks using this combination in particular with wpa_supplicant. What I mean you can look at Differences between /etc/dhcpcd.conf and /etc/network/interfaces?. I suppose you are also using hostapd and dnsmasq which are additional components needing there own configuration.

If you do not find a solution with this classic setup you may consider to give systemd-networkd a try. It is more straightforward and does not need additional components. It has everything built-in. You only have to configure it and it distinguish clean between the single interfaces wlan0 and wlan1. How to do it you may have a look at Access point as WiFi repeater with additional WiFi-dongle.

  • I tried it together and separately, still no effect. I believe the reason is more low-level, as long as wlan1 is not in the system and not listed by ifconfig until re-inserted. What kind of initialization happen when I insert the adapter? I can see it in dmesg. If I can perform it on boot, the problem is solved – Yuri S. Cherkasov Mar 29 at 2:36
  • @YuriS.Cherkasov Seems to be a problem with autoplug. This is managed by udev rules. You may have a look at it. – Ingo Mar 29 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.