<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sri</title>
    <description>The latest articles on DEV Community by Sri (@srao).</description>
    <link>https://dev.to/srao</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F241970%2F93285e13-c78b-466a-b07e-418b0448235e.jpeg</url>
      <title>DEV Community: Sri</title>
      <link>https://dev.to/srao</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/srao"/>
    <language>en</language>
    <item>
      <title>Raspberry-Pi-Headless-Setup-via-Network-Manager</title>
      <dc:creator>Sri</dc:creator>
      <pubDate>Thu, 03 Oct 2019 14:08:10 +0000</pubDate>
      <link>https://dev.to/srao/raspberry-pi-headless-setup-via-network-manager-491c</link>
      <guid>https://dev.to/srao/raspberry-pi-headless-setup-via-network-manager-491c</guid>
      <description>&lt;h1&gt;
  
  
  WiFi Configuration on RPi
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Update your sources.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   $ sudo apt update &amp;amp; sudo apt upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Install NetworkManager,This will install a number of other packages as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   $ sudo apt install network-manager
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Remove these packages as suggested here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   ### https://raspberrypi.stackexchange.com/a/73816
   ### Otherwise the wifi device appears as unavailable to nmcli.

   $ sudo apt purge openresolv dhcpcd5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Reboot, sudo reboot now.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   $ sudo reboot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Check network connection status and verify that the inet addr is empty.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   $ ifconfig wlan0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage:
&lt;/h2&gt;

&lt;p&gt;Start using nmcli by scanning the manual, man nmcli.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ nmcli dev help.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Displays a table. Notice that wlan0 is disconnected&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ nmcli dev status
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Displays a table of available wifi access points&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ nmcli dev wifi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Connect to a WiFi network.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ nmcli device wifi connect &amp;lt;SSID&amp;gt; password &amp;lt;Secrete&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Connects may be added using nmcli, for example nmcli con add con-name HOMEOFFICE ifname wlan0 type wifi ssid MYSSID, but I prefer to use nmtui.&lt;/p&gt;

&lt;p&gt;Provides a text user interface that allows easy creation of wifi connection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo nmtui
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Edit a connection. Add  wifi.&lt;br&gt;
Give your connection a name and set the fields needed for your access point.&lt;br&gt;
If you provided all the settings correctly and set the connection to connect automatically, it might already have connected. Check with ifconfig wlan0.&lt;/p&gt;

&lt;p&gt;Notice the changed out put from nmcli dev status and nmcli dev wifi.&lt;/p&gt;

&lt;p&gt;Show active connections with nmcli con show -a.&lt;/p&gt;

&lt;p&gt;Take down a connection with sudo nmcli con down connection_name and bring it back up with sudo nmcli con up connection_name.\&lt;/p&gt;

&lt;h2&gt;
  
  
  You can use Raspi-config at any time. To start it, enter the following at the Linux command line.
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo raspi-config
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>raspberrypi</category>
      <category>wifi</category>
      <category>wificonfiguration</category>
      <category>network</category>
    </item>
  </channel>
</rss>
