Raspberry Pi as Access Point: Difference between revisions

From Wurst-Wasser.net
Jump to navigation Jump to search
Line 47: Line 47:
** Setup AP
** Setup AP
  /etc/hostapd
  /etc/hostapd
[  132.306961] usb 1-1.2: new high-speed USB device number 6 using dwc_otg
[  132.407915] usb 1-1.2: New USB device found, idVendor=0bda, idProduct=8812, bcdDevice= 0.00
[  132.407939] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  132.407948] usb 1-1.2: Product: 802.11n NIC
[  132.407954] usb 1-1.2: Manufacturer: Realtek
[  132.407960] usb 1-1.2: SerialNumber: 123456


= Tweaks =
= Tweaks =

Revision as of 16:39, 19 May 2024

💡 Note to self: Check collective for more details!
💡 If this interests you, maybe Raspberry Pi as Standalone Access Point does also?

About

I was out of access points with external antennas, so I tried to use a Raspberry Pi 3 with an USB-Wifi-Stick as an access point.

Setup

  • Download the latest OS for your Pi: https://www.raspberrypi.com/software/
  • Insert your SD-Card while watching dmesg -w or use fdisk -l to find your device. In my case it's /dev/sda
  • Copy the image to the SD-card: dd if=2024-03-15-raspios-bookworm-arm64-lite.img of=/dev/sda bs=1M
  • Insert into the pi, power it up
  • Complete basic setup: Choose keyboard layout, create user, enable sshd a.s.o. (raspi-config)
  • apt-get update && apt-get upgrade
  • apt-get install hostapd dnsutils traceroute

Connect WiFi-Adaptor

Enable and Configure Access Point

vi /etc/default/hostapd 

and set:

DAEMON_CONF="/etc/hostapd/hostapd.conf"

Explanation: The hostapd reads the configfile, to find this configfile. I don't get what this is good for. I think I'm just not getting the whole concept. If anyone cares to enlighten me, please do. :)

vi /etc/hostapd/hostapd.conf

and set something like this:

interface=wlan0
driver=nl80211
hw_mode=g
channel=7
ieee80211n=1
wmm_enabled=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ssid=HMS_Camden_Lock
wpa_passphrase=42_42_42_42
country_code=DE

Enable it

vi /etc/default/hostapd

…and comment this and set path:

DAEMON_CONF="/etc/hostapd/hostapd.conf"
    • Setup AP
/etc/hostapd

Tweaks

- https://www.thingiverse.com/thing:19548