Raspberry Pi as Access Point: Difference between revisions
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
* <code>apt-get install hostapd dnsutils traceroute</code> | * <code>apt-get install hostapd dnsutils traceroute</code> | ||
= Connect WiFi- | = Connect WiFi-Stick = | ||
<code>dmesg -w</code> should show something like this: | <code>dmesg -w</code> should show something like this: | ||
[ 132.306961] usb 1-1.2: new high-speed USB device number 6 using dwc_otg | [ 132.306961] usb 1-1.2: new high-speed USB device number 6 using dwc_otg | ||
Line 22: | Line 22: | ||
[ 132.407954] usb 1-1.2: Manufacturer: Realtek | [ 132.407954] usb 1-1.2: Manufacturer: Realtek | ||
[ 132.407960] usb 1-1.2: SerialNumber: 123456 | [ 132.407960] usb 1-1.2: SerialNumber: 123456 | ||
<code>lsusb | grep WLAN</code> should show something like this: | |||
Bus 001 Device 008: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter | |||
= Enable and Configure Access Point = | = Enable and Configure Access Point = |
Revision as of 16:41, 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 usefdisk -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-Stick
dmesg -w
should show something like this:
[ 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
lsusb | grep WLAN
should show something like this:
Bus 001 Device 008: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter
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