0

After much research, I believe I have a unique situation. I am using a Raspberry Pi 3B+ with Raspbian 11 (Bullseye). I want to have a two Wi-Fi connections. One that connects to an existing Wi-Fi AP, and another stand alone Wi-Fi network served by the Raspberry Pi that does not need to connect to a WLAN. All the second one needs to do is serve a ROR application. This RPi will be part of, essentially, a stand-alone robot that needs to make it's own wi-fi network in order to interact with users.

I've configured the system to do that at one time using the advice at Access point as WiFi router/repeater with additional WiFi-dongle and related posts. For the readers convenience; this solution involved removing dhcpcd networking and replacing it with systemd networking. This worked, but left me with the situation where I had to constantly switch networks: connect to the RPi and do something, connect to the wlan Wi-Fi to research, switch back and forth, etc. Plus, as I made code changes on the RPi, it was really hard to commit those changes to my git server.

So I thought I would add a Wi-Fi antenna (TP-Link AC1300) and configure the built-in wi-fi (wlan0) to access the WLAN and have the USB antenna configured as wlan1 and create its own isolated network (cleverly named "RPi"). However, I never see wlan1 as an interface.

Here is configuration information:

ifconfig output:

$ ifconfig -a
eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:bd:03:08  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 4  bytes 200 (200.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 200 (200.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.86.36  netmask 255.255.255.0  broadcast 192.168.86.255
        inet6 fe80::ba27:ebff:fee8:565d  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:e8:56:5d  txqueuelen 1000  (Ethernet)
        RX packets 1616  bytes 201700 (196.9 KiB)
        RX errors 0  dropped 463  overruns 0  frame 0
        TX packets 259  bytes 41559 (40.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

iwconfig output:

$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"XXXXXX"
          Mode:Managed  Frequency:5.745 GHz  Access Point: CC:F4:11:3B:8B:7A
          Bit Rate=433.3 Mb/s   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=64/70  Signal level=-46 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

The TP-Link shows up in the lsusb command: Bus 001 Device 005: ID 2357:0138 TP-Link 802.11ac NIC

wpa_supplicant configuration for wlan1:

# cat /etc/wpa_supplicant/wpa_supplicant-wlan1.conf
country=US
ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
update_config=1
p2p_disabled=1

network={
    ssid="RPi"
    mode=2
    key_mgmt=WPA-PSK
    psk="SECRET"
    frequency=2412
}

interface configuration for wlan1:

# cat /etc/systemd/network/12-wlan1.network
[Match]
Name=wlan1

[Network]
LLMNR=no
LinkLocalAddressing=no
MulticastDNS=yes
DHCP=ipv4

Regarding the interface configuration: I've tried a few different variations based upon the original source and other answers.

I feel like I'm missing something fundamental, like a driver for the TP-Link, because I have never seen wlan1 showing in interface listings

Finally: systemctl cat for wlan1.service:

$ systemctl cat wpa_supplicant@wlan1.service
# /etc/systemd/system/wpa_supplicant@wlan1.service
[Unit]
Description=WPA supplicant daemon (interface-specific version)
After=network.target

# NetworkManager users will probably want the dbus version instead.

[Service]
Type=simple
ExecStart=/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -Dnl80211,wext -i%I

[Install]
Alias=multi-user.target.wants/wpa_supplicant@%i.service

The issue is that I do not seem to be able to get wlan1 to come up. Many of the other instructions are based upon using the default dhcpcd and weren't usable, but it seems as though this should be quite possible but I'm missing something fundamental. I would greatly appreciate thoughts, feedback, and questions. Thanks for your time and help.


Response to comments:

Thank you so very much for your suggestions. Here is the result of the /sys/class/net listing and lshw:

$ ls /sys/class/net
eth0  lo  wlan0

$ sudo lshw -class network
  *-usb:0 DISABLED
       description: Ethernet interface
       vendor: Microchip Technology, Inc. (formerly SMSC)
       physical id: 1
       bus info: usb@1:1.1.1
       logical name: eth0
       version: 3.00
       serial: b8:27:eb:bd:03:08
       capacity: 1Gbit/s
       capabilities: usb-2.10 ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=lan78xx driverversion=5.10.63-v7+ link=no maxpower=2mA multicast=yes port=twisted pair speed=480Mbit/s
  *-network
       description: Wireless interface
       physical id: 2
       logical name: wlan0
       serial: b8:27:eb:e8:56:5d
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=brcmfmac driverversion=7.45.229 firmware=01-2dbd9d2e ip=192.168.86.36 multicast=yes wireless=IEEE 802.11
3
  • I didn't follow all of your Question. One thing however, if using multiple interfaces the results are unpredictable unless you use Predictable Network Interface Names or write your own udev rules.
    – Milliways
    Nov 22, 2021 at 1:52
  • Some hardware is not capable of access point mode.
    – user10489
    Nov 22, 2021 at 2:16
  • I enabled Predictable Network Interface Names and see that "eth0" is now a really complex thing ("enxb...."). It looks like I've not properly enabled wlan1 so that seems to be the next needed step. Nov 22, 2021 at 17:44

2 Answers 2

0

Before trying to fix anything the first thing I would do is verify interfaces.

These can be shown with ls /sys/class/net/ or lshw -class network. The latter requires lshw to be installed.

1
  • Thanks for your suggestions. I put the additional information at the bottom of the question. It looks like there is no wlan1 network interface Nov 22, 2021 at 14:52
0

Here is the solution that I found. Many thanks to Milliways for pointing me in the right direction.

Turning on Predictable Network Interface Names was helpful, but wasn't sufficient. But it lead me to researching adding the TP-Link Archer T3UPlus, which as a new interface lead me to a post for installing the driver for Ubuntu, which lead me the cilynx/rtl88x2bu git repository with a driver. The repo had instructions for building and installing the driver for Raspberry Pi.

I now have the secondary WiFi AP running. Next step will be to install the ROR application and have it served by the secondary interface.

Thanks to all for your time and guidance.

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.