Create raspberry pi as wifi ap page authored by Oliver Parczyk's avatar Oliver Parczyk
Before being given the router I tried to use one of the Raspberry Pi 4s as a WiFi access point. The attempt was a failure, but maybe you'll find value in knowing what I tried:
# Install Raspberry Pi OS
- Download the Raspberry Pi OS Lite image from [here](https://www.raspberrypi.com/software/operating-systems/)
- decompress it (eg. via `$ unzip <file>.zip`)
- flash the µSD: `$ sudo dd if=<IMAGE>.img of=/dev/<SDCARD> bs=1MiB status=progress`
- mount the new `boot`-partition on the µSD
- create empty `ssh` file via `$ touch ssh`
- mount the new `rootfs`-partition on the µSD
- edit `etc/hostname` to contain the chosen hostname
- unmount both partitions
I then connected the PI to the ethernet switch I had, put in the freshly flashed µSD and booted into the raspi. I had my laptop setup as a WiFi bridge between ethernet and eduroam, with dhcp enabled.
After connecting via `$ ssh pi@<hostname>.local` I changed the password for the user `pi` via `$ passwd`
I followed [this tutorial](https://howchoo.com/pi/setup-a-raspberry-pi-wireless-access-point).
Attention: `dhcpcd.conf` containes an invalid IP address. This is the one I used:
```
interface wlan0
static ip_address=192.168.0.1/24
nohook wpa_supplicant
```
The IP range in `/etc/dnsmasq.conf` was also adjusted to my preferred:
```
interface=wlan0
dhcp-range=192.168.0.2,192.168.0.255,255.255.255.0,24h
```
Then I adjusted the `country_code` in `/etc/hostapd/hostapd.conf`:
```
country_code=DE
interface=wlan0
bridge=br0
ssid=vws_confignet
hw_mode=g
channel=7
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=PASSWORD
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
```
A network is broadcast after reboot, connection and authentication via password doesn't work though. I tried numerous devices, none worked.
This is the point at which I cut my losses and moved on to different parts of the project:
```
$ iw dev wlan0 station dump
Station dc:a6:32:65:ee:4e (on wlan0)
inactive time: 0 ms
rx bytes: 330
rx packets: 2
tx bytes: 3376
tx packets: 26
tx failed: 0
tx bitrate: 1.0 MBit/s
rx bitrate: 1.0 MBit/s
authorized: no
authenticated: yes
associated: yes
WMM/WME: no
TDLS peer: yes
DTIM period: 2
beacon interval:100
short slot time:yes
connected time: 1 seconds
current time: 1491781302 ms
```
Note the `authorized: no` despite being authenticated and associated. Looking for this online yielded nothing but failed attempts at creating encrypted mesh-networks as part of Freifunk - yet I couldn't transfer anything they did to my situation here.