https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&user=JoshuaRLi&feedformat=atomAlpine Linux - User contributions [en]2024-03-29T01:36:49ZUser contributionsMediaWiki 1.40.0https://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15861Wi-Fi2019-04-02T02:09:55Z<p>JoshuaRLi: move to note section for readability</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
{{Note|If this errors with <code>ioctl 0x8914 failed: No error information</code>, that's <code>busybox ip</code>'s way of saying your wireless radio is rfkill'd. See [https://wiki.archlinux.org/index.php/Wireless_network_configuration#Rfkill_caveat here] for information on how to unblock your wireless radio; the base installation should have <code>busybox rfkill</code> available.}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Start wpa_supplicant in the foreground to make sure the connection succeeds.<br />
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.<br />
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Configure the interface with an IP address.<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
Sanity check: the interface should have an {{Path|inet}} address.<br />
{{Cmd|ip addr show wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add a stanza for the desired interface (e.g. {{Path|wlan0}}) to {{Path|/etc/network/interfaces}}:<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.<br />
<br />
Bring the interface down.<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant.<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
If all is well (confirm with the sanity checks in [[#Manual_Configuration|Manual Configuration]]), configure wpa_supplicant to start automatically on boot.<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15860Wi-Fi2019-04-02T02:07:58Z<p>JoshuaRLi: /* Manual Configuration */</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up. If this errors with <code>ioctl 0x8914 failed: No error information</code>, that's <code>busybox ip</code>'s way of saying your wireless radio is rfkill'd. See [https://wiki.archlinux.org/index.php/Wireless_network_configuration#Rfkill_caveat here] for information on how to unblock your wireless radio; the base installation should have <code>busybox rfkill</code> available.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Start wpa_supplicant in the foreground to make sure the connection succeeds.<br />
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.<br />
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Configure the interface with an IP address.<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
Sanity check: the interface should have an {{Path|inet}} address.<br />
{{Cmd|ip addr show wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add a stanza for the desired interface (e.g. {{Path|wlan0}}) to {{Path|/etc/network/interfaces}}:<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.<br />
<br />
Bring the interface down.<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant.<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
If all is well (confirm with the sanity checks in [[#Manual_Configuration|Manual Configuration]]), configure wpa_supplicant to start automatically on boot.<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15859Wi-Fi2019-04-02T02:06:25Z<p>JoshuaRLi: https://superuser.com/questions/1382732/cannot-setup-network-interfaces-when-installing-linux-alpine-with-setup-alpine</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up. If this errors with {{Cmd|ioctl 0x8914 failed: No error information}}, that's {{Cmd|busybox ip}}'s way of saying your wireless radio is rfkill'd. See [https://wiki.archlinux.org/index.php/Wireless_network_configuration#Rfkill_caveat here] for information on how to unblock your wireless radio; the base installation should have `busybox rfkill` available.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Start wpa_supplicant in the foreground to make sure the connection succeeds.<br />
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.<br />
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Configure the interface with an IP address.<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
Sanity check: the interface should have an {{Path|inet}} address.<br />
{{Cmd|ip addr show wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add a stanza for the desired interface (e.g. {{Path|wlan0}}) to {{Path|/etc/network/interfaces}}:<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.<br />
<br />
Bring the interface down.<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant.<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
If all is well (confirm with the sanity checks in [[#Manual_Configuration|Manual Configuration]]), configure wpa_supplicant to start automatically on boot.<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15353Wi-Fi2018-07-19T06:50:05Z<p>JoshuaRLi: reference sanity checks in manual configuration for brevity</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Start wpa_supplicant in the foreground to make sure the connection succeeds.<br />
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.<br />
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Configure the interface with an IP address.<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
Sanity check: the interface should have an {{Path|inet}} address.<br />
{{Cmd|ip addr show wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add a stanza for the desired interface (e.g. {{Path|wlan0}}) to {{Path|/etc/network/interfaces}}:<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.<br />
<br />
Bring the interface down.<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant.<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
If all is well (confirm with the sanity checks in [[#Manual_Configuration|Manual Configuration]]), configure wpa_supplicant to start automatically on boot.<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15352Wi-Fi2018-07-19T06:47:20Z<p>JoshuaRLi: remove redundant instructions</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Start wpa_supplicant in the foreground to make sure the connection succeeds.<br />
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.<br />
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Configure the interface with an IP address.<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
Sanity check: the interface should have an {{Path|inet}} address.<br />
{{Cmd|ip addr show wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add a stanza for the desired interface (e.g. {{Path|wlan0}}) to {{Path|/etc/network/interfaces}}:<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.<br />
<br />
Bring the interface down.<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant.<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
The wlan0 interface should be associated with the MyNet SSID:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
The wlan0 interface should have been assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
If all is well, configure wpa_supplicant to start automatically on boot.<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15351Wi-Fi2018-07-19T06:45:13Z<p>JoshuaRLi: wpa.conf -> wpa_supplicant.conf</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Start wpa_supplicant in the foreground to make sure the connection succeeds.<br />
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.<br />
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf}}<br />
<br />
Configure the interface with an IP address.<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
Sanity check: the interface should have an {{Path|inet}} address.<br />
{{Cmd|ip addr show wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add a stanza for the desired interface (e.g. {{Path|wlan0}}) to {{Path|/etc/network/interfaces}}:<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.<br />
<br />
Bring the interface down:<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
The wlan0 interface should be associated with the MyNet SSID:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
The wlan0 interface should have been assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
Configure wpa_supplicant to start automatically on boot:<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
Reboot:<br />
<br />
{{Cmd|reboot}}<br />
<br />
Log in and check that the interface is associated with the access point:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Check that the interface was assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0 {{!}} grep addr}}<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15350Wi-Fi2018-07-19T06:44:40Z<p>JoshuaRLi: assume /etc/wpa_supplicant/wpa_supplicant.conf from the above section</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa.conf}}<br />
<br />
Start wpa_supplicant in the foreground to make sure the connection succeeds.<br />
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa.conf}}<br />
<br />
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.<br />
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa.conf}}<br />
<br />
Configure the interface with an IP address.<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
Sanity check: the interface should have an {{Path|inet}} address.<br />
{{Cmd|ip addr show wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add a stanza for the desired interface (e.g. {{Path|wlan0}}) to {{Path|/etc/network/interfaces}}:<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Make sure {{Path|/etc/wpa_supplicant/wpa_supplicant.conf}} is the correct configuration for the wireless access point you want to connect to.<br />
<br />
Bring the interface down:<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
The wlan0 interface should be associated with the MyNet SSID:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
The wlan0 interface should have been assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
Configure wpa_supplicant to start automatically on boot:<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
Reboot:<br />
<br />
{{Cmd|reboot}}<br />
<br />
Log in and check that the interface is associated with the access point:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Check that the interface was assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0 {{!}} grep addr}}<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15349Wi-Fi2018-07-19T06:36:44Z<p>JoshuaRLi: improve dhcp instructions, also prefer ip usage over deprecated ifconfig</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa.conf}}<br />
<br />
Start wpa_supplicant in the foreground to make sure the connection succeeds.<br />
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa.conf}}<br />
<br />
If all is well, run it as a daemon in the background by setting the {{Path|-B}} option.<br />
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa.conf}}<br />
<br />
Configure the interface with an IP address.<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
Sanity check: the interface should have an {{Path|inet}} address.<br />
{{Cmd|ip addr show wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add an interface stanza for wlan0 to the file {{Path|/etc/network/interfaces}}<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Create {{Path|/etc/wpa_supplicant}} if it doesn't already exist, set sane permissions and append the configuration {{Path|wpa.conf}} to {{Path|wpa_supplicant.conf}}.<br />
<br />
<pre><br />
mkdir -p /etc/wpa_supplicant<br />
chmod 750 /etc/wpa_supplicant<br />
cat wpa.conf >> /etc/wpa_supplicant/wpa_supplicant.conf<br />
</pre><br />
<br />
Test the automatic interface configuration:<br />
<br />
Bring the interface down:<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
The wlan0 interface should be associated with the MyNet SSID:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
The wlan0 interface should have been assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
Configure wpa_supplicant to start automatically on boot:<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
Reboot:<br />
<br />
{{Cmd|reboot}}<br />
<br />
Log in and check that the interface is associated with the access point:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Check that the interface was assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0 {{!}} grep addr}}<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15348Wi-Fi2018-07-19T06:33:06Z<p>JoshuaRLi: improved wpa_supplicant usage</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa.conf}}<br />
<br />
Start wpa_supplicant in the foreground to make sure the connection succeeds.<br />
{{Cmd|wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa.conf}}<br />
<br />
If all is well, run it as a daemon in the background by passing {{Path|-B}}.<br />
{{Cmd|wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa.conf}}<br />
<br />
From another terminal/console, start dhcpcd:<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
The wlan0 interface should be configured with an IP address at this point:<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add an interface stanza for wlan0 to the file {{Path|/etc/network/interfaces}}<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Create {{Path|/etc/wpa_supplicant}} if it doesn't already exist, set sane permissions and append the configuration {{Path|wpa.conf}} to {{Path|wpa_supplicant.conf}}.<br />
<br />
<pre><br />
mkdir -p /etc/wpa_supplicant<br />
chmod 750 /etc/wpa_supplicant<br />
cat wpa.conf >> /etc/wpa_supplicant/wpa_supplicant.conf<br />
</pre><br />
<br />
Test the automatic interface configuration:<br />
<br />
Bring the interface down:<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
The wlan0 interface should be associated with the MyNet SSID:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
The wlan0 interface should have been assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
Configure wpa_supplicant to start automatically on boot:<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
Reboot:<br />
<br />
{{Cmd|reboot}}<br />
<br />
Log in and check that the interface is associated with the access point:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Check that the interface was assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0 {{!}} grep addr}}<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15347Wi-Fi2018-07-19T06:28:31Z<p>JoshuaRLi: less verbose wpa_passphrase invocation. Also, should be using /etc/wpa_supplicant prefix.</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for the wireless access point.<br />
{{Cmd|wpa_passphrase 'ExampleWifi' 'ExampleWifiPassword' > /etc/wpa_supplicant/wpa.conf}}<br />
<br />
From one terminal/console, start wpa_supplicant with the generated config:<br />
{{Cmd|wpa_supplicant -Dwext -iwlan0 -c ./wpa.conf}}<br />
<br />
From another terminal/console, start dhcpcd:<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
The wlan0 interface should be configured with an IP address at this point:<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add an interface stanza for wlan0 to the file {{Path|/etc/network/interfaces}}<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Create {{Path|/etc/wpa_supplicant}} if it doesn't already exist, set sane permissions and append the configuration {{Path|wpa.conf}} to {{Path|wpa_supplicant.conf}}.<br />
<br />
<pre><br />
mkdir -p /etc/wpa_supplicant<br />
chmod 750 /etc/wpa_supplicant<br />
cat wpa.conf >> /etc/wpa_supplicant/wpa_supplicant.conf<br />
</pre><br />
<br />
Test the automatic interface configuration:<br />
<br />
Bring the interface down:<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
The wlan0 interface should be associated with the MyNet SSID:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
The wlan0 interface should have been assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
Configure wpa_supplicant to start automatically on boot:<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
Reboot:<br />
<br />
{{Cmd|reboot}}<br />
<br />
Log in and check that the interface is associated with the access point:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Check that the interface was assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0 {{!}} grep addr}}<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15346Wi-Fi2018-07-19T06:25:42Z<p>JoshuaRLi: improved essid configuration steps</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Use the interface to scan for wireless access points. Make sure the ESSID you want to connect to appears here.<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Associate the interface with desired ESSID.<br />
{{Cmd|iwconfig wlan0 essid ExampleWifi}}<br />
<br />
Sanity check: the interface should be configured with {{Path|ESSID:"ExampleWifi"}}.<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for wpa_supplicant by executing the following:<br />
{{Cmd|wpa_passphrase ExampleWifi > wpa.conf}} <br />
<br />
wpa_passphrase expects the password to be passed via stdin. <br />
<br />
So, type the password and press ENTER.<br />
<br />
The above commands creates the file {{Path|wpa.conf}} which includes the pre-shared key. <br />
<br />
From one terminal/console, start wpa_supplicant with the generated config:<br />
{{Cmd|wpa_supplicant -Dwext -iwlan0 -c ./wpa.conf}}<br />
<br />
From another terminal/console, start dhcpcd:<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
The wlan0 interface should be configured with an IP address at this point:<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add an interface stanza for wlan0 to the file {{Path|/etc/network/interfaces}}<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Create {{Path|/etc/wpa_supplicant}} if it doesn't already exist, set sane permissions and append the configuration {{Path|wpa.conf}} to {{Path|wpa_supplicant.conf}}.<br />
<br />
<pre><br />
mkdir -p /etc/wpa_supplicant<br />
chmod 750 /etc/wpa_supplicant<br />
cat wpa.conf >> /etc/wpa_supplicant/wpa_supplicant.conf<br />
</pre><br />
<br />
Test the automatic interface configuration:<br />
<br />
Bring the interface down:<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
The wlan0 interface should be associated with the MyNet SSID:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
The wlan0 interface should have been assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
Configure wpa_supplicant to start automatically on boot:<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
Reboot:<br />
<br />
{{Cmd|reboot}}<br />
<br />
Log in and check that the interface is associated with the access point:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Check that the interface was assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0 {{!}} grep addr}}<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLihttps://wiki.alpinelinux.org/w/index.php?title=Wi-Fi&diff=15345Wi-Fi2018-07-19T06:18:56Z<p>JoshuaRLi: It's a good idea to list available network interfaces first - iface wlan0 was hardcoded in the guide.</p>
<hr />
<div>This document describes how to set up a wireless network connection with WPA encryption.<br />
<br />
== Install necessary drivers and software ==<br />
<br />
First make sure your wireless drivers are loaded properly. (if you are using a '''Broadcom chipset''', see the [[#Broadcom_Wi-Fi_Chipset_Users|section at the bottom of this post]].)<br />
<br />
Install {{Pkg|wireless-tools}} and {{Pkg|wpa_supplicant}}.<br />
{{Cmd|apk add wireless-tools wpa_supplicant}}<br />
<br />
== Manual Configuration ==<br />
<br />
List your available network interfaces. If you don't see any wireless interfaces (e.g. {{Path|wlan0}}), you probably need to load and/or install extra drivers/firmware.<br />
{{Cmd|ip link}}<br />
<br />
Bring the desired interface up.<br />
{{Cmd|ip link set wlan0 up}}<br />
<br />
Find a network to connect to. Look for the ESSID. In this example we will use the ESSID "MyNet".<br />
{{Cmd|iwlist wlan0 scanning}}<br />
<br />
Configure the wlan0 interface to associate with the MyNet ESSID:<br />
{{Cmd|iwconfig wlan0 essid MyNet}}<br />
<br />
Print its configuration, to check:<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Create a wpa_supplicant configuration stanza for wpa_supplicant by executing the following:<br />
{{Cmd|wpa_passphrase MyNet > wpa.conf}} <br />
<br />
wpa_passphrase expects the password to be passed via stdin. <br />
<br />
So, type the password and press ENTER.<br />
<br />
The above commands creates the file {{Path|wpa.conf}} which includes the pre-shared key. <br />
<br />
From one terminal/console, start wpa_supplicant with the generated config:<br />
{{Cmd|wpa_supplicant -Dwext -iwlan0 -c ./wpa.conf}}<br />
<br />
From another terminal/console, start dhcpcd:<br />
{{Cmd|udhcpc -i wlan0}}<br />
<br />
The wlan0 interface should be configured with an IP address at this point:<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
== Automatic Configuration on System Boot ==<br />
<br />
Add an interface stanza for wlan0 to the file {{Path|/etc/network/interfaces}}<br />
<br />
<pre><br />
auto wlan0<br />
iface wlan0 inet dhcp<br />
</pre><br />
<br />
Create {{Path|/etc/wpa_supplicant}} if it doesn't already exist, set sane permissions and append the configuration {{Path|wpa.conf}} to {{Path|wpa_supplicant.conf}}.<br />
<br />
<pre><br />
mkdir -p /etc/wpa_supplicant<br />
chmod 750 /etc/wpa_supplicant<br />
cat wpa.conf >> /etc/wpa_supplicant/wpa_supplicant.conf<br />
</pre><br />
<br />
Test the automatic interface configuration:<br />
<br />
Bring the interface down:<br />
<br />
{{Cmd|ifconfig wlan0 down}}<br />
<br />
Manually start wpa_supplicant<br />
<br />
{{Cmd|/etc/init.d/wpa_supplicant start}}<br />
<br />
The wlan0 interface should be associated with the MyNet SSID:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
The wlan0 interface should have been assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0}}<br />
<br />
Configure wpa_supplicant to start automatically on boot:<br />
<br />
{{Cmd|rc-update add wpa_supplicant boot}}<br />
<br />
Reboot:<br />
<br />
{{Cmd|reboot}}<br />
<br />
Log in and check that the interface is associated with the access point:<br />
<br />
{{Cmd|iwconfig wlan0}}<br />
<br />
Check that the interface was assigned an IP address via DHCP:<br />
<br />
{{Cmd|ifconfig wlan0 {{!}} grep addr}}<br />
<br />
=== Launching udhcpc through wpa_cli actions ===<br />
<br />
With the above configuration, udhcpc will only run once at boot.<br />
If the Wifi isn't available then, or the network changes in between, it needs to be notified.<br />
This is done through the wpa_cli action script in /etc/wpa_supplicant/wpa_cli.sh<br />
<br />
{{Cmd|rc-update add wpa_cli boot}}<br />
<br />
== Broadcom Wi-Fi Chipset Users ==<br />
<br />
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. <br />
<br />
You can check if you have a Broadcom chipset by using dmesg:<br />
<br />
{{Cmd|dmesg {{!}} grep Broadcom}}<br />
<br />
First install the SDK an Git:<br />
{{Cmd|apk add alpine-sdk git}}<br />
<br />
Then git clone aports from git.alpinelinux.org.<br />
<br />
<br />
{{Cmd|git clone git://git.alpinelinux.org/aports}}<br />
<br />
Change your directory to '''aports/non-free/b43-firmware''', then build it.<br />
<br />
{{Tip|You can't be root and must be a user of the group abuild (use groupadd f.e. '''groupadd $(whoami) abuild''')}}<br />
{{Tip|If this is your first time building a package you will need to generate a key for use in signing packages (use '''abuild-keygen -a -i''')}}<br />
<br />
{{Cmd|abuild -r}}<br />
<br />
Install the generated packge file (it will be in ~/packages/) - make sure to pass '''--allow-untrusted'''<br />
<br />
{{Cmd|apk add --allow-untrusted ~/packages/...pkg}}<br />
<br />
Now we need fwcutter, which is executed from the firmware package:<br />
<br />
{{Cmd|apk add b43-fwcutter b43-firmware}}<br />
<br />
Now you need to use modprobe so the device will show up:<br />
<br />
{{Cmd|modprobe b43}}<br />
<br />
To automate this on startup add it to /etc/modules:<br />
<br />
{{Cmd|echo b43 >> /etc/modules}}<br />
<br />
Now continue with the normal instructions. <br />
<br />
[[Category:Networking]]</div>JoshuaRLi