{"id":883,"date":"2013-12-15T18:16:09","date_gmt":"2013-12-15T18:16:09","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=883"},"modified":"2014-11-18T22:31:24","modified_gmt":"2014-11-18T22:31:24","slug":"setting-up-my-raspberry-pi","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/setting-up-my-raspberry-pi\/","title":{"rendered":"Setting up my Raspberry Pi"},"content":{"rendered":"<p>As this is the third Raspberry Pi I&#8217;ve had to set up, and again I&#8217;ve forgotten the steps. Here&#8217;s a post of what I need.<\/p>\n<p>Steps&#8230;<\/p>\n<ol>\n<li>Ensure the OS is upto date<\/li>\n<li>Setup a WiFi USB device (I&#8217;m using the EDIMAX USB Adapter)<\/li>\n<li>Setup a static IP address<\/li>\n<li>Install mono<\/li>\n<li>Install Git tools<\/li>\n<li>Setup VNC<\/li>\n<\/ol>\n<p>Fire up the Pi and login&#8230;<\/p>\n<p><strong>Ensure the OS is upto date<\/strong><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo apt-get update\r\n<\/pre>\n<p>This will update all packages.<\/p>\n<p>You can also run<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo apt-get upgrade\r\n<\/pre>\n<p>to upgrade the Linux kernel<\/p>\n<p><strong>Setup a WiFi USB device (I&#8217;m using the EDIMAX USB Adapter)<\/strong><\/p>\n<p>The EDIMAX EW-7811Un is on the list of WiFi USB adapters that&#8217;s verified for use on a Raspberry Pi and it&#8217;s the one I&#8217;ve used previously so I know it works :)<\/p>\n<p><em>Note: An excellent and fuller guide is available at <a href=\"http:\/\/www.savagehomeautomation.com\/projects\/raspberry-pi-installing-the-edimax-ew-7811un-usb-wifi-adapte.html\" title=\"Raspberry Pi - Installing the Edimax EW-7811Un USB WiFi Adapter (WiFiPi)\">Raspberry Pi &#8211; Installing the Edimax EW-7811Un USB WiFi Adapter (WiFiPi)<\/a><\/em><\/p>\n<p>I&#8217;ll just reproduce the steps I used here<\/p>\n<ol>\n<li>So obviously we need to start by plugging the USB adapter into the Raspberry Pi<\/li>\n<li>Next run\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\niwconfig\r\n<\/pre>\n<p>This will tell us whether the adapter is ready to use as it should automatically have been recognized. You should see wlan0 plus other information output. Check the link above for more tests you can do to ensure everything is detected and read.\n<\/li>\n<li>Now we want to ensure that the adapter is configured, so type\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo nano \/etc\/network\/interfaces\r\n<\/pre>\n<p>or use your preferred text editor in place of nano. <\/p>\n<p>Make sure the file contains the following (and they&#8217;re uncommented)<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nallow-hotplug wlan0\r\niface wlan0 inet manual\r\nwpa-roam \/etc\/wpa_supplicant\/wpa_supplicant.conf\r\niface default inet dhcp\r\n<\/pre>\n<\/li>\n<li>Now we need to create\/amend the configuration file for connecting to the network, so type\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo nano \/etc\/wpa_supplicant\/wpa_supplicant.conf\r\n<\/pre>\n<p>We need to add the various entries for connecting to the network here, for example<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nnetwork={\r\n   ssid=&quot;The Router SSID&quot;\r\n   psk=&quot;The Router Password&quot;\r\n   proto=WPA\r\n   key_mgmt=WPA-PSK\r\n   pairwise=TKIP\r\n   auth-alg=OPEN\r\n}\r\n<\/pre>\n<p>Obviously replace the ssid and psk with your router&#8217;s ssid and the password you use to connect to it.\n<\/li>\n<li>\nType the following, to restart the network interface with the new configuration data<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo ifup wlan0\r\n<\/pre>\n<\/li>\n<\/ol>\n<p><strong>Setup a static IP address<\/strong><\/p>\n<p>Open \/etc\/network\/interfaces again, for example using<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo nano \/etc\/network\/interfaces\r\n<\/pre>\n<p>We now want to change the configuration from using dhcp supplied address to using a static ip address. So alter the line<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\niface default inet dhcp\r\n<\/pre>\n<p>from <em>dhcp<\/em> to <em>static<\/em> and add the following<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\naddress 192.168.1.100\r\ngateway 192.168.1.1\r\nnetmask 255.255.255.0\r\n<\/pre>\n<p>Obviously replace the address, gateway and netmask with your specific network settings. You may also wish to alter the eth0 adapter to mirror the wlan0 adapter with the same address etc.<\/p>\n<p><strong>Install mono<\/strong><\/p>\n<p>Finally time to install something. This is the easy part. To install mono just enter the following<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo apt-get install mono-complete\r\n<\/pre>\n<p><strong>Install Git tools<\/strong><\/p>\n<p>Time to install GIT.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo apt-get install git\r\n<\/pre>\n<p><strong>Setup VNC<\/strong><\/p>\n<p>Install VNCServer using<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo apt-get install tightvncserver\r\n<\/pre>\n<p>Now run <em>tightvnsserver<\/em> and note the number supplied for the desktop for connection from the client machine.<\/p>\n<p><strong>Raspberry Pi A+<\/strong><\/p>\n<p>The Raspberry Pi A+ has a single USB port (excluding the USB power socket) and no Ethernet port, which is a bit of a pain if trying to setup WiFi and having problems getting the configuration right (especially as I don&#8217;t have a powered USB hub to help me out).<\/p>\n<p>Anyway after a lot of hassle here&#8217;s the configuration for the Raspberry Pi A+ running Wheezy Raspbian 7. The USB WiFi device I&#8217;m using is a WiPi dongle.<\/p>\n<p>Let&#8217;s begin with the \/etc\/network\/interfaces file, mine looks like this<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nauto lo\r\niface lo inet loopback\r\n\r\nauto wlan0\r\nallow-hotplug wlan0\r\niface wlan0 inet manual\r\nwpa-roam \/etc\/wpa_supplicant\/wpa_supplicant.conf\r\niface default inet static\r\n\r\naddress 192.168.1.2\r\ngateway 192.168.1.\r\nnetmask 255.255.255.0\r\n<\/pre>\n<p>obviously the above is setup with a static address, if you want to use a dynamic address change the <em>static<\/em> to <em>dhcp<\/em> and remove the address gateway and netmask (to tidy the config up).<\/p>\n<p>Next we need to amend the \/etc\/wpa_supplicant\/wpa_supplicant.conf file, mine looks like this<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nctrl_interface=DIR=\/var\/run\/wpa_supplicant GROUP=netdev\r\nupdate_config=1\r\n\r\nnetwork={\r\nssid=&quot;The Router SSID&quot;\r\npsk=&quot;The Router Password&quot;\r\nproto=RSN\r\nkey_mgmt=WPA-PSK\r\npairwise=CCMP TKIP\r\ngroup=CCMP TKIP\r\n}\r\n<\/pre>\n<p>The above configures for WPA2 security (use WPA for WPA1).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As this is the third Raspberry Pi I&#8217;ve had to set up, and again I&#8217;ve forgotten the steps. Here&#8217;s a post of what I need. Steps&#8230; Ensure the OS is upto date Setup a WiFi USB device (I&#8217;m using the EDIMAX USB Adapter) Setup a static IP address Install mono Install Git tools Setup VNC [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[58,59],"tags":[],"class_list":["post-883","post","type-post","status-publish","format-standard","hentry","category-linux","category-raspberry-pi"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=883"}],"version-history":[{"count":18,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/883\/revisions"}],"predecessor-version":[{"id":2580,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/883\/revisions\/2580"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}