How do I enable both Wi‑Fi and hotspot at the same time when using a Realtek card?

basically title… my laptop has a Realtek Wi-Fi 6 RTL8852BE-VT-CG+ BT5.4

This supports my card, but it hasn’t been updated in a while, and when I try to install this driver, it doesn’t work…probably because it was for an older kernel. Any alternatives to this?

The title and your question seem to have no connection.

I take it that your wifi chip is not supported by the fedora linux kernel build?

No… I have to use the unofficial driver to get support, but unfortunately it hasn’t been updated in years, and when I tried to use it for 6.19… it didn’t work… I was looking for alternatives other than

because this never works for me. So.. any other alternatives?

Can we assume you’ve updated both your linux-firmware and realtek-firmware packages and no joy with them? Is the issue that you can’t run WiFi AND a hotspot at the same time or does it not work at all?

Is that supported on the same interface? I can see it workiung on two interfaces with some suitable router and firewall rules.

I assume that you want to do this for a security reason. Otherwise you would have devices use the WiFi network. Or have I misunderstood.

It can, but there are gotchas.

The Wifi and the AP must/will both on the same channel As there’s probably only one radio the throughput on both the WiFI and the AP is halved as the radio effectively time-shares between the two and because of that time-sharing you get a little more latency too. Measurable, but not so much that a human would (probably) notice.

The other caveat is that it gets disabled if you’re in a location or under a registry domain which prohibits broadcasting on that channel.

iw list and check out the section showing you what your card supports.

       valid interface combinations:
                 * #{ managed } <= 1, #{ P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,
                   total <= 3, #channels <= 2
                 * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,
                   total <= 3, #channels <= 1
2 Likes

doesn’t work at the same time… apparently this is an issue with Realtek cards… but I don’t want to change my card and was hoping there is a solution for this. I found one method, but it hasn’t been updated in a while and does not work right now.

It’s a pretty basic feature on Android and Windows…and apparently with most cards on Linux, except Realtek ones, which I unfortunately have on my laptop.

What is the output from iw list on your card?

Feel free to redact anything you don’t want to share.

1 Like

Could you please tell me which part of the output of iw list you’d like to check? Because the entire thing is too long and I don’t really want to check everything to find out what to redact, lol.

Sure - it’s the section I mention above - quoted here. Should only be 5 or 6 lines. My mistake for not specifying that in the first place.

I know I can create a WiFi hot-spot using my 4G mobile data.
Do not see option on my phone to do that with a WiFi NIC.

As for Windows, I’ve not got a Windows WiFi system to test.

    valid interface combinations:
             * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1,
               total <= 2, #channels <= 1
             * #{ managed } <= 1, #{ P2P-client, P2P-GO } <= 1,
               total <= 2, #channels <= 2

On my phone I can enable wifi OR a hotspot, However cannot have both enabled at the same time.

I suspect that even though it seems you may be able to have an AP enabled, doing both at the same time may not be possible.

This radio supports both Wifi and an access point active at the same time.

So for example, you could have

wlan0 → connected to Wi-Fi
wlan0_ap → acting as the hotspot

Caveat, the driver must support this (rtw89 does, to the best of my knowledge) and they must both be on the same channel.

That is the issue, though… RTW89 does support it, but it hasn’t been updated in 2 years or so and thus shows an error with my latest version Fedora…

    valid interface combinations:
             * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1,
               total <= 2, #channels <= 1
             * #{ managed } <= 1, #{ P2P-client, P2P-GO } <= 1,
               total <= 2, #channels <= 2

This means it is technically possible, right?

chatgptfied work around guide for anyone who finds this in the future.

Problem Description:

I attempted to configure a Wi-Fi hotspot on the same wireless interface (wlo1) used for my upstream internet connection. despite my hardware supporting concurrent AP/STA modes (verified via iw list), create_ap and linux-wifi-hotspot consistently failed with the following error:

Error: Failed to run hostapd, maybe a program is interfering.

Root Cause:

The issue stems from a hardware limitation common in single-radio Wi-Fi cards. The wireless card cannot operate on two different frequencies simultaneously.

By default, create_ap attempts to start the hotspot on a default channel (often Channel 1 or similar). If the upstream Wi-Fi connection is on a different channel (e.g., Channel 161 on 5GHz), the driver cannot split the radio, causing hostapd to crash immediately.

The Solution:

To resolve this, you must force the hotspot to operate on the exact same channel and frequency band as your current Wi-Fi connection.

1. Identify Upstream Channel:

Run the following command to determine which channel your interface is currently using:

Bash

iw dev wlo1 link

Look for the output line: channel 161 (5805 MHz).

2. Configure the Hotspot:

You must manually specify this channel in your configuration.

  • Command Line (create_ap):

Bash

sudo create_ap wlo1 wlo1 'MyAccessPoint' 'MyPassword' --channel 161 --freq-band 5 --no-haveged
  • **GUI (wihotspot):**If using the linux-wifi-hotspot GUI, navigate to the Advanced tab.
    • Frequency Band: Set to match your connection (e.g., 5GHz).
    • Channel: Check the box and manually input the channel number (e.g., 161). Do not leave this on “Auto.”

Once the channels matched, the virtual interface initialized correctly, and the hotspot started without dropping the upstream connection.

2 Likes

Yes - as you’ve proven it means it’s possible.

The rtw89 driver does support this with the caveats I mentioned - there is only one radio so the Wifi and AP must be on the same channel; the radio will effectively time-share the two connections, so the throughput on both will be about half of normal operation.

Pleased you got it resolved.

1 Like

I did not know that was possible on a single channel wifi chip.
Great work :slight_smile:

p.s. I hate it when the AI’s get it right :wink:

2 Likes