{"id":202,"date":"2018-02-01T05:46:13","date_gmt":"2018-01-31T22:46:13","guid":{"rendered":"http:\/\/class.ajarnsunny.com\/?page_id=202"},"modified":"2018-02-01T07:29:42","modified_gmt":"2018-02-01T00:29:42","slug":"remote-connection-with-your-pi-and-sharing-the-internet-editing-cmdline-txt","status":"publish","type":"page","link":"http:\/\/class.ajarnsunny.com\/?page_id=202","title":{"rendered":"Remote connection with your Pi and sharing the Internet (Editing cmdline.txt)"},"content":{"rendered":"<p>1. Firstly, enable the WiFi adapter of the PC\/Laptop and make sure it\u2019s connected to a WiFi hotpspot. Open any Internet Browser and confirm internet access by opening any website.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi.png?w=212&amp;h=300\" alt=\"raspi\" \/><\/p>\n<p style=\"text-align: center;\">Note: you can use your smart phone device configured as a WiFi hotspot<\/p>\n<p style=\"text-align: left;\">2. Now, go to Network and Sharing Center (Network Settings in Win XP) and then head to the Change Adapter Settings page. As shown below, we\u2019re connected to \u2018Wireless Network Connection\u2019 on \u2018Android 4\u2019. Do remember the \u2018Local Area Connection\u2019 to which we\u2019ll eventually share this connection<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi1.png?w=840\" alt=\"raspi\" \/><\/p>\n<p>3. Now, right click the above Network \u2192 Properties and then select the Sharing tab<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi2.png?w=840\" alt=\"raspi\" \/><\/p>\n<p>4.\u00a0From the drop down list, choose \u2018Local Area Connection\u2019 and enable both the checkboxes and hit OK. Once done, head back to the Adapter Settings page and you should now see the <strong>Shared<\/strong> info message on the Wireless Network Connection<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi3.png?w=840\" alt=\"raspi\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi4.png?w=840\" alt=\"raspi\" \/><\/p>\n<p>5.\u00a0Now, right click \u2018Local Area Connection\u2019 \u2192 Properties and then select Internet Protocol Version 4 and then click the Properties Button<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi5.png?w=840\" alt=\"raspi\" \/><\/p>\n<p>Once the properties tab pops up, make sure that the \u2018Obtain IP address automatically\u2019 checkbox is selected. If not, check it and hit OK<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi6.png?w=840\" alt=\"raspi\" \/><\/p>\n<p>6. Now, power up the Raspberry Pi (making sure that the Ras-Pi and the Laptop\/PC are connected to each other through the LAN\/Ethernet cable) and wait a minute or two while the Ras-Pi boots. Now, repeat step 5 (previous one) to make sure \u2018<strong>Obtain IP Address Automatically<\/strong>\u2019 is still checked.<\/p>\n<p>7.\u00a0Open up command prompt using the hotkey Windows Key + R and then typing in <strong>cmd<\/strong> or simply keying in <strong>cmd<\/strong> in the start menu (Win 7)<\/p>\n<p>8.\u00a0In the command prompt, key in <strong>ipconfig<\/strong> and scroll to the top of the info shown<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi7.png?w=840\" alt=\"raspi\" \/><\/p>\n<p>Note the IPv4 address which is 169.254.39.68 in this example. Please make a note of what you see as this will be required further.<\/p>\n<p>9.\u00a0Now, power off the Raspberry Pi and plug the Ras-Pi\u2019s SD card into a card reader and connect it to the PC. Once the disk opens up, open the <strong>cmdline.txt<\/strong> file in any editor<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi8.png?w=840&amp;h=386\" alt=\"raspi\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi9.png?w=840\" alt=\"raspi\" \/><\/p>\n<p style=\"text-align: left;\">You\u2019d probably have an entry any IPs, however, it <strong>need to be in the same Subnet with your PC&#8217;s IP<\/strong>. In this case, we set the IP=<strong>169.254.39.71<\/strong>.<\/p>\n<p>10.\u00a0Now, to this entry, append the IPv4 which we got earlier preceded by two colons as shown below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi10.png?w=840\" alt=\"raspi\" \/><\/p>\n<p>where the first half is the static IP for Raspberry Pi (169.254.39.71) and the other half is the IP of the IPV4 or Ethernet Adapter (169.254.39.68) which we obtained earlier.<\/p>\n<p>11. Save this file and plug the SD card back into the Raspberry Pi. Power up the Raspberry Pi and wait for a min or two. Establishg a direct SSH connection with the Raspberry Pi as explained in the previous post.<\/p>\n<p>12. Now, to verify if our Ras-Pi is Internet-Connected, type in this command in the Shell (PuTTY terminal connected to the Ras-Pi)<\/p>\n<p>ping <em><strong>http:\/\/www.google.com<\/strong><\/em><\/p>\n<p>and you should see response from the servers as shown below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/anwaarullah.files.wordpress.com\/2013\/08\/raspi11.png?w=840\" alt=\"raspi\" \/><\/p>\n<p>Voila!!! Your Raspberry Pi is now connected to the World Wide Web ?<\/p>\n<p><strong>Reference: The main contain of this page is taken from the site below:<\/strong><\/p>\n<div class=\"post-video\"><a href=\"https:\/\/anwaarullah.wordpress.com\/2013\/08\/12\/sharing-wifi-internet-connection-with-raspberry-pi-through-lanethernet-headless-mode\/\">Sharing WiFi Internet connection with Raspberry Pi through LAN\/Ethernet (Headless&nbsp;Mode)<\/a><\/div>\n<div id=\"themify_builder_content-202\" data-postid=\"202\" class=\"themify_builder_content themify_builder_content-202 themify_builder\">\n\n    <\/div>\n<!-- \/themify_builder_content -->","protected":false},"excerpt":{"rendered":"<p>1. Firstly, enable the WiFi adapter of the PC\/Laptop and make sure it\u2019s connected to a WiFi hotpspot. Open any Internet Browser and confirm internet access by opening any website. Note: you can use your smart phone device configured as a WiFi hotspot 2. Now, go to Network and Sharing Center (Network Settings in Win [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-202","page","type-page","status-publish","hentry","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"http:\/\/class.ajarnsunny.com\/index.php?rest_route=\/wp\/v2\/pages\/202"}],"collection":[{"href":"http:\/\/class.ajarnsunny.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/class.ajarnsunny.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/class.ajarnsunny.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/class.ajarnsunny.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=202"}],"version-history":[{"count":4,"href":"http:\/\/class.ajarnsunny.com\/index.php?rest_route=\/wp\/v2\/pages\/202\/revisions"}],"predecessor-version":[{"id":208,"href":"http:\/\/class.ajarnsunny.com\/index.php?rest_route=\/wp\/v2\/pages\/202\/revisions\/208"}],"wp:attachment":[{"href":"http:\/\/class.ajarnsunny.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}