0

My setup consists of a pi5 running latest Bookworm $ uname -a Linux rpi5 6.6.31+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux. On-board wifi is set to the usual wlan0. I then added a Realtek usb-wifi dongle, which successfully appeared as wlan1. My Hotspot.nmconnection file looks as follows.

[connection]
id=Hotspot
uuid=6614cb3b-a24f-4da6-bd1e-5766a9e6c750
type=wifi
autoconnect=false
interface-name=wlan1
timestamp=1717672802

[wifi]
mode=ap
ssid=A0123

[wifi-security]
key-mgmt=wpa-psk
psk=my_plaintext_password

[ipv4]
method=shared

[ipv6]
addr-gen-mode=default
method=ignore

[proxy]

From my macbook I can see SSID A0123 being advertised as an available network. However on attempting to connect to it, I keep getting the dialog box for entering the password.

I have tested this wifi dongle to act as a standard wifi interface, which works perfectly, it can connect to home wifi router, get a DHCP address and I can ssh into the pi5 at the dongle's address. I have also tried setting the hotspot without the password and it fails with unable to join the network message.

Changing the Hotspot.nmconnection entry to interface-name=wlan0(i.e. pointing it to the on-board wifi NIC) I can connect to A0123 not a problem.

nmcli -f WIFI-PROPERTIES.AP device show wlan1 confirms the dongle supports AP. Am I missing something obvious or Bookworm's Realtek drivers can't do AP?

PS: This is not a question about setting a Hotspot/AP on wlan0.

2
  • You've asked a good question. However, since Raspberry Pi has replaced dhcpcd with NetworkManager, and NetworkManager is the standard for virtually all Linux systems - your question would likely be better-placed at the Unix&Linux SE site.
    – Seamus
    Commented Jun 11 at 16:42
  • Thanks for the suggestion. Reason for asking here is if anyone else has tried using Realtek usb wifi as AP and noticed the same problem.
    – durranaik
    Commented Jun 11 at 19:21

2 Answers 2

0

You have failed to specify band. I am not sure what is absolutely necessary but mine contains:-

[wifi]
band=bg
mode=ap
ssid=…

[wifi-security]
group=ccmp;
key-mgmt=wpa-psk
pairwise=ccmp;
proto=rsn;
psk=…

PS using wlan1 rather than Predictable Network Interface Names is unreliable.

1
  • All the above settings replicated, no change.
    – durranaik
    Commented Jun 9 at 14:20
0

The following steps enabled the Realtek usb wifi dongle to work as the Hotspot in my case.

Chipset identification lsusb Bus 003 Device 002: ID 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC corresponds to 8821cu at https://linux-hardware.org/?id=usb:0bda-c811

sudo apt update && sudo apt upgrade
sudo apt install -y raspberrypi-kernel-headers build-essential bc dkms git
mkdir -p ~/src
cd ~/src
git clone https://github.com/morrownr/8821cu-20210916.git
cd ~/src/8821cu-20210916

GCC version verification

cat /proc/version
gcc --version

GCC major versions must match

sudo ./install-driver.sh 

reboot, plugged in the Realtek wifi dongle. sudo nmcli c up Hotspot. The Hotspot profile existed in my case, otherwise it has to be created:

sudo nmcli d wifi hotspot ifname wlan1 ssid A0123 password 12345678
sudo nmcli conn up Hotspot

Over to macbook, A0123 can be connected with now.

This install blacklists the native rtw88_8821cu driver. The repo includes remove-driver.sh in case this driver is no longer required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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