Same wifi radio as client and AP

Hey all.

I'm trying to do something that a couldn't find on internet.
I want to hare my phone network via wifi thethering to the router then route the internet to other devices in may local network. (i have no wired wan) i can share my phone by usb tethering without any problem but i have to connect my phone to the router in an other room.

I have a wifi pcie card : Qualcomm Atheros QCA9880 802.11bgnac on the radio0 interface

2 wifi configured, first one as ap, the other as station which will connect to my phone

config wifi-iface 'wifinet0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'TheLocalSSID'
        option encryption 'psk2+ccmp'
        option key 'myLocalNetworkKey'
        option wpa_disable_eapol_key_retries '1'
        option network 'my_lan lan_my'

config wifi-iface 'wifinet1'
        option device 'radio0'
        option mode 'sta'
        option ssid 'TheSSIDOfMyPhoneSharedNetwork'
        option encryption 'psk2'
        option key 'theKeyOfMyTethered'
        option network 'wifi_wan wan_wifi'
        option disabled '0'

Using mwan to detect connection up or down.

At boot time the router seems to wait for the phone connection to the "wifinet1" before "mounting" the local wifi (wifinet0)
so there is no wifi local network if my router reboots and if i'm not at home with my phone.

If my phone is sharing data at router reboot the router share well the internet to others devices.

Next problem if i go out of range of the wifi and i come back a while later the router does not try to reconnect as it seems to be stuck on AP mode. or STA error mode.

Is someone could help me ?

Since your device only has a single physical radio, this is a known limitation of trying to use a radio to simultaneously operate as a client (sta) and AP. Travelmate is a tool to help manage this situation. Check it out.

3 Likes

Hey thank you i didn't know this package.

it seem to do what i did automaticaly.
create STA ssid
create dedicated interface
add interface to wan firewall group.

i'm trying to see if it works as i want and give a feedback in some days.
:+1:

1 Like

Hey, how was the experience!? Did you manage to use this package?

With your device, simultaneous use of sta and AP modes are possible, but low performance.

You will want to use travelmate because if you don’t, the AP mode will not come up if the previously associated upstream AP isn’t available.

1 Like

My plan is to use router model mr3020v3 which has single radio on it mt76xx. Hope performance will be fine.

On a first step I intend to:

Laptop ~Wifi1~ mr3020v3 ~wifi2~ starlink router

I want mr3020v3 to act as client of starlink router on wifi2
And act ad hotspot for laptop on wifi1

On a second step I intend to:

add a 4g usb dongle to mr3020v3, so if starlink dies , it switch automatically to the 4g connection.

Currently im working on the first step… im trying but im strugling with the configuration :frowning:

Are you using an mr3020 v3? It will not be possible with a <v3, but really all of them are underpowered for what you want to do unless your connection is well under 10mbps.

2 Likes

Thank you for your message, psherman! Yes, it is a MR3020 V3 router. It's enlightening to learn about the relationship between electric power and throughput. I'll keep that in mind moving forward.

Considering the capabilities of this inexpensive router, I intend to proceed with my tests. While I might not achieve the same throughput as with larger routers like the Linksys WRT3200ACM, I still have all the other software advantages. Essentially, I can test software flows on a much smaller scale, allowing me to experiment and validate concepts in my affordable lab setup. What are your thoughts on this approach?

Indeed, space on the flash memory can be a limitation, but my primary goal is to test as much features as I can on openwrt regarding to automating link failover with this budget router. This knowledge will guide me in making informed decisions when choosing the right equipment for future tasks.

I'm currently facing difficulties in configuring the MR3020 V3 to connect as I described in my previous message. I'll need to delve deeper into the forum to find out how others have accomplished this using a single-radio device.

To be clear - I think psherman was using a figure-of-speech meaning "old' or "outdated" CPU/hardware capability, not a reference to "electricity".

What experiment?

Using a cell for WAN is known to work. Aside from your hardware limitations already discussed, feel free to test with any OpenWrt device you have available.

I always do this in luci, when you setup the Master config, select Access Point (WDS):

image

WDS requires the main base station to also have WDS enabled, and often the implementations of WDS differ between manufacturers/firmware, so you usually need to have 2 devices with the same firmware in order to use WDS in the first place.

That said, this enables the device to operate as a wifi extender, but if OP (or @gsilos) wants to use the device as a router, WDS would not be an appropriate mode of operation.

I do not use the WDS functions, but after select this AP(WDS) mode, the same wifi becomes AP+Client.

But WDS is designed as a mechanism to extend a network (same SSID up/down) as a repeater. It doesn't allow routing, and it requires an upstream device with WDS enabled, too. This is not a general purpose AP+STA mode configuration.

Yes, you're right, we could select AP mode by Luci.
and uses AP(WDS) mode for the same SSID setup, maybe enable Fast Transition (802.11r) would be better.

No, fast transition (802.11r) also has nothing to do with the questions being asked in this thread.