aboutsummaryrefslogtreecommitdiff
path: root/docs/posts/WPA_woes/index.html
blob: e6bd10870a8d0934e96433a1c9b57fe016cbca64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
  <head>
    <link rel="stylesheet" href="/style.css">
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1">
    <meta content="#ffffff" name="theme-color">
    <meta name="HandheldFriendly" content="true">
    <meta property="og:title" content="nerdypepper">
    <meta property="og:type" content="website">
    <meta property="og:description" content="a static site {for, by, about} me ">
    <meta property="og:url" content="https://nerdypepper.tech">
    <body>
      <div class="posts">
        <div class="post">
          <a href="/" class="post-end-link">⟵ Back</a>
          <div class="separator"></div>
          <div class="date">
            12/10/19
            <div class="stats">
              <span class="stats-number">
                18.37
              </span>
              <span class="stats-unit">cm</span>
              &nbsp
              <span class="stats-number">
                1.1
              </span>
              <span class="stats-unit">min</span>
            </div>
          </div>
          <span class="post-title">
            WPA Woes
          </span>
          <div class="post-text">
            <p>I finally got around to installing Void GNU/Linux on my main
computer. Rolling release, non-systemd, need I say more?</p>

<p>As with all GNU/Linux distributions, wireless networks had
me in a fix. If you can see this post, it means I&#8217;ve managed
to get online. It turns out, <code>wpa_supplicant</code> was detecting the
wrong interface by default (does it ever select the right
one?). Let us fix that:</p>

<pre><code>$ sudo rm -r /var/service/wpa_supplicant
$ sudo killall dhcpcd
</code></pre>

<p>What is the right interface though?</p>

<pre><code>$ iw dev
   ...
   Interface wlp2s0
   ...
</code></pre>

<p>Aha! Let us run <code>wpa_supplicant</code> on that interface, as a
background process:</p>

<pre><code>$ sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
$ sudo dhcpcd -B wlp2s0
$ ping google.com
PING ...
</code></pre>

<p>Yay! Make those changes perpetual by enabling the service:</p>

<pre><code>------------------------------------------------------
# Add these to /etc/wpa_supplicant/wpa_supplicant.conf
OPTS=&quot;-B&quot;
WPA_INTERFACE=&quot;wlp2s0&quot;
------------------------------------------------------
$ sudo ln -s /etc/sv/wpa_supplicant /var/service/
$ sudo ln -s /etc/sv/dhcpcd /var/service/
$ sudo sv restart wpa_supplicant
$ sudo sv restart dhcpcd
</code></pre>

          </div>
          <div class="separator"></div>
          <a href="/" class="post-end-link">⟵ Back</a>
        </div>
      </div>
    </body>
</html>