{"id":133,"date":"2015-10-28T10:53:18","date_gmt":"2015-10-28T08:53:18","guid":{"rendered":"http:\/\/www.datenreise.de\/en\/?p=133"},"modified":"2018-03-04T13:45:30","modified_gmt":"2018-03-04T11:45:30","slug":"raspberry-pi-setting-up-wifi-edimax","status":"publish","type":"post","link":"https:\/\/www.datenreise.de\/en\/raspberry-pi-setting-up-wifi-edimax\/","title":{"rendered":"Raspberry Pi &#8211; Setting up Wi-Fi (Edimax)"},"content":{"rendered":"<p>Those who wish to wirelessly connect their Raspberry Pi to a network are faced with choosing the right Wi-Fi adapter. Depending on the adapter, set-up is either very easy or associated with considerable effort and potential complications. The reasons for this are the various chipsets that come with different Wi-Fi adapters. Problems particularly arise with completely new chipsets for which the Linux kernel does not yet provide a driver or for which a Linux driver does not even exist yet.<\/p>\n<p>&nbsp;<\/p>\n<h4>Recommendation Wi-Fi adapter<\/h4>\n<p>After having used many different Wi-Fi adapters on my Raspberry Pi at both greater and lesser expense, two personal favourites have emerged for me. The two Edimax Wi-Fi adapters are by far the easiest to set up:<\/p>\n<table>\n<thead>\n<tr>\n<th><strong>product name<\/strong><\/th>\n<th><strong>power consumption<\/strong><\/th>\n<th><strong>product price<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"http:\/\/www.amazon.de\/gp\/product\/B003MTTJOY\/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;camp=1638&amp;creative=6742&amp;creativeASIN=B003MTTJOY&amp;linkCode=as2&amp;tag=dde0b6-21\">EDIMAX EW-7811UN, 150 Mbit\/s<\/a><\/td>\n<td>0,5W<\/td>\n<td>ca. 8 \u20ac<\/td>\n<\/tr>\n<tr>\n<td><a href=\"http:\/\/www.amazon.de\/gp\/product\/B007H5WXB0\/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;camp=1638&amp;creative=6742&amp;creativeASIN=B007H5WXB0&amp;linkCode=as2&amp;tag=dde0b6-21\">EDIMAX EW-7612UAn, 300 Mbit\/s (with external antenna)<\/a><\/td>\n<td>0,8W<\/td>\n<td>ca. 20 \u20ac<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h4>No additional driver required<\/h4>\n<p>Due to low power consumption, the Edimax adapters can be used directly on the Raspberry Pi without an additional active USB hub. Both Wi-Fi adapters are recognized and integrated automatically because the kernel already has the appropriate driver (RTL8192CU) installed. After that, all that remains is the configuration of the wireless network.<br \/>\n&nbsp;<\/p>\n<hr \/>\n<h4><strong>Difficulty level:<\/strong> <span style=\"color: #4f70c5;\"><i class=\"icon-wrench\"><\/i><\/span><span style=\"color: #cccccc;\"><i class=\"icon-wrench\"><\/i><i class=\"icon-wrench\"><\/i><i class=\"icon-wrench\"><\/i><\/span><\/h4>\n<hr \/>\n<p>&nbsp;<\/p>\n<h4>Wi-Fi configuration under Raspbian<\/h4>\n<p>Raspbian recognizes he adapter as soon as it is inserted. You can check this easily by using the following command:<\/p>\n<pre>$ dmesg<\/pre>\n<p>Subsequently, we can see that a Realtek Wi-Fi adapter was recognized and that the corresponding driver has loaded:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1173 alignnone\" alt=\"pi_dmesg\" src=\"https:\/\/www.datenreise.de\/wp-content\/uploads\/2013\/06\/pi_dmesg.jpg\" width=\"600\" height=\"101\" \/>After the stick was recognized, a new network device should appear which can simply be verified by using <em>ifconfig<\/em>:<\/p>\n<pre>$ ifconfig<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1177\" alt=\"pi_ifconfig\" src=\"https:\/\/www.datenreise.de\/wp-content\/uploads\/2013\/06\/pi_ifconfig.jpg\" width=\"600\" height=\"320\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>Deactivate power saving<\/h4>\n<p>Before establishing a wireless network connection, the Edimax driver\u2019s power saving function should be deactivated, otherwise the connection will be interrupted during inactivity. To avoid this, a configuration file for the driver must be created:<\/p>\n<pre>sudo nano \/etc\/modprobe.d\/8192cu.conf<\/pre>\n<p>This file gets the following content:<\/p>\n<pre>options 8192cu rtw_power_mgnt=0 rtw_enusbss=0<\/pre>\n<p>&nbsp;<\/p>\n<h4>Establish connection (DHCP)<\/h4>\n<p>In order to establish a connection with our wireless network, we must now edit the file <em>\/etc\/network\/interfaces<\/em>:<\/p>\n<pre>$ sudo nano \/etc\/network\/interfaces<\/pre>\n<p>and adapt its content:<\/p>\n<pre>auto lo\r\niface lo inet loopback\r\niface eth0 inet dhcp\r\n\r\nauto wlan0\r\nallow-hotplug wlan0\r\niface wlan0 inet dhcp\r\nwpa-ap-scan 1\r\nwpa-scan-ssid 1\r\nwpa-ssid \"YOUR-WIFI-NAME\"\r\nwpa-psk \"YOUR-WIFI-PASSWORD\"<\/pre>\n<p>Finally, save the changes and restart the network service.<\/p>\n<pre>sudo service networking restart<\/pre>\n<p>&nbsp;<\/p>\n<h4>Static IP address (optional)<\/h4>\n<p>If the Wi-Fi interface is to be assigned to a static IP address within the network, the file contents should look as follows:<\/p>\n<pre>auto lo\r\niface lo inet loopback\r\n\r\niface eth0 inet static\r\naddress 192.168.0.24\r\nnetmask 255.255.255.0\r\ngateway 192.168.0.1\r\n\r\nauto wlan0\r\nallow-hotplug wlan0\r\niface wlan0 inet static\r\naddress 192.168.0.23\r\nnetmask 255.255.255.0\r\ngateway 192.168.0.1\r\nwpa-ap-scan 1\r\nwpa-scan-ssid 1\r\nwpa-ssid \"YOUR-WIFI-NAME\"\r\nwpa-psk \"YOUR-WIFI-PASSWORD\"<\/pre>\n<div class=\"supportbox\">\n<p class=\"supporticon\"><i class=\"icon-heart-empty icon-3x\"><\/i><\/p>\n<p class=\"supporttext\"><strong>This article was helpful for you?<\/strong><br \/>Please support datenreise.de\/en \u2013 Thank you!<\/p>\n<p><a class=\"supportbtn\" href=\"..\/support\/\" target=\"_blank\"><span class=\"btntext\">donate<\/span><\/a><\/div>\n<hr \/>\n<span id=\"post-ratings-133\" class=\"post-ratings\" data-nonce=\"59912728de\"><p><strong>Rate this Post:<\/strong><br \/>\r\n<img decoding=\"async\" id=\"rating_133_1\" src=\"https:\/\/www.datenreise.de\/en\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"1 Star\" title=\"1 Star\" onmouseover=\"current_rating(133, 1, '1 Star');\" onmouseout=\"ratings_off(4.5, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_133_2\" src=\"https:\/\/www.datenreise.de\/en\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"2 Stars\" title=\"2 Stars\" onmouseover=\"current_rating(133, 2, '2 Stars');\" onmouseout=\"ratings_off(4.5, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_133_3\" src=\"https:\/\/www.datenreise.de\/en\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"3 Stars\" title=\"3 Stars\" onmouseover=\"current_rating(133, 3, '3 Stars');\" onmouseout=\"ratings_off(4.5, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_133_4\" src=\"https:\/\/www.datenreise.de\/en\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"4 Stars\" title=\"4 Stars\" onmouseover=\"current_rating(133, 4, '4 Stars');\" onmouseout=\"ratings_off(4.5, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_133_5\" src=\"https:\/\/www.datenreise.de\/en\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_half.gif\" alt=\"5 Stars\" title=\"5 Stars\" onmouseover=\"current_rating(133, 5, '5 Stars');\" onmouseout=\"ratings_off(4.5, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><br \/>\r\n<span style=\"color:#999\">4.54\/5 (13 votes)<\/span>\r\n<\/p>\r\n<span class=\"hreview-aggregate\">\r\n  <span class=\"item\">\r\n    <span class=\"fn\">Raspberry Pi &#8211; Setting up Wi-Fi (Edimax)<\/span>, \r\n  <\/span>\r\n  <span class=\"rating\">\r\n    <span class=\"average\">4.54<\/span> out of\r\n    <span class=\"best\">5<\/span> based on <span class=\"votes\">13<\/span> ratings\r\n  <\/span>\r\n<\/span><\/span><span id=\"post-ratings-133-loading\" class=\"post-ratings-loading\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.datenreise.de\/en\/wp-content\/plugins\/wp-postratings\/images\/loading.gif\" width=\"16\" height=\"16\" class=\"post-ratings-image\" \/>Loading...<\/span>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Those who wish to wirelessly connect their Raspberry Pi to a network are faced with choosing the right Wi-Fi adapter. Depending on the adapter, set-up is either very easy or associated with considerable effort and potential complications. The reasons for&#8230;<\/p>\n","protected":false},"author":1,"featured_media":139,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,40],"tags":[50,46,47,43,7,13,16,49,44,48,12,34,51,45],"class_list":["post-133","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-raspberry-pi","tag-adapter","tag-configuration","tag-driver","tag-edimax","tag-howto","tag-installation","tag-instruction","tag-linux","tag-raspberry-pi","tag-raspbian","tag-recommendation","tag-tipps","tag-usb","tag-wifi"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":8,"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":233,"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/posts\/133\/revisions\/233"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/media\/139"}],"wp:attachment":[{"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datenreise.de\/en\/wp-json\/wp\/v2\/tags?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}