[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
howtos:misc:wireless_with_wpa_cli [2015/03/15 22:06 (UTC)] – created a page about wpa_cli config slackwoodhowtos:misc:wireless_with_wpa_cli [2015/03/16 15:16 (UTC)] – forgot dhcpcd slackwood
Line 5: Line 5:
 This article is for folks who are choosing not to use NetworkManager for their wireless.\\ If you are running FluxBox or some other lightweight window manager, you may find it useful to configure wireless in the manner described below.\\ If you are interested in having wireless internet without having to run X at all, this article may also be of interest. This article is for folks who are choosing not to use NetworkManager for their wireless.\\ If you are running FluxBox or some other lightweight window manager, you may find it useful to configure wireless in the manner described below.\\ If you are interested in having wireless internet without having to run X at all, this article may also be of interest.
  
-  * Make sure that NetworkManager is turned off. +  * Make sure that NetworkManager is turned off.\\ 
- +Open your favorite terminal emulator, and make yourself root. 
-  * Open you favorite terminal emulator, and make yourself root. Then try this command in bash:+Then try this command in bash:
  
   chmod 644 /etc/rc.d/rc.networkmanager   chmod 644 /etc/rc.d/rc.networkmanager
  
-rc.wireless should also be turned off. Try running these commands:+  * rc.wireless should also be turned off.\\ 
 +Run these commands:
  
   chmod 644 /etc/rc.d/rc.wireless   chmod 644 /etc/rc.d/rc.wireless
   chmod 600 /etc/rc.d/rc.wireless.conf   chmod 600 /etc/rc.d/rc.wireless.conf
  
-You might want to restart your machine at this point, but before doing so, \\ +  * You might want to restart your machine at this point
-you should ideally have another machine like a laptop or a tablet available so you can keep reading this documentation or other sources online while troubleshooting.+(Before doing so, you should ideally have another machine like a laptop or a tablet available so you can keep reading this documentation.)
  
-After booting, log back in as a regular user and make yourself root again.+  * After booting, log back in as a regular user and make yourself root again.
  
-Next, you need to ensure that wpa_supplicant is not currently running. Try this command:+  * Check to ensure that wpa_supplicant is not currently running:
  
   ps aux | grep wpa   ps aux | grep wpa
Line 30: Line 31:
 root      4146  0.0  0.0   7136   968 pts/1    S+   16:53   0:00 grep wpa root      4146  0.0  0.0   7136   968 pts/1    S+   16:53   0:00 grep wpa
  
-This means you need to kill the wpa_supplicant process. Try this:+  * This means you need to kill the wpa_supplicant process:
  
   kill (process id number)   kill (process id number)
Line 39: Line 40:
   kill 1337   kill 1337
  
-Next, you will be editing wpa_supplicant.conf with your text editor. The command with vim is:+  * Edit wpa_supplicant.conf with your text editor. The command with vim is:
  
   vim /etc/wpa_supplicant.conf   vim /etc/wpa_supplicant.conf
Line 50: Line 51:
 Change it to that, removing all other lines and save it. Change it to that, removing all other lines and save it.
  
-Now you start wpa_supplicant from the command line. Try:+  * Start wpa_supplicant from the command line:
   wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf   wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf
  
Line 57: Line 58:
 wpa_supplicant should start up successfully. If you get a message about an RFKILL error you can probably ignore it. wpa_supplicant should start up successfully. If you get a message about an RFKILL error you can probably ignore it.
  
-Next run wpa_cli from the command line:+  * Run wpa_cli from the command line:
   wpa_cli   wpa_cli
  
 It should start up and report that wpa_supplicant is running. It should start up and report that wpa_supplicant is running.
  
-Now you are going to go through a series of wpa_cli commands in order to configure your wireless setup+  * Now configure your wireless setup, waiting a little between each command:
-Wait a little between each command:+
  
   scan   scan
Line 78: Line 78:
 If you only have one wireless network, it really should be network zero. If you only have one wireless network, it really should be network zero.
  
-store your new setup to the wpa_suppilcant.conf file:+  * store your new setup to the wpa_suppilcant.conf file:
   save_config   save_config
  
 The last command should save your config and return OK. If it says FAIL you may have a driver issue or have mistyped something in your wpa_supplicant startup command.\\ The last command should save your config and return OK. If it says FAIL you may have a driver issue or have mistyped something in your wpa_supplicant startup command.\\
-You can now quit wpa_cli by typing "quit" and hitting enter. Finally, you should remove the update_config line from wpa_supplicant.conf\\ +You can now quit wpa_cli by typing "quit" and hitting enter.  
-Open the file with your text editor:+ 
 +  * Remove the update_config line from wpa_supplicant.conf:
  
   vim /etc/wpa_supplicant.conf   vim /etc/wpa_supplicant.conf
Line 90: Line 91:
 Your SSID and the password should now be written into the config file. Your SSID and the password should now be written into the config file.
  
-The last step is to run dhcpcd. Run this command:+  * Run dhcpcd:
   dhcpcd wlan0   dhcpcd wlan0
  
-That should get you online. Now you if you want to automate this so it happens automatically each time your system boots up,\\ +That should get you online.\\ 
-just open your text editor add the wpa_supplicant line to /etc/rc.d/rc.local:+  * To automate this so it happens each time your system boots up
 + 
 +Open your text editor:
  
   vim /etc/rc.d/rc.local   vim /etc/rc.d/rc.local
  
-in your editor add: +add these two lines:
-  wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf+
  
-Save your changes. Logout of your superuser session using Ctrl-D or exit.\\ +<code>wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf 
-You should be all set. Enjoy having wireless outside of X and in your window manager of choice.+dhcpcd</code> 
 +  * Save your changes. 
 +  * Log out of your superuser session using Ctrl-D or exit. 
 +  Enjoy having wireless outside of X and in your window manager of choice.
  
  
Line 115: Line 120:
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 <!-- You must remove the tag-word "template" below before saving your new page --> <!-- You must remove the tag-word "template" below before saving your new page -->
-{{tag>howtos}}+{{tag>howtos author slackwood}}
 howtos:misc:wireless_with_wpa_cli ()