<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="http://optimho.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="http://optimho.github.io/" rel="alternate" type="text/html" /><updated>2021-04-03T21:25:10+00:00</updated><id>http://optimho.github.io/feed.xml</id><title type="html">Michael du Plessis</title><subtitle>General purpose blog</subtitle><entry><title type="html">Change hostname on raspberry Pi running jessie</title><link href="http://optimho.github.io/pi-hostname/" rel="alternate" type="text/html" title="Change hostname on raspberry Pi running jessie" /><published>2016-02-01T00:00:00+00:00</published><updated>2016-02-01T00:00:00+00:00</updated><id>http://optimho.github.io/pi-hostname</id><content type="html" xml:base="http://optimho.github.io/pi-hostname/">&lt;p&gt;&lt;img src=&quot;/images/raspberry.png&quot; alt=&quot;an image alt text&quot; title=&quot;an image title&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Change hostname&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;sudo hostnamectl set-hostname dlp&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/raspberry.gif&quot; alt=&quot;an image alt text&quot; title=&quot;an image title&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;show settings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;hostnamectl&lt;/em&gt;&lt;/p&gt;</content><author><name></name></author><summary type="html"></summary></entry><entry><title type="html">Raspberry Pi running debian jessie</title><link href="http://optimho.github.io/Hello-World/" rel="alternate" type="text/html" title="Raspberry Pi running debian jessie" /><published>2014-03-03T00:00:00+00:00</published><updated>2014-03-03T00:00:00+00:00</updated><id>http://optimho.github.io/Hello-World</id><content type="html" xml:base="http://optimho.github.io/Hello-World/">&lt;p&gt;&lt;strong&gt;static wireless and wired ip addresses&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/ethernet_transparent.png&quot; alt=&quot;an image alt text&quot; title=&quot;an image title&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Using a realtek EDIMAX usb to wifi adapter is a recomended wifi adapter.&lt;/p&gt;

&lt;p&gt;type the fillowing command:
        dmesg | more 
  to see if the raspberry has recognised your wireless adapter, if it is there then you are good to go.&lt;/p&gt;

&lt;p&gt;edit your network interfaces file.
  There is a host of ways of configuring a wireless adapter, some better and some not so good.
  I am not sure which catagory this one will fall into.&lt;/p&gt;

&lt;p&gt;Firstly you will need to know what your ip address of your home router is. 
  from your home computer or the computer that you are using to read this type the command:
  ipconfig&lt;/p&gt;

&lt;p&gt;this will return a lot of information, but the important information is 
  ethernet local adapter will have IPV4 address, a default gateway, subnetmask - 192.168.2.16 , 192.168.2.1 and 255.255.255.0     respectively in my case.&lt;/p&gt;

&lt;p&gt;So I know from this data that 192.168.2.16 is an address that is used so I cannot use this address.
  The gateway address is 192.168.2.1
  The subnet mask is 255.255.255.0&lt;/p&gt;

&lt;p&gt;now you must be careful of using an address that some other device is using type arp -a into the windows command prompt
  This will show a range of addresses that are being used in your network.&lt;/p&gt;

&lt;p&gt;The IP address that you choose must be in the same range of your wireless IP address gateway 192.168.2.(2-254)
  leave address 0 , 1 and 255 alone as they have been used already 16 too in my case.&lt;/p&gt;

&lt;p&gt;To see what networks are available run the following command.&lt;/p&gt;

&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;**sudo iwlist wlan0 scan&lt;/td&gt;
      &lt;td&gt;grep ESSID**&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;I think that this command will work if raspbian recognises the wireless adapter, even if it is not properly configured yet,  so can   be used as a method to see if you wireless adapter is working and that the operating system recognises the adapter.&lt;/p&gt;

&lt;p&gt;then:&lt;/p&gt;

&lt;p&gt;{&lt;strong&gt;sudo nano /etc/dhcpcd.conf&lt;/strong&gt;}&lt;/p&gt;

&lt;p&gt;add this at the end of the file leave all other settings as they are&lt;/p&gt;

&lt;p&gt;&lt;em&gt;interface eth0&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;static ip_address&lt;/em&gt;=192.168.2.29/24_&lt;/p&gt;

&lt;p&gt;&lt;em&gt;static routers=192.168.2.1&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;static domain_name_servers&lt;/em&gt;=192.168.2.1_&lt;/p&gt;

&lt;p&gt;{ctrl-o to save}
{ctrl-x to quit}&lt;/p&gt;

&lt;p&gt;This will make eth0 (the wired ethernet port) static&lt;/p&gt;

&lt;p&gt;then:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;sudo nano /etc/network/interfaces&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;auto lo&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;iface lo inet loopback&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;auto eth0&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;allow-hotplug eth0&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;iface eth0 inet manual&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;allow-hotplug wlan0&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;auto wlan0&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;iface wlan0 inet static&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;address 192.168.2.30&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;netmask 255.255.255.0&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;broadcast 192.168.2.255&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;gateway 192.168.2.1&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf&lt;/p&gt;

&lt;p&gt;{ctrl-o to save}&lt;/p&gt;

&lt;p&gt;{ctrl-x to quit}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;then:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;{&lt;strong&gt;sudo nano /etc/wpa_suplicant/wpa_suplicant.conf&lt;/strong&gt;}&lt;/p&gt;

&lt;p&gt;ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev&lt;/p&gt;

&lt;p&gt;update_config=1&lt;/p&gt;

&lt;p&gt;network={&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    ssid=&quot;name of wireless ssid&quot;
    
    psk=&quot;password or key&quot;
    
    key_mgmt=WPA-PSK
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;network={&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    ssid=&quot;alternative connection ssid&quot;
    
    psk=&quot;password or key&quot;
    
    key_mgmt=WPA-PSK
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;{ctrl-o to save}&lt;/p&gt;

&lt;p&gt;{ctrl-x to quit}&lt;/p&gt;

&lt;p&gt;sudo reboot  #to restart pi&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;iwconfig&lt;/strong&gt; 
This will help identify that the wifi has connected to your network. If it displays ESSID = “your network” you are a winner&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;netstat -nr&lt;/strong&gt; 
This is a good way to check which IP addresses have been configured on the PI&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ifconfig&lt;/strong&gt; 
This is another network command that works well to see your network card configuration and if it is functioning.&lt;/p&gt;</content><author><name></name></author><summary type="html">static wireless and wired ip addresses</summary></entry></feed>