Wi-Fi: Difference between revisions
No edit summary |
(Some real info for the users with the unfortunate Broadcom Wi-Fi Chipset. 2 hours of internet searching led me to this, enjoy. <3) |
||
Line 42: | Line 42: | ||
{{Cmd|ifconfig wlan0 {{!}} grep addr}} | {{Cmd|ifconfig wlan0 {{!}} grep addr}} | ||
== Broadcom Wi-Fi Chipset Users == | |||
The Broadcom chipset is quite popular among older computers. You will need to compile the firmware manually for this chipset as it is not included. | |||
First install the SDK an Git: | |||
{{Cmd|apk add alpine-sdk git}} | |||
Then git clone aports from git.alpinelinux.org. You can't be root and must be a user of the group abuild (use groupadd). | |||
(remove $ signs, new users can't add links) | |||
{{Cmd|git clone git:$/$/gi$t.alpinelinux.$org/abuild}} | |||
Change your directory to '''aports/non-free/b43-firmware''', then build it: | |||
{{Cmd|abuild -r}} | |||
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted''' | |||
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}} | |||
Now we need fwcutter, which is executed from the firmware package: | |||
{{Cmd|apk add b43-fwcutter b43-firmware} | |||
Now you need to use modprobe so the device will show up: | |||
{{Cmd|modprobe b43}} | |||
To automate this on startup add it to /etc/modules: | |||
{{Cmd|echo b43 >> /etc/modules}} | |||
Now continue with the normal instructions. | |||
[[Category:Networking]] | [[Category:Networking]] |
Revision as of 04:15, 18 March 2017
This document describes how to set up a wireless network connection with WPA encryption.
First make sure your wireless drivers are loaded properly. (if you are using a Broadcom chipset, see note at the end of this post.)
Install wireless-tools and wpa_supplicant.
apk add wireless-tools wpa_supplicant
Bring the link up so we can look for wireless networks. (An error here means you probably need extra drivers/firmware.)
ip link set wlan0 up
Find a network to connect to. Look for the ESSID. In this example we will use the ESSID "MyNet".
iwlist wlan0 scanning
Let's set the ESSID:
iwconfig wlan0 essid MyNet
We need to create a shared key for wpa_supplicant.
wpa_passphrase MyNet > wpa.conf
It will wait for the password from stdin. Enter the password and enter. Now you will have a wpa.conf file with the preshared key.
Start wpa_supplicant with the generated config:
wpa_supplicant -Dwext -iwlan0 -c ./wpa.conf
From another console, start dhcpcd:
udhcpc -i wlan0
You should get an IP address.
You then want to make the connection process automatic on boot-up. Open /etc/network/interfaces and add the following stanza:
auto wlan0 iface wlan0 inet dhcp
You will also need to set wpa_supplicant to start automatically on boot:
rc-update add wpa_supplicant boot
Next, create /etc/wpa_supplicant/ (permissions of 755 with root:root are fine), and move wpa.conf into that folder, renaming it to wpa_supplicant.conf.
Reboot and check that you are associated with the access point:
iwconfig wlan0
and check that you got a DHCP lease:
ifconfig wlan0 | grep addr
Broadcom Wi-Fi Chipset Users
The Broadcom chipset is quite popular among older computers. You will need to compile the firmware manually for this chipset as it is not included.
First install the SDK an Git:
apk add alpine-sdk git
Then git clone aports from git.alpinelinux.org. You can't be root and must be a user of the group abuild (use groupadd).
(remove $ signs, new users can't add links)
git clone git:$/$/gi$t.alpinelinux.$org/abuild
Change your directory to aports/non-free/b43-firmware, then build it:
abuild -r
Install the generated packge file (it will be in ~/packages/) - make sure to pass --allow-untrusted
apk add --allow-untrusted ~/packages/...pkg
Now we need fwcutter, which is executed from the firmware package:
{{Cmd|apk add b43-fwcutter b43-firmware}
Now you need to use modprobe so the device will show up:
modprobe b43
To automate this on startup add it to /etc/modules:
echo b43 >> /etc/modules
Now continue with the normal instructions.