mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Expanded AP-STA info
parent
2a1c4406b1
commit
878a1c907a
@ -1,8 +1,57 @@
|
||||
### Preamble
|
||||
|
||||
This walkthrough describes an installation of RaspAP on the [Raspberry Pi Zero W](https://www.raspberrypi.org/products/raspberry-pi-zero-w/). A managed mode AP, also known as **WiFi client AP mode** or simply **AP-STA**, works "out-of-the-box" with the Quick Installer if the steps below are followed carefully. This feature was added to RaspAP specifically to support Internet of Things (IoT) and embedded applications for the Pi Zero W, however it is equally useful for a broad range of projects.
|
||||
This walkthrough describes an installation of RaspAP on the [Raspberry Pi Zero W](https://www.raspberrypi.org/products/raspberry-pi-zero-w/). A managed mode AP, variously known as **WiFi client AP mode**, a **micro-AP** or simply **AP-STA**, works "out-of-the-box" with the Quick Installer if the steps below are followed carefully. This feature was added to RaspAP specifically to support Internet of Things (IoT) and embedded applications for the Pi Zero W, however it is equally useful for a broad range of use cases.
|
||||
|
||||
![](https://i.imgur.com/gppLmAj.png)
|
||||
|
||||
### What is AP-STA mode?
|
||||
Many wireless devices support _simultaneous_ operation as both an access point (AP) and as a wireless client/station (STA). This is sometimes called Wi-Fi AP/STA concurrency. In this configuration, it is possible to create a software AP acting as a "wireless repeater" for an existing network, using a single wireless device. This capability is listed in the following section in the output of `iw list`:
|
||||
|
||||
```
|
||||
$ iw list | grep -A 4 'valid interface'
|
||||
valid interface combinations:
|
||||
* #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
|
||||
total <= 3, #channels <= 2
|
||||
* #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
|
||||
total <= 4, #channels <= 1
|
||||
```
|
||||
|
||||
The second valid interface combination indicates that both a `managed` and `AP` configuration is possible. The constraint `#channels <= 1` means that your software AP must operate on the same channel as your Wi-Fi client connection.
|
||||
|
||||
**Note:** if you have a second wireless adapter bound to `wlan1` on a Pi Zero W (or other device), refer to [this FAQ](https://github.com/billz/raspap-webgui/wiki/FAQs#can-i-use-wlan0-and-wlan1-rather-than-eth0-for-my-ap).
|
||||
|
||||
### Use cases
|
||||
There are many scenarios in which AP-STA might be useful. These are some of the most popular ones:
|
||||
1. A device that connects to a wireless AP but needs an admin interface to configure the network and/or other services.
|
||||
2. A a hub for Internet of Things devices, while also creating a bridge between them and the internet.
|
||||
3. A guest interface to your home wireless network.
|
||||
|
||||
Security is an important consideration with Internet of Things and it can be beneficial to keep your IoT devices on a separate network for safety’s sake. AP-STA is particularly useful in this scenario. No one wants a random internet user turning your lights on and off.
|
||||
|
||||
### How does AP-STA work?
|
||||
In this configuration, we create a virtual network interface (here `uap0`) and use it instead of `wlan0` on the AP side. This virtual interface is used by several of the services used to manage an AP. Relevant sections are displayed below as examples.
|
||||
|
||||
`dhcpcd.conf`:
|
||||
```
|
||||
# RaspAP uap0 configuration
|
||||
interface uap0
|
||||
static ip_address=192.168.50.1/24
|
||||
nohook wpa_supplicant
|
||||
```
|
||||
|
||||
`hostapd.conf`:
|
||||
```
|
||||
# RaspAP wireless client AP mode
|
||||
interface=uap0
|
||||
```
|
||||
|
||||
RaspAP manages these configurations in the background for you. On AP-STA startup and system reboots, RaspAP's service control script adds the virtual `uap0` interface and brings it up, like so:
|
||||
|
||||
```
|
||||
iw dev wlan0 interface add uap0 type __ap
|
||||
ifconfig uap0 up
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
1. Begin by flashing an SD card with the latest release of [Raspberry Pi OS (32-bit) Lite](https://www.raspberrypi.org/downloads/raspbian/).
|
||||
|
Loading…
x
Reference in New Issue
Block a user