{"id":375,"date":"2015-03-28T21:32:19","date_gmt":"2015-03-28T20:32:19","guid":{"rendered":"http:\/\/joost.vunderink.net\/blog\/?p=375"},"modified":"2015-03-28T21:37:40","modified_gmt":"2015-03-28T20:37:40","slug":"wifi-usb-adapter-n300-in-ubuntu-server","status":"publish","type":"post","link":"https:\/\/joost.vunderink.net\/blog\/2015\/03\/28\/wifi-usb-adapter-n300-in-ubuntu-server\/","title":{"rendered":"Wifi USB adapter N300 in Ubuntu server"},"content":{"rendered":"<p>In my living room, I have a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Home_theater_PC\">home theatre PC<\/a> that runs <a href=\"http:\/\/www.ubuntu.com\/\">Ubuntu<\/a>\u00a014.04 with <a href=\"http:\/\/kodi.tv\/\">Kodi<\/a> (formerly XBMC). I wanted to reduce the amount of cables under my TV, so I bought a <a href=\"https:\/\/www.sitecom.com\/en\/wi-fi-usb-adapter-n300\/wla-2100\/p\/1563\">Sitecom N300 Wi-Fi USB adapter<\/a>.<\/p>\n<p>It turned out to be pretty easy to configure it from the command-line. Here&#8217;s a short guide for you to follow.<\/p>\n<p>First\u00a0make sure that the kernel drivers are loaded via\u00a0<span class=\"lang:default decode:true  crayon-inline \">lsmod | grep rtl<\/span>\u00a0and seeing <span class=\"lang:default decode:true  crayon-inline \">rtl8192cu<\/span>\u00a0\u00a0in the output. Then you need to install the <span class=\"lang:default decode:true  crayon-inline \">wpasupplicant<\/span>\u00a0\u00a0package, which can manage connections to WiFi base stations:<\/p>\n<pre class=\"nums:false lang:default decode:true\" title=\"Installing the required packages\">towel:~$ sudo apt-get install wpasupplicant<\/pre>\n<p>We need to create a config file for this package, as follows.<\/p>\n<pre class=\"nums:false lang:default decode:true\" title=\"Generating the config for wpa supplicant\">towel:~$ sudo wpa_passphrase Blauwmutsenpad &gt; \/etc\/wpa_supplicant.conf\r\n# reading passphrase from stdin\r\ntypeyourpassword\r\nnetwork={\r\n\tssid=\"Blauwmutsenpad\"\r\n\t#psk=\"aoeuaoeu\"\r\n\tpsk=52e832cb10afa74d405f66c12629d79e06da0a8abc3f6f963e4f617217fdd1b5\r\n}<\/pre>\n<p>You should replace <em>Blauwmutsenpad<\/em>\u00a0by your own network&#8217;s SSID, and <em>typeyourpassword<\/em>\u00a0by the password to your network.<\/p>\n<p>Make sure you remove the line with the plaintext password from the file <span class=\"lang:default decode:true  crayon-inline \">\/etc\/wpa_supplicant.conf<\/span>\u00a0\u00a0after you&#8217;ve created it.<\/p>\n<p>Then we need to tell the network system that there is a wireless network card. To do that, we add the following to <span class=\"lang:default decode:true  crayon-inline \">\/etc\/network\/interfaces<\/span>\u00a0:<\/p>\n<pre class=\"nums:false lang:default decode:true \" title=\"\/etc\/network\/interfaces\">auto wlan0\r\niface wlan0 inet dhcp\r\nwpa-driver nl80211\r\nwpa-conf \/etc\/wpa_supplicant.conf<\/pre>\n<p>After that, you can activate the wireless connection with:<\/p>\n<pre class=\"nums:false lang:default decode:true \" title=\"Activating the wireless connection\">ifup wlan0<\/pre>\n<p>The wireless connection will also be activated automatically after booting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my living room, I have a home theatre PC that runs Ubuntu\u00a014.04 with Kodi (formerly XBMC). I wanted to reduce the amount of cables under my TV, so I bought a Sitecom N300 Wi-Fi USB adapter. It turned out &hellip; <a href=\"https:\/\/joost.vunderink.net\/blog\/2015\/03\/28\/wifi-usb-adapter-n300-in-ubuntu-server\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[169,196,214,165,199,193,194,192,195,191,190,197,198],"class_list":["post-375","post","type-post","status-publish","format-standard","hentry","category-linux","tag-14-04","tag-configuration","tag-linux","tag-ubuntu","tag-ubuntu-14-04","tag-usb","tag-usb-adapter","tag-wifi","tag-wifi-usb-adapter","tag-wireless","tag-wlan","tag-wpa","tag-wpa_supplicant"],"_links":{"self":[{"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/posts\/375"}],"collection":[{"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/comments?post=375"}],"version-history":[{"count":2,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/posts\/375\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/posts\/375\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/media?parent=375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/categories?post=375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/tags?post=375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}