0

I am newbie in this area and I try to follow the instructions of @Ingo from here since days Link

I have Raspberry 4B 2GB with on board wifi and additional WIFI dongle "TP-Link TL-WN823N"

  1. I started with installing the latest Raspberry PI OS (32-bit) from 11 Jan 2021.

  2. I could sucessfully connect to my wifi and make an update

sudo apt update && sudo apt full-upgrade && sudo reboot

  1. Then I sucessfully installed my dongle based on this manual Link

  2. After that I followed the instructions from Ingo linked above incl. Enabling systemd-networkd and then

sudo -s

and following

Wlan0:

cat > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf <<EOF
country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="RPiNet"
    mode=2
    key_mgmt=WPA-PSK
    psk="passwordhere"
    frequency=2412
}
EOF

chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
systemctl disable wpa_supplicant.service
systemctl enable wpa_supplicant@wlan0.service
rfkill unblock 0

Wlan1:

cat > /etc/wpa_supplicant/wpa_supplicant-wlan1.conf <<EOF
country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="FRITZ!Box 6360 Cable"
    psk="passwordhere"
}
EOF

chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan1.conf
systemctl disable wpa_supplicant.service
systemctl enable wpa_supplicant@wlan1.service
rfkill unblock 2

Network wlan0:

cat > /etc/systemd/network/08-wlan0.network <<EOF
[Match]
Name=wlan0
[Network]
Address=192.168.4.1/24
IPMasquerade=yes
IPForward=yes
DHCPServer=yes
[DHCPServer]
DNS=84.200.69.80 1.1.1.1
EOF

Network wlan1:

cat > /etc/systemd/network/12-wlan1.network <<EOF
[Match]
Name=wlan1
[Network]
DHCP=yes
EOF

and here the logfiles:

pi@raspberrypi:~ $ sudo -s
root@raspberrypi:/home/pi# route -n
Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     303    0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     303    0        0 wlan0
192.168.4.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
root@raspberrypi:/home/pi# ifconfig -a
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether dc:a6:32:f6:d0:63  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  (Lokale Schleife)
        RX packets 4  bytes 280 (280.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 280 (280.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.4.1  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fe80::98b3:5d86:ad9c:bd8a  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:f6:d0:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 45  bytes 6734 (6.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@raspberrypi:/home/pi# ifconfig -a suffices
suffices: Fehler beim Auslesen der Schnittstelleninformation: Gerät nicht gefunden
root@raspberrypi:/home/pi# ip route show
default dev wlan0 scope link src 169.254.194.109 metric 303 
169.254.0.0/16 dev wlan0 scope link src 169.254.194.109 metric 303 
192.168.4.0/24 dev wlan0 proto kernel scope link src 192.168.4.1 
root@raspberrypi:/home/pi# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether dc:a6:32:f6:d0:63 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether dc:a6:32:f6:d0:66 brd ff:ff:ff:ff:ff:ff
    inet 192.168.4.1/24 brd 192.168.4.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet 169.254.194.109/16 brd 169.254.255.255 scope global noprefixroute wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::98b3:5d86:ad9c:bd8a/64 scope link 
       valid_lft forever preferred_lft forever
root@raspberrypi:/home/pi# cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0
root@raspberrypi:/home/pi# 

Result: All 4 files has been created sucessfully and the AP is running so that I can connect into it, but my Raspberry doesn't get any internet connection. I tried with different networks but I never got my Raspi connected with any network. I don't use any MAC filter or any restrictions on my Fritzbox. I also tried to connect to a secured and also an unsecured mobile phone hotspot and failed as well.

It shows following icon:

It shows following icon

I also even can't connect to any wifi manually anymore, have first to delete all the created config files and then it is possible again. I tried several times to repeat all the steps but it just doesn't work.

One line which name is "suffices" says translated from German "Error during reading the interfaces. Devices couldn't be found."

Does someone know what is wrong? Please help.

Thanks in advance!

Damian
  • 11
  • 2
  • Sorry, but the screenshots are unreadable. Please don't post pictures of text. Instead copy the text direct into the question: [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/q/285551/5014688). When you have replaced the pictures with text, I will have a look at. – Ingo Feb 03 '21 at 11:11
  • @Ingo sorry for that and thank you for this advice as a newbie. I updated my question by all the code which I used based on your manual. I really appraciate your help as I fight with that since days ! – Damian Feb 03 '21 at 22:22

2 Answers2

2

The main problem is not the setup with the networking system. The problem is the USB/WiFi dongle "TP-Link TL-WN823N". It isn't supported by the kernel so it will not be available out of the box by showing its interface wlan1. As you mentioned, it needs a separate driver to achieve this. But all your log output does not show an interface wlan1 from the dongle. Without it nothing will work whatever you try.

So the first step should be to ensure that the USB/WiFi dongle is working alone without possible interfering with the built-in WiFi device. So disable the latter with an entry in /boot/config.txt:

dtoverlay=disable-wifi

This will show the dongles interface as wlan0 if it is working. If not you will not see any WiFi interface wlan*. Then fix it and connect to your internet hotspot as usual.

To show all available interfaces, no matter if they are UP ord DOWN, use the command:

rpi ~$ ip -brief link

In the next step enable the on-board WiFi (remove the entry from config.txt). Then you must see both interfaces. wlan0 for the on-board WiFi and wlan1 from the dongle. The name of the dongles interface has changed. If this is not the case then you have to fix it before continuing.

If you cannot fix it you may consider to purchase a new compatible USB/WiFi dongle. They are not very expensive, less than 10 €. Or you use only the on-board device without an additional dongle as shown at Access point as WiFi router/repeater, optional with bridge.

Ingo
  • 40,606
  • 15
  • 76
  • 189
  • 1
    Thank you Ingo, I will try it and give you a feedback! It would surprise me if this wifi dongle wouldn’t be compatible as I searched before on the Internet for a compatible one with R4B and this was definitely the mostes recommend one. Maybe it took the wrong drivers. I will check it. – Damian Feb 06 '21 at 12:38
  • @Damian If it is compatible it does not need a driver. Then the driver is available from the kernel and it will load it automatically. If I plug in my USB/WiFi dongle I immediately see the interface **wlan1** on my RasPi, even without a reboot. – Ingo Feb 06 '21 at 20:51
  • could you please recommend one which is compatible? – Damian Feb 07 '21 at 10:15
  • or please just tell me which one do you use :) ? – Damian Feb 07 '21 at 10:38
  • Mine is a `HQWL 45` from manufacturer Best. But better to ask google for [usb wifi dongle raspberry pi compatible](https://www.google.com/search?q=usb+wifi+dongle+raspberry+pi+compatible). – Ingo Feb 07 '21 at 19:54
  • should the described test with disabling on-board wifi to check wifi dongle work even before impementing steps from your manual ? Secondly I try to run "rpi ~$ ip -brief link" but then is telling me "rpi: command not found" By running command "lsusb" my wifi dongle is listed now, but still no wlan01 and I am stacking at the point described sentense above – Damian Feb 09 '21 at 21:52
0

I just took a different dongle and then it starts directly to work. thanks!

Damian
  • 11
  • 2
  • @Ingo But is it still possible to activate OpenVPN/PiVPN or TeamViewer in configuration like this? I am failing already at the installation of pivpn or Teamviewer. Is it not possible due to all the network changes that we made? – Damian Feb 10 '21 at 21:34
  • Comments are not the right place to answer complex questions. You should open a new question about your problems. – Ingo Feb 11 '21 at 20:44