galeb

Једноставна статичка дистрибуција заснована на musl-у
git clone https://git.sr.ht/~strahinja/galeb
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

WIRELESS (3774B)


      1 Wireless HOWTO
      2 ==============
      3 
      4 License notice
      5 --------------
      6 
      7 Copyright (c)  2023  Strahinya Radich.
      8 Permission is granted to copy, distribute and/or modify this document
      9 under the terms of the GNU Free Documentation License, Version 1.3
     10 or any later version published by the Free Software Foundation;
     11 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
     12 A copy of the license is included in the file LICENSE.fdl.
     13 
     14 
     15 Activating wireless in Galeb
     16 ----------------------------
     17 
     18 Wireless connections on GNU/Linux and similar systems can be activated in a
     19 number of ways. Galeb uses wpa_supplicant to connect to a wireless network. By
     20 default, Galeb assumes Ethernet connection, so wpa_supplicant service is not
     21 activated in Galeb. You need to configure and activate it explicitly. To do
     22 that, you need to follow through a number of steps, detailed below.
     23 
     24 Keep in mind this is just a brief overview of the steps. You should refer to the
     25 documentation and online resources related to the software used here if you need
     26 more details.
     27 
     28 
     29 Configure and activate wpa_supplicant service
     30 ---------------------------------------------
     31 
     32 First, execute
     33 
     34 	# service activate wpa_supplicant
     35 
     36 Then, choose *one* of two paths (replace "WiFi Network Name" with the name of
     37 your WiFi network, and "WiFi Password" with the password to your WiFi network):
     38 
     39 --------------------------------------------------------------------------
     40 1. If you don't know the exact SSID (WiFi network name): wpa_cli
     41 
     42 	# service start wpa_supplicant
     43 	# wpa_cli
     44 	> scan
     45 	...
     46 	> scan_results
     47 	...
     48 
     49 	> add_network
     50 	> set_network 0 ssid "WiFi Network Name"
     51 	> set_network 0 psk "WiFi Password"
     52 	> enable_network 0
     53 	> save_config
     54 	> quit
     55 --------------------------------------------------------------------------
     56 2. If you know the exact SSID (or if you don't want to have WiFi password
     57    in plain text in your /etc/wpa_supplicant.conf - delete the line 
     58    starting with #psk= for that): wpa_passphrase
     59 
     60 	# wpa_passphrase "WiFi Network Name" >>/etc/wpa_supplicant.conf
     61 	WiFi Password<Enter>
     62 	# service start wpa_supplicant
     63 --------------------------------------------------------------------------
     64 
     65 This should leave you with /etc/wpa_supplicant.conf like:
     66 
     67 	ctrl_interface=DIR=/var/run/wpa_supplicant
     68 	update_config=1
     69 
     70 	network={
     71 		ssid="WiFi Network Name"
     72 		psk="WiFi Password"
     73 	}
     74 
     75 or
     76 
     77 	ctrl_interface=DIR=/var/run/wpa_supplicant
     78 	update_config=1
     79 
     80 	network={
     81 		ssid="WiFi Network Name"
     82 		#psk="WiFi Password"
     83 		psk=some_really_long_hex_id
     84 	}
     85 
     86 and wpa_supplicant running. You can test that with:
     87 
     88 	# service running wpa_supplicant
     89 	=S= 10:00:00 wpa_supplicant running?		( YE )
     90 
     91 After a while, if all went well, sdhcp (automatically started by wpa_supplicant
     92 service) should have modified your /etc/resolv.conf (instead of
     93 000.000.000.000, there will be an address of your DNS):
     94 
     95 	# cat /etc/resolv.conf
     96 	nameserver 000.000.000.000
     97 
     98 
     99 Test your WiFi connection
    100 -------------------------
    101 
    102 To test your WiFi connection, you can enter
    103 
    104 	# ping -c 4 www.kernel.org
    105 	PING ams.source.kernel.org (145.40.68.75): 56 data bytes
    106 	64 bytes from 145.40.68.75: icmp_seq=0 ttl=54 time=35.377 ms
    107 	64 bytes from 145.40.68.75: icmp_seq=1 ttl=54 time=40.648 ms
    108 	64 bytes from 145.40.68.75: icmp_seq=2 ttl=54 time=45.170 ms
    109 	64 bytes from 145.40.68.75: icmp_seq=3 ttl=54 time=36.589 ms
    110 	--- ams.source.kernel.org ping statistics ---
    111 	4 packets transmitted, 4 packets received, 0% packet loss
    112 	round-trip min/avg/max/stddev = 35.377/39.446/45.170/3.838 ms
    113 
    114 
    115 Setup activating wlan0 on boot
    116 ------------------------------
    117 
    118 Edit /etc/rc.conf:
    119 
    120 	# vim /etc/rc.conf
    121 
    122 and change eth0 to wlan0:
    123 
    124 	INTERFACE=wlan0
    125 
    126 This ensures that wlan0 will be activated on boot instead of eth0. If you need
    127 both of them, edit /bin/rc.inet.