56f66992487fe4ab188e75dd2f12686e3e0e5c02 — Страхиња Радић 5 months ago b936ee3
Add Wireless HOWTO to galeb/

Signed-off-by: Страхиња Радић <contact@strahinja.org>
2 files changed, 137 insertions(+), 2 deletions(-)

M galeb/all.do
A galeb/wireless.slw
M galeb/all.do => galeb/all.do +2 -2
@@ 1,2 1,2 @@
redo-ifchange booting.html index.html install.html faq.html \
	      booting.gmi index.gmi install.gmi faq.gmi
redo-ifchange booting.html index.html install.html faq.html wireless.html \
	      booting.gmi index.gmi install.gmi faq.gmi wireless.gmi

A galeb/wireless.slw => galeb/wireless.slw +135 -0
@@ 0,0 1,135 @@
site-name: Wireless - Galeb
site-desc: Activating wireless in Galeb
inline-stylesheet: ../index.css
inline-stylesheet: galeb.css
canonical: https://strahinja.srht.site/galeb/wireless.html
meta: index-meta.tsv
# Wireless HOWTO

## License notice

Copyright &copy;  2023  Strahinya Radich.  
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the file LICENSE.

## Activating wireless in Galeb

Wireless connections on GNU/Linux and similar systems can be activated in a
number of ways. Galeb uses **wpa\_supplicant** to connect to a wireless network.
By default, Galeb assumes Ethernet connection, so **wpa\_supplicant** service is
not activated in Galeb. You need to configure and activate it explicitely. To do
that, you need to follow through a number of steps, detailed below.

Keep in mind this is just a brief overview of the steps. You should refer to the
documentation and online resources related to the software used here if you need
more details.

## Configure and activate wpa\_supplicant service

First, execute
# service activate wpa_supplicant
Then, choose **one** of two paths (replace &ldquo;WiFi Network Name&rdquo; with
the name of your WiFi network, and &ldquo;WiFi Password&rdquo; with the password
to your WiFi network):

1. If you don't know the exact SSID (WiFi network name): **wpa\_cli**
# service start wpa_supplicant
# wpa_cli
> scan
> scan_results

> add_network
> set_network 0 ssid "WiFi Network Name"
> set_network 0 psk "WiFi Password"
> enable_network 0
> save_config
> quit
2. If you know the exact SSID (or if you don't want to have WiFi password
   in plain text in your _/etc/wpa\_supplicant.conf_ - delete the line 
   starting with `#psk=` for that): **wpa\_passphrase**
# wpa_passphrase "WiFi Network Name" >>/etc/wpa_supplicant.conf
WiFi Password<Enter>
# service start wpa_supplicant

This should leave you with _/etc/wpa\_supplicant.conf_ like:

	ssid="WiFi Network Name"
	psk="WiFi Password"

	ssid="WiFi Network Name"
	#psk="WiFi Password"
and **wpa\_supplicant** running. You can test that with:
# service running wpa_supplicant
=S= 10:00:00 wpa_supplicant running?		( YE )

## Configure sdhcp service to work with wireless

Then, edit _/bin/svc.d/default/sdhcp_:
# vim /bin/svc.d/default/sdhcp
and change `eth0` to `wlan0`:
Then, start **sdhcp**:
# service start sdhcp
After a while, if all went well, **sdhcp** should have modified your
_/etc/resolv.conf_ (instead of ``, there will be an address of
your DNS):
# cat /etc/resolv.conf

## Test your WiFi connection

To test your WiFi connection, you can enter
# ping -c 4 www.kernel.org
PING ams.source.kernel.org ( 56 data bytes
64 bytes from icmp_seq=0 ttl=54 time=35.377 ms
64 bytes from icmp_seq=1 ttl=54 time=40.648 ms
64 bytes from icmp_seq=2 ttl=54 time=45.170 ms
64 bytes from icmp_seq=3 ttl=54 time=36.589 ms
--- ams.source.kernel.org ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 35.377/39.446/45.170/3.838 ms