Wireless HOWTO

License notice

Copyright © 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 explicitly. 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 “WiFi Network Name” with the name of your WiFi network, and “WiFi Password” 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:

ctrl_interface=DIR=/var/run/wpa_supplicant
update_config=1

network={
	ssid="WiFi Network Name"
	psk="WiFi Password"
}

or

ctrl_interface=DIR=/var/run/wpa_supplicant
update_config=1

network={
	ssid="WiFi Network Name"
	#psk="WiFi Password"
	psk=some_really_long_hex_id
}

and wpa_supplicant running. You can test that with:

# service running wpa_supplicant
=S= 10:00:00 wpa_supplicant running?		( YE )

After a while, if all went well, sdhcp (automatically started by wpa_supplicant service) should have modified your /etc/resolv.conf (instead of 000.000.000.000, there will be an address of your DNS):

# cat /etc/resolv.conf
nameserver 000.000.000.000

Test your WiFi connection

To test your WiFi connection, you can enter

# ping -c 4 www.kernel.org
PING ams.source.kernel.org (145.40.68.75): 56 data bytes
64 bytes from 145.40.68.75: icmp_seq=0 ttl=54 time=35.377 ms
64 bytes from 145.40.68.75: icmp_seq=1 ttl=54 time=40.648 ms
64 bytes from 145.40.68.75: icmp_seq=2 ttl=54 time=45.170 ms
64 bytes from 145.40.68.75: 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

Setup activating wlan0 on boot

Edit /etc/rc.conf:

# vim /etc/rc.conf

and change eth0 to wlan0:

INTERFACE=wlan0

This ensures that wlan0 will be activated on boot instead of eth0. If you need both of them, edit /bin/rc.inet.

Generated by slweb © 2020-2024 Strahinya Radich.