User Tools

Site Tools


setup_wifi_from_command_line_console

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
setup_wifi_from_command_line_console [2017/01/07 15:45] – [Find your Wireless Network] walkeradminsetup_wifi_from_command_line_console [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Setup WiFi from Command Line Console ====== ====== Setup WiFi from Command Line Console ======
 +<color orange>Jan 2017</color>
 \\  \\ 
 +\\ 
 +{{:wifi.jpg?100|}}
 +{{:wifi.jpg?100|}}
 +{{:wifi.jpg?100|}}
 +{{:wifi.jpg?100|}}
 +{{:wifi.jpg?100|}}
 +{{:wifi.jpg?100|}}
 +\\ 
 +\\ 
 +
 +----
 +
 Setting up WiFi from the GUI of Raspbian is easy, just click the wifi button on the top right, select your SSID, enter your details and away you go. Setting up WiFi from the GUI of Raspbian is easy, just click the wifi button on the top right, select your SSID, enter your details and away you go.
 \\  \\ 
Line 7: Line 20:
 \\  \\ 
 \\  \\ 
 +
 +----
 +
 ==== Before you start ==== ==== Before you start ====
 \\  \\ 
Line 30: Line 46:
           RX bytes:216207 (211.1 KiB)  TX bytes:24862 (24.2 KiB)           RX bytes:216207 (211.1 KiB)  TX bytes:24862 (24.2 KiB)
 </file> </file>
-\\  
 \\  \\ 
 Enter HWaddr (d5:6b:b0:99:46:86 in this example) in to your router. Enter HWaddr (d5:6b:b0:99:46:86 in this example) in to your router.
Line 39: Line 54:
  
 ==== Find your Wireless Network ==== ==== Find your Wireless Network ====
 +\\ 
 +To scan for wireless networks, use the following command:
 +\\ 
 +    sudo iwlist wlan0 scan
 +\\ 
 +If you have more than one SSID close by, then you could get quite a list. so you can use the following to work out what information you need.
 +\\ 
 +    sudo iwlist wlan0 scan |more
 +    
 +    This will allow you to scroll through the pages of information you might get
 +\\ 
 +Or
 +\\ 
 +    sudo iwlist wlan0 scan |grep SSID
 +    
 +    This will show just the SSIDs from the scan, meaning you can spot your SSDI more easily, for example:
 +    
 +    ESSID:"Work"
 +    ESSID:"Home"
 +    ESSID:"Public"
 +    ESSID:"Guests"
 +    ESSID:"Samsung-Printer"
 +\\ 
 +\\ 
 +
 +----
 +==== Add WiFi details to Raspbian ====
 +\\ 
 +To add your details to Raspbian, use the following:
 +\\ 
 +    sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
 +\\ 
 +You will see a fairly empty file (assuming no one has edited this before)
 +\\ 
 +<file>
 +country=GB
 +ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 +update_config=1
 +</file>
 +\\ 
 +At the end of this file, add the following lines.
 +\\ 
 +<file>
 +network={
 +    ssid="The_ESSID_from_earlier"
 +    psk="Your_wifi_password"
 +}
 +
 +So I might add:
 +
 +network={
 +    ssid="Home"
 +    psk="0123456789"
 +}
 +</file>
 +\\ 
 +Save the file, reboot the Pi and Voila!
 +\\ 
 +<file>
 +Ifconfig
 +
 +wlan0     Link encap:Ethernet  HWaddr d5:6b:b0:99:46:86
 +          inet addr:137.58.50.53  Bcast:137.58.50.255  Mask:255.255.0.0
 +          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 +          RX packets:7846 errors:0 dropped:5265 overruns:0 frame:0
 +          TX packets:744 errors:0 dropped:0 overruns:0 carrier:0
 +          collisions:0 txqueuelen:1000
 +          RX bytes:928708 (906.9 KiB)  TX bytes:76256 (74.4 KiB)
 +</file>
 +\\ 
 +\\ 
 +
setup_wifi_from_command_line_console.1483803927.txt.gz · Last modified: 2023/03/09 22:35 (external edit)