You are not logged in.

#1 2023-09-12 19:45:54

Registered: 2016-01-07
Posts: 2

Creating a virtual wifi interface for a WiFi access point + station

First, I'll confess: I'm trying to achieve the following with arm arch linux installed on a raspberry pi, however, I believe my questions are more relevant to  the network forum than to the alternative architectures forum, and have a higher chance of being answered here.

The issue:

I'm trying to follow the arch wiki page to create an AP and a wifi station at the same time ( … -Fi_device) on a raspberry pi.

I wasn't able to create virtual wifi interfaces with

iw dev wlan0 interface add wlan0_sta type managed addr 12:34:56:78:ab:cd
iw dev wlan0 interface add wlan0_ap  type managed addr 12:34:56:78:ab:ce

the suggested commands fail with "Device or resource busy (-16)", I decided to try to create the virtual interfaces with 'ip link' like so:

ip link add link wlan0 name wlan0_sta address 12:34:56:78:ab:cd type macvlan

and had partial success with it, the interfaces are created when I use the macvlan as type, but when trying with "type wlan" (or "type virt_wifi" that's shown in the help section on my machine), which seem more appropriate, the command fails with 'Error: Unknown device type.'.

I tried configuring everything with the interfaces created as macvlan but my wpa_supplicant configuration which works with the physical interface (wlan0) doesn't work when I change the interface to wlan0_sta.

What am I doing wrong?

- Is there something I'm missing that should make the iw command work?
- Which device type should I use to create the virtual interfaces with ip link add? Does it even matter?
- If the above interface commands should work, what could I be missing in my wpa_supplicant config that could fix the connection?

Last edited by nivpgir (2023-09-12 22:49:31)


Board footer

Powered by FluxBB