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.

2 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: